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
# search for the keyword under the scope on devdocs.io or google if language is not supposedly supported | |
# | |
# how to use: bind the "help_for_word" command to a keyboard shortcut | |
# put your cursor on the language keyword, function, ... you want info on | |
# trigger the command via the shortcut > devdocs or google is opened on your browser | |
# | |
# code is mostly http://dom111.co.uk/files/sublime/plugins/help_for_word.py | |
# modified to use devdocs.io as the main doc website | |
import sublime | |
import sublime_plugin |
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
/** Sass mixins to position stuff with transforms when they're available with Modernizr and with usual position values otherwise | |
* | |
* instead of writing `bottom: 7px`, just write `@include bottom(7px)` | |
**/ | |
@mixin __position($pos, $value) { | |
html.no-csstransforms & { | |
#{$pos}: $value; | |
} | |
html.csstransforms & { | |
@if $pos == right or $pos == bottom { |
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
<?php | |
App::uses('Controller', 'Controller'); | |
class AppController extends Controller { | |
public $components = array( | |
'Auth' => array( | |
'authenticate' => array( | |
'FormValue' => array( | |
'field' => 'steam_id', | |
'userModel' => 'User' |
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
var casper = require('casper').create({ | |
verbose: true, | |
logLevel: "debug", | |
viewportSize: { width: 1378, height: 768 }, //for real, my screen is like everyone else's! | |
pageSettings: { | |
loadImages: false, | |
loadPlugins: false, | |
//I'm using Chrome, I SWEAR | |
userAgent: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36" | |
}, |
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
article { | |
border: none; | |
margin: 0 auto; | |
padding: 0; | |
} | |
.banner, .quotes, h1, .patron-count { | |
display: none; | |
} |
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
<?php | |
//server-side code where we save the given drawing in a PNG file | |
$img = filter_input(INPUT_POST, 'image', FILTER_SANITIZE_URL); | |
$name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING); | |
//see http://j-query.blogspot.fr/2011/02/save-base64-encoded-canvas-image-to-png.html | |
$img = str_replace(' ', '+', str_replace('data:image/png;base64,', '', $img)); | |
$data = base64_decode($img); |
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
.Tabs-tabs { | |
@extend .u-inlineList; | |
} | |
.Tabs-tab { | |
} | |
.Tabs-link { | |
&:hover, |
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(){ | |
var script = document.createElement("script"); | |
script.src = "https://rawgit.com/Leimi/122905f66682fb3c4927/raw/source.js"; | |
document.getElementsByTagName("head")[0].appendChild(script); | |
})(); |
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
#!/usr/bin/env python | |
#------------------------------------------------- | |
# file: twitcher.py | |
# author: Florian Ehmke | |
# description: dmenu for twitch streams | |
#------------------------------------------------- | |
import argparse | |
import requests | |
from subprocess import Popen, PIPE, STDOUT |
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
#!/usr/bin/env node | |
var fs = require('fs'); | |
var path = require('path'); | |
var sass = require('node-sass'); | |
var ENV = process.env.SASS_ENV || 'development'; | |
var file = 'variables.scss'; | |
//if in dev, directly pass file to sass | |
if (ENV === "development") { |
OlderNewer