Skip to content

Instantly share code, notes, and snippets.

View bobwei's full-sized avatar

Bob Wei bobwei

View GitHub Profile
#enable
heroku labs:enable user-env-compile --app projectxapp
heroku config:set CLEAN_VIRTUALENV=yes --app projectxapp
heroku config:set BUILDPACK_URL=https://github.com/bobwei/heroku-buildpack-python --app projectxapp
git push projectxapp working:master
#disable
heroku config:unset CLEAN_VIRTUALENV --app projectxapp
heroku labs:disable user-env-compile --app projectxapp
@bobwei
bobwei / subl_settings
Last active December 19, 2015 12:28
Bob's Sublime Text 2 settings
{
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
"font_size": 16,
"ignored_packages":
[
"Vintage"
],
"tab_size": 4,
"translate_tabs_to_spaces": true,
"word_wrap": false,
require.config({
paths: {
jquery: '../bower_components/jquery/jquery',
underscore: '../bower_components/underscore/underscore-min',
backbone: '../bower_components/backbone/backbone-min',
text: '../bower_components/requirejs-text/text',
bootstrap: 'vendor/bootstrap'
},
shim: {
bootstrap: {
find . -name "*.pyc" -exec rm -rf {} \;
@bobwei
bobwei / gist:7885891
Created December 10, 2013 04:53
python script to remove BOM in java files
import os, sys, codecs
for dirpath, dirnames, filenames in os.walk('./mosorder'):
# print dirpath, dirnames, filenames
print 'dirpath = {}'.format(dirpath)
for filename in filenames:
if not filename.find('.java') > 0:
continue
@bobwei
bobwei / bower.json
Created March 3, 2014 08:09
Bob's webapp packages
{
"name": "",
"version": "0.0.0",
"dependencies": {
"sass-bootstrap": "~3.0.0",
"requirejs": "~2.1.8",
"jquery": "~1.10.2",
"angular": "~1.2.6",
"angular-route": "~1.2.6",
"requirejs-text": "~2.0.10",
require.config({
paths: {
jquery: '../bower_components/jquery/jquery',
bootstrapAffix: '../bower_components/sass-bootstrap/js/affix',
bootstrapAlert: '../bower_components/sass-bootstrap/js/alert',
bootstrapButton: '../bower_components/sass-bootstrap/js/button',
bootstrapCarousel: '../bower_components/sass-bootstrap/js/carousel',
bootstrapCollapse: '../bower_components/sass-bootstrap/js/collapse',
bootstrapDropdown: '../bower_components/sass-bootstrap/js/dropdown',
bootstrapPopover: '../bower_components/sass-bootstrap/js/popover',
window.redirectTo = function(){
// android redirect
if (window.navigator.userAgent.match(/Android/)){
setTimeout(function() {
if (!document.webkitHidden){
window.location = 'https://play.google.com/store/apps/details?id=com.linkwish.onepiece';
}
}, 1000);
window.location = 'fb1393011827627092://';
(function(){
var newscript = document.createElement('script');
newscript.type = 'text/javascript';
newscript.async = true;
newscript.src = 'https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js';
(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(newscript);
})();