⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import os, time, random | |
from django.core.files.base import File | |
from django.core.files.storage import Storage | |
from django.conf import settings | |
from django.core.files import File | |
import sae.storage | |
try: | |
from cStringIO import StringIO | |
except ImportError: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo -n 250 > /sys/devices/platform/i8042/serio1/sensitivity | |
echo -n 120 > /sys/devices/platform/i8042/serio1/speed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*- coding: utf-8 -*- | |
from oauth2app.models import AccessRange | |
from oauth2app.authenticate import JSONAuthenticator, AuthenticationException | |
import functools | |
def decorator(decorator): | |
def func_wrapper(func): | |
def functor(*args, **kw): | |
functools.wraps(func)(decorator) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Demo | |
@filter: (func, args...) -> | |
console.log "hello" | |
(args...) -> | |
console.log this, "before filter", args | |
re = func.apply(this, args) | |
console.log "after filter", re.hi "ahahahha" | |
constructor: -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.1/processing-api.min.js"></script><html> | |
<!-- | |
Created using jsbin.com | |
Source can be edited via http://jsbin.com/pdfjs-helloworld-v2/8598/edit | |
--> | |
<body> | |
<canvas id="the-canvas" style="border:1px solid black"></canvas> | |
<input id='pdf' type='file'/> | |
<!-- Use latest PDF.js build from Github --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function distanceBetween(startPoint, endPoint) { | |
console.log(startPoint, endPoint) | |
let earthRadius = 6371.0 | |
let startRadians = [ | |
startPoint.latitude * Math.PI / 180, | |
startPoint.longitude * Math.PI / 180 | |
] | |
let endRadians = [ | |
endPoint.latitude * Math.PI / 180, |