Skip to content

Instantly share code, notes, and snippets.

View binarygalwalkin's full-sized avatar
⚠️
“Profanity is the one language all programmers know best.” ― Anonymous

binarygalwalkin

⚠️
“Profanity is the one language all programmers know best.” ― Anonymous
View GitHub Profile
@lancevo
lancevo / nginxproxy.md
Created January 15, 2019 20:44 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@lucasmpavelski
lucasmpavelski / fibonacci_words.py
Created January 1, 2013 13:17
Little code for drawing fibonacci words with Python turtle, inspired by Richard Green's Google+ post: https://plus.google.com/101584889282878921052/posts/KSuUFJV6tyv Enjoy!
# -*- coding: utf-8 -*-
def fibonacci_word(n) :
if n < 0 :
return None
elif n == 0 :
return [1]
elif n == 1 :
return [0]
else :
import sys, os
import turtle as tt
screen = tt.Screen()
class Lsystem:
"Class to compile and draw lsystem with turtle"
def __init__(self, save_every_frame=False,
speed=0):
self.name = ''
@jgravois
jgravois / aphorisms.md
Last active April 10, 2019 00:22
Questionable career advice
@ibreakthecloud
ibreakthecloud / github-OAuth.php
Last active December 16, 2019 14:51
Complete PHP 7 code for Implementing OAuth via Github
<?php
session_start();
$code = $_GET['code'];
$url = 'https://github.com/login/oauth/access_token';
$client_id = 'xxxxxxxxxxxxxxxxxxxxxxx';
$client_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// echo $code;
$postdata = http_build_query(
require 'spec_helper'
describe GroupsController do
include SessionTestHelper
describe "GET 'show'" do
it "should load the group from the database" do
@the_group = Factory(:group)
Group.stub(:find_active_by_unique_name).with("london-developers").
and_return(@the_group)
@otuncelli
otuncelli / MessageBoxEx.cs
Last active April 3, 2024 08:30
Parent centered MessageBox dialog in C#
using System.Drawing;
using System.Runtime.InteropServices;
using System.Security;
using System.Threading.Tasks;
namespace System.Windows.Forms
{
using Point = Drawing.Point;
/// <summary>
@jgravois
jgravois / _webserver.md
Last active April 12, 2024 00:21
a simple guide for getting a local web server set up

Do I have a web server running?


having a web server turned on doesn't necessarily mean you are serving pages on the world wide web. its what allows you to load your own static files (.html, .js etc.) in a browser via http://.

if you're not sure whether or not you have a web server running, no problem! its easy to confirm.

what happens when you visit http://localhost/?

// Unity C# Cheat Sheet
// I made these examples for students with prior exerience working with C# and Unity.
// Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting
@itsmattsoria
itsmattsoria / gistfil1.textile
Last active April 22, 2024 12:37
Mac Terminal Cheat Sheet

SHORTCUTS

Key/Command Description
Tab Auto-complete files and folder names
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + U Clear the line before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + W Delete the word before the cursor
Ctrl + T Swap the last two characters before the cursor