Skip to content

Instantly share code, notes, and snippets.

View lotosbin's full-sized avatar
🏠
Working from home

bin^2 lotosbin

🏠
Working from home
View GitHub Profile
'use strict';
/**
* ui-ladda
*
* To use, simply use normal Ladda classes and attributes and pass a model to ui-ladda. You can
* use truthy or falsey values, or pass decimals from 0 to 1 to show the progress bar animation.
*
*
* @param uiLadda (mixed): Sets wether or not to show the ladda loading
大致流程:
建立一个 Gist 账户。
安装package control
也可以安装package control组件,然后直接在线安装:
按Ctrl+`调出console
粘贴以下代码到底部命令行并回车:
import urllib2,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read())
重启Sublime Text 2。
#!/bin/bash
# See for eg
# http://stackoverflow.com/questions/4526910/rename-a-git-submodule;
# an important point seems to be to avoiding the trailing '/' when
# calling 'add' in the new location.
# Also, note that the name ([submodule = "name"]) in the .gitmodules
# file can be anything; it's just used to map to the corresponding
# .git/config entry.
@lotosbin
lotosbin / hosts.ps1
Created December 20, 2012 15:08 — forked from markembling/hosts.ps1
#
# Powershell script for adding/removing/showing entries to the hosts file.
#
# Known limitations:
# - does not handle entries with comments afterwards ("<ip> <host> # comment")
#
$file = "$env:SystemRoot"+"\System32\drivers\etc\hosts"
function add-host([string]$filename, [string]$ip, [string]$hostname) {