gitflow | git |
---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
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
# How to generate a secret key with Python | |
# via http://flask.pocoo.org/docs/quickstart/ | |
import os | |
os.urandom(24) |
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
# SNAKES GAME | |
# Use ARROW KEYS to play, SPACE BAR for pausing/resuming and Esc Key for exiting | |
import curses | |
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN | |
from random import randint | |
curses.initscr() | |
win = curses.newwin(20, 60, 0, 0) |
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
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.xml with the following command: | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:4443 | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl |
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
""" | |
Author: Jonathan Cardasis | |
""" | |
import socket | |
import signal # Allow socket destruction on Ctrl+C | |
import sys | |
import time | |
import threading |
has to type javascript:
manually... (
copy to pc browser's address bar
javascript:f=function(){x=window.innerWidth*Math.random();y=window.innerWidth*Math.random();$('canvas').trigger(jQuery.Event("mousedown",{clientX:x,clientY:y})).trigger(jQuery.Event("mouseup", {clientX:x,clientY:y}))};setInterval(f,1500*Math.random());setInterval(f,1500*Math.random())
copy to mobile browser's address bar (a little bit difficult...
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 | |
// replace all UTC dates to local dates in pipe | |
// usage: docker logs -t container_name | docker-logs-localtime | |
// install: | |
// curl https://gist.githubusercontent.com/popstas/ffcf282492fd78389d1df2ab7f31052a/raw/505cdf97c6a1edbb10c3b2b64e1836e0627b87a0/docker-logs-localtime > /usr/local/bin/docker-logs-localtime && chmod +x /usr/local/bin/docker-logs-localtime | |
// alternative: https://github.com/HuangYingNing/docker-logs-localtime | |
const pad = d => (d > 9 ? d : '0' + d); |
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
我本想享受生活,结果发现活下来都很困难。 | |
你的计划,就像零食,吃到肚子里之后就是个屁。 | |
我已经不是那个花五十块钱,也要考虑很久的小孩了,现在五块钱都要深思熟虑。 | |
今天天气很好,在房间里宅久了,准备去客厅散散心。 | |
春节你要小心了,毕竟过年,都是要杀猪的。 | |
经过多年的打拼,虽然没有什么收获,但你有债呀! | |
人为什么叫人类,因为人活着就是累。 | |
说错话不要紧,你还会继续说错的。 | |
你倒下了,能顶替你的人千千万 | |
你获得了很多金钱,但同时也失去了很多东西,比如烦恼。 |
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
# How to oget an icon to easily open folder into IntelliJ from MacOs Finder | |
Use tools made with Automator (better, faster, stronger...) : | |
https://github.com/ludoo0d0a/open-in-buttons-for-finder-toolbar | |
:) | |
# Here is the old deprecated way : | |
(Multiple finder or multiple idea projects works badly) |
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
from flask import Flask | |
from flask_sqlalchemy import SQLAlchemy | |
import os | |
import graphene | |
from graphene_sqlalchemy import SQLAlchemyObjectType, SQLAlchemyConnectionField | |
from flask_graphql import GraphQLView | |
################################# | |
app = Flask(__name__) | |
app.debug = True |
OlderNewer