Skip to content

Instantly share code, notes, and snippets.

View Koubae's full-sized avatar
💥

Federico Bau Koubae

💥
View GitHub Profile
@BenConstable
BenConstable / move-commits.sh
Created November 9, 2012 10:41
Move commits onto feature branch
#
# If, for example, you've accidentally made some commits to master
# that should be on a feature branch, this set of commands will
# move those commits over to a feature branch and reset master to
# where it should be both locally and on the remote.
#
# References:
#
# - http://stackoverflow.com/questions/1628563/move-recent-commit-to-a-new-branch
# - http://stackoverflow.com/questions/1377845/git-reset-hard-and-a-remote-repository
{% extends 'admin/master.html' %}
{% import 'admin/lib.html' as lib with context %}
{% block body %}
{% call lib.form_tag() %}
{{ lib.render_form_fields(form) }}
<input type="submit" />
{% endcall %}
{% endblock %}
@FrancesCoronel
FrancesCoronel / sampleREADME.md
Last active March 26, 2024 01:21
A sample README for all your GitHub projects.

Repository Title Goes Here

Frances Coronel

INSERT GRAPHIC HERE (include hyperlink in image)

Subtitle or Short Description Goes Here

ideally one sentence >

@greyli
greyli / app.py
Last active February 25, 2024 03:04
Photo upload and manage with Flask and Flask-Uploads (Multiple file upload support!).
# -*- coding: utf-8 -*-
import os
import uuid
from flask import Flask, render_template, redirect, url_for, request
from flask_uploads import UploadSet, configure_uploads, IMAGES, patch_request_class
from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileRequired, FileAllowed
from wtforms import SubmitField
@coco-napky
coco-napky / hyper.js
Created March 8, 2017 23:21
Hyper config for git bash in Windows
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
@boeserwolf
boeserwolf / release-zalgo.js
Created April 12, 2017 09:22
Demonstration of how to RELEASE ZALGO
/**
* Demonstration of how to RELEASE ZALGO
* @author Bastian Masanek (2017)
*/
let cache;
function releaseZalgo(cb) {
if (cache) {
// This is synchronous and execucted immediately.
@stewartadam
stewartadam / main.py
Last active March 5, 2024 16:02 — forked from gear11/main.py
Simple Python proxy server based on Flask and Requests with support for GET and POST requests.
"""
A simple proxy server, based on original by gear11:
https://gist.github.com/gear11/8006132
Modified from original to support both GET and POST, status code passthrough, header and form data passthrough.
Usage: http://hostname:port/p/(URL to be proxied, minus protocol)
For example: http://localhost:5000/p/www.google.com
"""
import re
@zhouchangxun
zhouchangxun / loadbalancer.py
Created July 5, 2018 08:06
a simple loadbalancer implemention with python.
import sys
import socket
import select
import random
from itertools import cycle
# dumb netcat server, short tcp connection
# $ ~ while true ; do nc -l 8888 < server1.html; done
# $ ~ while true ; do nc -l 9999 < server2.html; done
SERVER_POOL = [('10.157.0.238', 8888)]
<!-- SECTION 3: LECTURE 16 -->
{% macro render_dict(dictionary) %}
<table>
<tr>
<th>name</th>
<th>value</th>
<th>comments</th>
# HTML FOR SECTION 7: LECTURE 30 - SESSION OBJECT
# USE WITH THE PYTHON FILE PROVIDED
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>session info</title>
</head>
<body>