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
import os | |
import re | |
#whatever filter you would like to apply | |
os.system('find * -type f | egrep -v ".svn" | egrep "\.(js|mustache|css|html|txt|less|sass|as|cfml|mxml)$" > /tmp/sourcefiles.txt') | |
with open('/tmp/sourcefiles.txt') as f: | |
files = f.read().strip().split("\n") | |
for file in files: |
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
import Image | |
import sys | |
import glob | |
# Trim all png images with alpha in a folder | |
# Usage "python PNGAlphaTrim.py ../someFolder" | |
try: | |
folderName = sys.argv[1] | |
except : |
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 | |
// Licence: WTFPL ! http://www.wtfpl.net/about/ | |
$fbAuth = array("facebook_id" => "123456789", "facebook_token" => "<Use charles proxy to do man-in-middle SSL sniffing and extract fb token>"); | |
// Do the magic. | |
$tinderToken = tinderCall("auth", "token", $fbAuth); // Authenticate | |
$authToken = "X-Auth-Token: $tinderToken\r\nAuthorization: Token token=\"$tinderToken\"\r\n"; |
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
/* | |
MIT Licence | |
Copyright © 2015 Noj Vek | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE |
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
// Usage: copy(dom2jade($0, 0)) | |
// copy copies to clipboard, $0 is selected elem in dev tools, 0 is pre-indent needed | |
// The beauty about this is that it lets the browser handle quirky html | |
const dom2jade = function(elem, numIndents = 0) { | |
const dom2tree = function(elem) { | |
let text; | |
if ((elem.nodeType === document.TEXT_NODE) && (elem.nodeValue.trim() !== "")) { | |
text = elem.nodeValue.trim(); |
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
// Watch for changes and auto-reload | |
// CSS changes get auto injected, js changes reload current page | |
var pollInterval = 2; // check every 2 seconds | |
var jsMap = {"powerbi.js":null, "powerbicommon.js":null}; | |
var cssMap = {"powerbi.css":null, "powerbicommon.css": null}; | |
function getLastModifiedTime(url, callback) { | |
$.ajax({ | |
type: "HEAD", // HEAD only gives headers, a lot faster | |
url: url, |
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
fs = require 'fs' | |
XXHash = require 'xxhash' | |
path = require 'path' | |
#dive = require 'dive' | |
HashStream = XXHash.Stream | |
c = console | |
startTime = Date.now() | |
mapFileName = 'pbix.json' | |
rootDir = '../pbix' |
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
fs = require 'fs' | |
readline = require 'readline' | |
path = require 'path' | |
c = console | |
### | |
# Helpers | |
### | |
parseCliForPath = -> |
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
sudo apt-get install ufw | |
sudo ufw default deny incoming | |
sudo ufw default allow outgoing | |
sudo ufw allow ssh | |
sudo ufw allow http | |
sudo ufw allow 9000 | |
sudo ufw allow 9001 | |
sudo ufw allow 9002 | |
sudo ufw status verbose | |
#sudo ufw enable |
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
{ | |
"air + air": "pressure", | |
"air + cloud": "sky", | |
"air + dinosaur": "pterodactyl", | |
"air + earth": "dust", | |
"air + egg": "bird", | |
"air + energy": "wind", | |
"air + fire": "energy", | |
"air + lava": "stone", | |
"air + life": "bird", |
OlderNewer