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
import time | |
start = time.time() | |
from flask import Flask, request,send_file,make_response | |
import Image | |
import urllib2 as urllib | |
from StringIO import StringIO | |
import ImageOps | |
from flask import render_template | |
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 python | |
import urllib2 | |
from xml.dom import minidom | |
import os | |
import time | |
url_bing_service = 'http://www.bing.com/HPImageArchive.aspx?format=xml&idx=0&n=1&mkt=en-US' | |
url_image = '' | |
image_name = time.strftime("%d%m%Y") |
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
//From here: http://www.catonmat.net/http-proxy-in-nodejs/ | |
var http = require('http'); | |
http.createServer(function(request, response) { | |
var proxy = http.createClient(80, request.headers['host']) | |
var proxy_request = proxy.request(request.method, request.url, request.headers); | |
proxy_request.addListener('response', function (proxy_response) { | |
proxy_response.addListener('data', function(chunk) { | |
response.write(chunk, 'binary'); |
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
sleep 1500 && notify-send "take a break" && zenity --error --text "take a break"; sleep 300 && notify-send "back to work" && zenity --error --text "back to work" |
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
##################### MODELS.PY ########################### | |
from django.db import models | |
class Question(models.Model): | |
question_text = models.CharField(max_length=200) | |
pub_date = models.DateTimeField('date published') | |
def __str__(self): # __unicode__ on Python 2 | |
return self.question_text |
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
All autocomplete | |
AutoFileName | |
Angular JS | |
brackethighlighter | |
Docblockr | |
HTML-CSS-JS Prettify | |
Local History | |
Sidebarenhancements | |
SublimeLinter | |
SublimeLinter-jshint |
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
sudo apt-get install -y vlc build-essential aria2 arandr unp curl python-dev python-setuptools git libpq-dev libffi-dev | |
https://github.com/nvbn/thefuck | |
#java | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
https://packagecontrol.io/installation |
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
var gulp = require('gulp'); | |
replace = require('gulp-replace'); | |
connect = require('gulp-connect'); | |
gulp.task('hashReplace', function() { | |
gulp.src(['src/index.html']) | |
.pipe(replace('{{hash}}', guid())) | |
.pipe(gulp.dest('./')); | |
}); |
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
MacBooks-MacBook-Pro:lixo weslei$ ionic start cutePuppyPics --v2 | |
****************************************************** | |
Dependency warning - for the CLI to run correctly, | |
it is highly recommended to install/upgrade the following: | |
Install ios-sim to deploy iOS applications.`npm install -g ios-sim` (may require sudo) | |
Install ios-deploy to deploy iOS applications to devices. `npm install -g ios-deploy` (may require sudo) | |
****************************************************** | |
Creating Ionic app in folder /Users/weslei/lixo/cutePuppyPics based on tabs project |
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
node_modules/.bin/sequelize db:migrate | |
node_modules/.bin/sequelize model:create --name Todo --attributes "title:string, complete:boolean,UserId:integer" | |
------------- | |
https://github.com/hokaccha/node-jwt-simple | |
https://jwt.io/introduction/ | |
https://blog.jscrambler.com/implementing-jwt-using-passport/ | |
https://github.com/themikenicholson/passport-jwt | |
http://stackoverflow.com/questions/17397052/nodejs-passport-authentication-token?noredirect=1&lq=1 | |
http://stackoverflow.com/questions/20228572/passport-local-with-node-jwt-simple | |
http://mherman.org/ |
OlderNewer