Skip to content

Instantly share code, notes, and snippets.

View hudson-newey's full-sized avatar
😶‍🌫️
Whoops

Hudson Newey hudson-newey

😶‍🌫️
Whoops
View GitHub Profile
@sgillies
sgillies / geojson-spec-1.0
Created September 21, 2011 21:11
The GeoJSON Specification
================================
The GeoJSON Format Specification
================================
:Abstract:
GeoJSON is a geospatial data interchange format based on JavaScript Object
Notation (JSON).
:Authors:
Howard Butler (Hobu Inc.),
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 21, 2024 20:54
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@atruskie
atruskie / VisualStudioAttacher.cs
Last active November 20, 2023 14:55
A class for programmatically attaching Visual Studio to debug a process. It can be used to automatically attach Visual Studio to your process. It can dynamically attach any solution to any process.
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AutoAttachVs.cs" company="QutEcoacoustics">
// All code in this file and all associated files are the copyright and property of the QUT Ecoacoustics Research Group (formerly MQUTeR, and formerly QUT Bioacoustics Research Group).
// </copyright>
// <summary>
// Example taken from this gist.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
#if DEBUG
/**
CSS clearfix
The problem happens when a floated element is within a container box, that element does not automatically force the container’s height adjust to the floated element. When an element is floated, its parent no longer contains it because the float is removed from the flow. You can use 2 methods to fix it:
{clear: both;}
clearfix
Once you understand what is happening, use the method below to “clearfix” it.
@barrysteyn
barrysteyn / Base64Decode.c
Last active May 13, 2024 07:45
Base64 Encoding/Decoding with the OpenSSL c api
//Decodes Base64
#include <openssl/bio.h>
#include <openssl/evp.h>
#include <string.h>
#include <stdio.h>
int calcDecodeLength(const char* b64input) { //Calculates the length of a decoded base64 string
int len = strlen(b64input);
int padding = 0;
@ecowden
ecowden / jasmine-spy-mostRecentCall
Last active November 23, 2022 02:05
Use the Jasmine spy's mostRecentCall element to get the arguments of a test invocation
/*
* Let's say we have a collaborater with a 'show' function. The instance under test is going to invoke
* this function and pass two arguments: 'parameters' and a callback function. We often want to either
* do some inspection on the 'parameters' to make sure they're right, or invoke the callback to verify
* behavior after the callback, such as after an XHR returns.
*/
describe("someFunctionThatInvokesOurCollaborator", function () {
var instance,
TemplateResource;
@tonetheman
tonetheman / raytracer.js
Created June 25, 2013 03:32
javascript raytracer from typescript playground here http://www.typescriptlang.org/Playground/ this is the translated javascript that typescript pooped out
var Vector = (function () {
function Vector(x, y, z) {
this.x = x;
this.y = y;
this.z = z;
}
Vector.times = function (k, v) {
return new Vector(k * v.x, k * v.y, k * v.z);
};
@whizark
whizark / class-naming-convention.md
Last active April 23, 2024 06:25
HTML/CSS Class Naming Convention #html #css #sass
@JeffPaine
JeffPaine / i3-cheat-sheet.md
Last active July 10, 2024 12:38
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (alt by default)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
@adeekshith
adeekshith / .git-commit-template.txt
Last active July 15, 2024 16:40 — forked from Linell/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23