Skip to content

Instantly share code, notes, and snippets.

@addyosmani
addyosmani / LICENSE.txt
Created August 10, 2011 13:39 — forked from 140bytes/LICENSE.txt
140byt.es -- objectClone
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@atk
atk / LICENSE.txt
Created August 18, 2011 15:01 — forked from 140bytes/LICENSE.txt
checkMarkup - (X)HTML Markup check
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alex Kloss <alexthkloss@web.de>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@mattjmorrison
mattjmorrison / 0_install.sh
Created April 7, 2012 13:22
Python Dependency Management: Part 2
sudo pip install virtualenv
@mamantoha
mamantoha / app.rb
Created May 22, 2012 20:12
CarrierWave and DataMapper
# encoding: utf-8
require 'sinatra'
require 'slim'
require 'data_mapper'
require 'carrierwave'
require 'carrierwave/datamapper'
class ImageUploader < CarrierWave::Uploader::Base
@rozza
rozza / gist:2843451
Created May 31, 2012 13:33
Main.sublimeMenu
[
{
"id": "edit",
"children":
[
{
"id": "sublime_highlight",
"caption": "Highlight",
"children":
[
(function($){
var insertAtCaret = function(value) {
if (document.selection) { // IE
this.focus();
sel = document.selection.createRange();
sel.text = value;
this.focus();
}
else if (this.selectionStart || this.selectionStart == '0') {
var startPos = this.selectionStart;
(function($){
function dragEnter(e) {
$(e.target).addClass("dragOver");
e.stopPropagation();
e.preventDefault();
return false;
};
function dragOver(e) {
e.originalEvent.dataTransfer.dropEffect = "copy";

A Friendlier Approach for CSS Color Manipulation

By Chris Eppstein and Michael Parenteau

These ideas build on ones proposed by Tab Atkins but expand the concepts to apply to any color value, not just named colors.

They provide the full power of Sass's color system while preserving a more human-readable system when multiple transformations are applied because the arguments are closer to the operations.

@lg0
lg0 / gist:3481797
Last active October 9, 2015 09:37
解决 OSX 上原生 VPN (Cisco IPSec)每隔一小时要求输入密码的情况

解决方案来自:[Apple Support Communities] (https://discussions.apple.com/thread/3275811?start=0&tstart=0)

  1. 连接 VPN Cisco IPSec (让系统生成配置文件)
  2. 拷贝配置文件到/etc/racoon打开终端执行:
    $ sudo cp /var/run/racoon/xxx.xxx.xxx.xxx.conf /etc/racoon
  3. 修改 racoon 配置文件:
    $ sudo vim /etc/racoon/racoon.conf
  4. 将最后一行注释掉(目的是不使用系统生成配置):
    # include "/var/run/racoon/*.conf" ;
  5. 将下面一行添加到文件末尾,包含分号(使用定制的配置文件):
@fxsjy
fxsjy / gist:3550053
Created August 31, 2012 08:00
Bakup Weibo to Disk
package main
import (
"net/http"
"net/url"
"log"
"io/ioutil"
"regexp"
"fmt"
//"net/http/httputil"