This file contains hidden or 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
//Place your logic in some js function, e.g. check_current_user: | |
<script> | |
function check_current_user() { | |
BTSW.current_user(function(user){ | |
// replace the line below with your logic, e.g. if user then show or hide something | |
console.log("---- check_current_user : ", user); | |
}) | |
} | |
</script> |
This file contains hidden or 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/python | |
import sys | |
import re | |
import pygeoip | |
# Note. Download GeoLite database from http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz and extract to /tmp dir | |
geoip_rawdata = pygeoip.GeoIP('/tmp/GeoLiteCity.dat') | |
def ipquery(ip): | |
data = geoip_rawdata.record_by_name(ip) |
This file contains hidden or 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 ruby | |
# usage: | |
# ruby depscanner.rb [path_to_project_dir] | |
# brew install graphviz / apt-get install graphviz (if graphviz is not installed yet) | |
# dot -Tpng dependencies.dot -o dependencies.png | |
$binaries = {} | |
$dependencies = {} |