Skip to content

Instantly share code, notes, and snippets.

View loo2k's full-sized avatar
🎯
Focusing

Luke loo2k

🎯
Focusing
View GitHub Profile
@alswl
alswl / hosts
Last active November 12, 2023 11:17
(deprecated, I bought xiaomi VIP)hosts for OpenWRT, for disable AD in xiaomi TV
127.0.0.1 api.ad.xiaomi.com
127.0.0.1 sdkconfig.ad.xiaomi.com
127.0.0.1 ad.mi.com
127.0.0.1 ad.xiaomi.com
127.0.0.1 ad1.xiaomi.com
127.0.0.1 adv.sec.miui.com
127.0.0.1 test.ad.xiaomi.com
127.0.0.1 new.api.ad.xiaomi.com
@kxxoling
kxxoling / dropbox-scss-css-style-guide.md
Last active March 17, 2020 10:10
Dropbox (S)CSS 样式指南中文翻译

Dropbox (S)CSS 样式指南翻译

开源许可

“Every line of code should appear to be written by a single person, no matter the number of contributors.” —@mdo

通用部分

反例

  • 避免在 CSS 使用 HTML 标签选择器
@parmentf
parmentf / GitCommitEmoji.md
Last active June 14, 2024 14:09
Git Commit message Emoji
@wong2
wong2 / cmds.txt
Last active May 2, 2021 12:13
在任意聊天中输入。 [ ]表示后面要跟一个空格(可能还需要别的参数才能生效)
//wearversion
//wearlog
//wearvoiceinputenable
//wearvoiceinputdisable
//weargoogleapi
//assert
//pushassert
//uplog
//upcrash
//switchnotificationstatus
@kejun
kejun / gist:72112e5848f5e3921b0d
Created March 7, 2015 12:14
react + linear partition算法实现的图墙布局
var React = require('react');
var EventListener = require('react/lib/EventListener');
var partition = require('linear-partitioning');
var TileLayout = React.createClass({
getDefaultProps: function() {
return {
gutter: 0,
photos: []
}
@sofish
sofish / error.js
Created November 1, 2014 09:05
Error
{"status":"error","error":{"msg":"\u6b64\u997f\u5355\u5df2\u6295\u8bc9","code":23}}
@fireblue
fireblue / ocserv-cent-os-7.sh
Created September 28, 2014 08:46
ocserv(Cisco AnyConnect 兼容服务端) 一键安装脚本 for CentOS 7
#!/bin/bash
####################################################
# #
# This is a ocserv installation for CentOS 7 #
# Version: 1.1.1 20140803 #
# Author: Travis Lee #
# Website: http://www.stunnel.info #
# #
####################################################
@antonioOrtiz
antonioOrtiz / gulpfile.js
Last active February 4, 2018 18:44
My first gulp file!
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
gulpif = require('gulp-if'),
usemin = require('gulp-usemin'),
uglify = require('gulp-uglify'),
gutil = require('gulp-util'),
concat = require('gulp-concat'),
plumber = require('gulp-plumber'),
browserify = require('gulp-browserify'),
minifyHTML = require('gulp-minify-html'),
@sofish
sofish / sort.js
Created August 7, 2013 03:21
safari 不能用 true / false 来做排序
// firefox 和 chrome 是 [1024, 6, 5, 3, 2, 1]
// safari 中顺序没变
[1,3,2,5,6,1024].sort(function(a, b) {
return b > a;
});
// 在各中浏览器工作一致的方法
// 用正负和零来排序,而不是 true/false
[1,3,2,5,6,1024].sort(function(a, b) {
@davidtheclark
davidtheclark / isElementInViewport.js
Created May 4, 2013 02:00
JavaScript: Is element in viewport?
/*
No jQuery necessary.
Thanks to Dan's StackOverflow answer for this:
http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport
*/
function isElementInViewport(el) {
var rect = el.getBoundingClientRect();
return (
rect.top >= 0 &&