Skip to content

Instantly share code, notes, and snippets.

View Koubae's full-sized avatar
💥

Federico Bau Koubae

💥
View GitHub Profile
@Softwave
Softwave / README.md
Last active July 4, 2024 06:06
Fibonacci Program

Fib

Simple fibonacci number calculator.

Usage: fib nth Fibonacci number

Field JS

odoo.define('academy.field', (require) => {

    const registry = require('web.field_registry');
    const Widget = require('web.AbstractField');
  • repo -> repository

  • clone -> bring a repo down from the internet (remote repository like Github) to your local machine

  • add -> track your files and changes with Git

  • commit -> save your changes into Git

  • push -> push your changes to your remote repo on Github (or another website)

  • pull -> pull changes down from the remote repo to your local machine

  • status -> check to see which files are being tracked or need to be commited

  • init -> use this command inside of your project to turn it into a Git repository and start using Git with that codebase

# 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>
<!-- SECTION 3: LECTURE 16 -->
{% macro render_dict(dictionary) %}
<table>
<tr>
<th>name</th>
<th>value</th>
<th>comments</th>
@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)]
@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
@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.
@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)',
@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