Skip to content

Instantly share code, notes, and snippets.

vincent suncn

Block or report user

Report or block suncn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View _Users_liys_.atom_packages_atom-live-server_node_modules_liver-server_index.js
var os=require('os'),
iptable={},
ifaces=os.networkInterfaces();
for (var dev in ifaces) {
ifaces[dev].forEach(function(details,alias){
if ((details.family=='IPv4') && (details.internal == false)) {
// iptable[dev+(alias?':'+alias:'')]=details.address;
iptable['localIP'] = details.address;
}
@suncn
suncn / css.less
Created Aug 21, 2017
吸顶效果 解决方案 #-webkit-sticky
View css.less
.position(@propVal: absolute){
position: @propVal;
left: 0;
right: 0;
top: 0;
}
.sticky{
.position(-webkit-sticky);
}
@suncn
suncn / method.md
Last active Aug 17, 2017
修改github仓库 #remote 关联
View method.md
  • 先删除后添加

    • git remote rm origin
    • git remote add origin [url]
  • 直接修改config文件

@suncn
suncn / history.md
Last active Aug 9, 2017
HTML5 history API #history
View history.md
@suncn
suncn / sample.js
Last active Aug 8, 2017
页面加载完成执行事件load
View sample.js
document.addEventListener("DOMContentLoaded", function() {
// ...代码...
}, false);
window.addEventListener("load", function() {
// ...代码...
}, false);
@suncn
suncn / sliderImg
Created Jul 25, 2017
css3实现的简单网页滚动
View sliderImg
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
* {
View gulpfile.js
'use strict';
const gulp = require('gulp'),
watch = require('gulp-watch'),
prefixer = require('gulp-autoprefixer'),
uglify = require('gulp-uglify'),
less = require('gulp-less'),
requirejsOptimize = require('gulp-requirejs-optimize'),
sourcemaps = require('gulp-sourcemaps'),
rigger = require('gulp-rigger'),
@suncn
suncn / Mac开机启动.md
Last active May 8, 2017
mac 设置开机启动项
View Mac开机启动.md
  1. 选择“系统偏好设置”中的“用户与群组”

  2. 选择“登陆项”选项卡

  3. 勾选不需要的开机启动项,然后点击“-”按钮删除

  4. 如果要增加开机启动项,点击“+”按钮,选择需要开自己启动的项目就行

View unfollow.js
// 1. Go to https://twitter.com/following.
// 2. Keep scrolling to the bottom repeatedly until all your followers are loaded.
// 3. Run this in your console.
[].slice.call(document.querySelectorAll('.unfollow-text')).forEach(function(button) {
button.click();
});
You can’t perform that action at this time.