06 2020 档案

摘要:1 https://mirrors.ustc.edu.cn/repogen/ 2 3 apt-get update && apt-get install apt-transport-https -y 4 5 vi /etc/apt/sources.list 6 7 国内: 8 9 10 deb [h 阅读全文
posted @ 2020-06-15 15:41 xlsdg 阅读(935) 评论(0) 推荐(0)
摘要:1 sudo vi /etc/sysctl.conf 2 3 添加下面3行 4 5 net.ipv6.conf.all.disable_ipv6 = 1 6 net.ipv6.conf.default.disable_ipv6 = 1 7 net.ipv6.conf.lo.disable_ipv6 阅读全文
posted @ 2020-06-15 15:38 xlsdg 阅读(1953) 评论(0) 推荐(0)
摘要:1 server { 2 listen 81; 3 server_name xxxx.com; 4 root /xxxx/prod; 5 index index.html; 6 7 location ~ .*\.(htm|html)$ { 8 add_header "Cache-Control" " 阅读全文
posted @ 2020-06-15 15:35 xlsdg 阅读(161) 评论(0) 推荐(0)
摘要:1 sudo aptitude update -y && sudo aptitude install unattended-upgrades apt-listchanges -y 2 3 sudo vi /etc/apt/apt.conf.d/50unattended-upgrades 4 5 在 阅读全文
posted @ 2020-06-15 15:33 xlsdg 阅读(217) 评论(0) 推荐(0)
摘要:1 vi ~/.zshrc 2 export LC_ALL=C 3 source ~/.zshrc 阅读全文
posted @ 2020-06-15 15:32 xlsdg 阅读(163) 评论(0) 推荐(0)
摘要:1 sudo vi /etc/hosts 删除【127.0.0.1 iZj6cc8l39iqt55wrhckymZ】 阅读全文
posted @ 2020-06-15 15:30 xlsdg 阅读(291) 评论(0) 推荐(0)
摘要:LNMP下的错误需要在 /usr/local/php/etc/php-fpm.conf 里设置,加上 catch_workers_output = yes 错误信息就会记录到php-fpm.conf里error_log设置的文件里。或php-fpm.conf里加上php_admin_value[er 阅读全文
posted @ 2020-06-15 15:28 xlsdg 阅读(463) 评论(0) 推荐(0)
摘要:1 vi ~/.screenrc 1 # Define Encoding 2 defencoding UTF-8 3 encoding UTF-8 UTF-8 阅读全文
posted @ 2020-06-15 15:27 xlsdg 阅读(247) 评论(0) 推荐(0)
摘要:1 vi ~/.vimrc 1 set fileencodings=utf-8,gb2312,gb18030,gbk,ucs-bom,cp936,latin1 2 set enc=utf8 3 set fencs=utf8,gbk,gb2312,gb18030 阅读全文
posted @ 2020-06-15 15:26 xlsdg 阅读(166) 评论(0) 推荐(0)
摘要:1 sudo vi /etc/hostname 2 sudo vi /etc/hosts 3 sudo /etc/init.d/hostname.sh start 4 sudo reboot 阅读全文
posted @ 2020-06-15 15:24 xlsdg 阅读(188) 评论(0) 推荐(0)
摘要:1 sudo vi /etc/dhcp/dhclient-enter-hooks.d/nodnsupdate 1 #!/bin/sh 2 make_resolv_conf(){ 3 : 4 } 1 sudo chmod +x /etc/dhcp/dhclient-enter-hooks.d/nodn 阅读全文
posted @ 2020-06-15 15:23 xlsdg 阅读(461) 评论(0) 推荐(0)
摘要:1 $ vi /etc/resolv.conf nameserver 1.1.1.1nameserver 1.0.0.1nameserver 8.8.8.8nameserver 8.8.4.4 阅读全文
posted @ 2020-06-15 15:22 xlsdg 阅读(69) 评论(0) 推荐(0)
摘要:1 /* 2 3 Cross-Browser XMLHttpRequest v1.2 4 5 6 Emulate Gecko 'XMLHttpRequest()' functionality in IE and Opera. Opera requires 7 the Sun Java Runtime 阅读全文
posted @ 2020-06-11 11:53 xlsdg 阅读(72) 评论(0) 推荐(0)
摘要:1 <html> 2 3 <head> 4 <meta charset="utf-8"/> 5 <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1. 阅读全文
posted @ 2020-06-11 11:51 xlsdg 阅读(57) 评论(0) 推荐(0)
摘要:1 function procScroll(selector, xPercent, xCallback, yPercent, yCallback) { 2 var _isType = function(obj, type) { 3 return Object.prototype.toString.c 阅读全文
posted @ 2020-06-11 11:47 xlsdg 阅读(106) 评论(0) 推荐(0)
摘要:1 var delayRun = function(fn, interval) { 2 var timer = null; 3 return function() { 4 var that = this; 5 var args = Array.prototype.slice(arguments, 0 阅读全文
posted @ 2020-06-11 11:44 xlsdg 阅读(84) 评论(0) 推荐(0)
摘要:1 var fnCurry = function(fn) { 2 var _slice = Array.prototype.slice, 3 _args = slice.call(arguments, 1); 4 return function() { 5 return fn.apply(this, 阅读全文
posted @ 2020-06-11 11:42 xlsdg 阅读(205) 评论(0) 推荐(0)
摘要:1 var getSingleInstance = function(fn) { 2 var _instance = null; 3 return function() { 4 return _instance || (_instance = fn.apply(this, arguments)); 阅读全文
posted @ 2020-06-11 11:40 xlsdg 阅读(49) 评论(0) 推荐(0)
摘要:1 var first_script = document.getElementsByTagName('script')[0]; 2 first_script.parentNode.insertBefore(script, first_script); 3 4 // script 就是脚本元素。 阅读全文
posted @ 2020-06-11 11:37 xlsdg 阅读(48) 评论(0) 推荐(0)
摘要:1 //计算字符串长度(英文占1个字符,中文汉字占2个字符) 2 //方法一: 3 String.prototype.gblen = function() { 4 var len = 0; 5 for (var i = 0; i < this.length; i++) { 6 if (this.ch 阅读全文
posted @ 2020-06-11 11:34 xlsdg 阅读(510) 评论(0) 推荐(0)
摘要:1 /* requestAnimationFrame.js 2 * by zhangxinxu 2013-09-30 3 */ 4 (function() { 5 var lastTime = 0; 6 var vendors = ['webkit', 'moz', 'ms', 'o']; 7 fo 阅读全文
posted @ 2020-06-11 11:31 xlsdg 阅读(40) 评论(0) 推荐(0)
摘要:1 var hasOwnProperty = Object.prototype.hasOwnProperty 2 /** 3 * Check whether the object has the property. 4 * 5 * @param {Object} obj 6 * @param {St 阅读全文
posted @ 2020-06-11 11:29 xlsdg 阅读(51) 评论(0) 推荐(0)
摘要:1 function isPromise(obj) { 2 return !!obj && (typeof obj 'object' || typeof obj 'function') && typeof obj.then 'function'; 3 } 阅读全文
posted @ 2020-06-11 11:26 xlsdg 阅读(229) 评论(0) 推荐(0)
摘要:1 // 通用的Http 2 app.factory('servHttp', ['$http', function($http) { 3 return { 4 get: (url, data) = > { 5 return $http.get(url, { 6 params: data, 7 cac 阅读全文
posted @ 2020-06-11 11:23 xlsdg 阅读(110) 评论(0) 推荐(0)
摘要:1 var rand = (function() { 2 var seed = (new Date()).getTime(); 3 4 function r() { 5 seed = (seed * 9301 + 49297) % 233280; 6 return seed / (233280.0) 阅读全文
posted @ 2020-06-11 11:22 xlsdg 阅读(160) 评论(0) 推荐(0)
摘要:1 function length4UTF8String(s) { 2 var total = 0; 3 var charCode = null; 4 for (var i = 0, len = s.length; i < len; i++) { 5 charCode = s.charCodeAt( 阅读全文
posted @ 2020-06-11 11:20 xlsdg 阅读(135) 评论(0) 推荐(0)
摘要:1 //组合 2 3 function C(arr, num) { 4 var r = []; 5 (function f(t, a, n) { 6 if (n 0) { 7 return r.push(t); 8 } 9 for (var i = 0, l = a.length; i <= l - 阅读全文
posted @ 2020-06-11 11:18 xlsdg 阅读(127) 评论(0) 推荐(0)
摘要:1 /*! 2 * contentloaded.js 3 * 4 * Author: Diego Perini (diego.perini at gmail.com) 5 * Summary: cross-browser wrapper for DOMContentLoaded 6 * Update 阅读全文
posted @ 2020-06-11 11:17 xlsdg 阅读(138) 评论(0) 推荐(0)
摘要:1 <script> 2 document.addEventListener("DOMContentLoaded", function(event) { 3 console.log("DOM fully loaded and parsed"); 4 }); 5 </script> 阅读全文
posted @ 2020-06-11 11:16 xlsdg 阅读(1145) 评论(0) 推荐(0)
摘要:1 <script src="https://ajax.googleapis.com/ajax/libs/jquery/{{JQUERY_VERSION}}/jquery.min.js"></script> 2 3 <script>window.jQuery || document.write('< 阅读全文
posted @ 2020-06-11 11:14 xlsdg 阅读(203) 评论(0) 推荐(0)
摘要:1 function imgReporter(url) { 2 var _log = window['_imgLog'] || (window['_imgLog'] = {}), 3 _unique = (function() { 4 var time = (new Date()).getTime( 阅读全文
posted @ 2020-06-11 11:13 xlsdg 阅读(484) 评论(0) 推荐(0)
摘要:1 var $body = $('body'); 2 3 document.title = 'the title you want to set'; 4 5 var $iframe = $("<iframe style='display:none;' src='/favicon.ico'></ifr 阅读全文
posted @ 2020-06-11 11:12 xlsdg 阅读(130) 评论(0) 推荐(0)
摘要:1 .border-image-1px { 2 border-width: 1px 0px; 3 -webkit-border-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAECAYAAABP2FU6AAAACXBI 阅读全文
posted @ 2020-06-11 11:10 xlsdg 阅读(163) 评论(0) 推荐(0)
摘要:1 .fn-clear { 2 *zoom: 1; 3 } 4 5 .fn-clear:before, 6 .fn-clear:after { 7 content: ''; 8 display: table; 9 } 10 11 .fn-clear:after { 12 clear: both; 1 阅读全文
posted @ 2020-06-11 11:09 xlsdg 阅读(93) 评论(0) 推荐(0)
摘要:1 function handleMotionEvent() { 2 const speed = 4500; 3 let count = 0; 4 let startTime = new Date().getTime(); 5 let startAcceleration = { 6 x: 0, 7 阅读全文
posted @ 2020-06-11 11:07 xlsdg 阅读(121) 评论(0) 推荐(0)
摘要:1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <title>Document</title> 7 <style type="text/css"> 8 *, 9 *:before, 10 *:aft 阅读全文
posted @ 2020-06-11 11:04 xlsdg 阅读(75) 评论(0) 推荐(0)
摘要:1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <title>Document</title> 7 <style type="text/css"> 8 *, 9 *:before, 10 *:aft 阅读全文
posted @ 2020-06-11 11:03 xlsdg 阅读(18) 评论(0) 推荐(0)