Skip to content

Instantly share code, notes, and snippets.

View randomer's full-sized avatar
🍳
Omelette du Fromage

Rod randomer

🍳
Omelette du Fromage
View GitHub Profile
@jednano
jednano / gitcom.md
Last active September 21, 2024 23:12
Common git commands in a day-to-day workflow

Git Cheat Sheet

Initial Setup

Create an empty git repo or reinitialize an existing one

git init
@fightingtheboss
fightingtheboss / haproxy.cfg
Created June 23, 2013 01:17
HAProxy configuration file for deploying Meteor application to private VPN. Fronted by nginx for static assets, backed by multiple app instances. See https://gist.github.com/fightingtheboss/5843323 for Nginx setup.
global
daemon
defaults
mode http
timeout connect 86400000
timeout server 86400000
timeout client 86400000
timeout check 5s
@jfromaniello
jfromaniello / gist:8418116
Last active September 19, 2023 23:38
Example of authenticating websockets with JWTs.
var WebSocketServer = require('ws').Server;
var wss = new WebSocketServer({port: 8080});
var jwt = require('jsonwebtoken');
/**
The way I like to work with 'ws' is to convert everything to an event if possible.
**/
function toEvent (message) {
try {
@bucketh3ad
bucketh3ad / elm-runtime-global.js
Created June 1, 2014 00:05
Elm Runtime Global Wrapper
Elm = (function (){
//Begin elm-runtime.js
'use strict';
var Elm = ...
};
//End elm-runtime.js
Elm.MeteorHelpers = [A2,A3,A4,A5,A6,A7,A8,A9,F2,F3,F4,F5,F6,F7,F8,F9];
@staltz
staltz / introrx.md
Last active November 19, 2024 09:32
The introduction to Reactive Programming you've been missing
@rsperberg
rsperberg / essential-javascript-links.md
Last active October 5, 2022 17:10 — forked from ericelliott/essential-javascript-links.md
A fork that adds descriptions to Eric Elliott’s 142 essential JS links
@JaviLorbada
JaviLorbada / FRP iOS Learning resources.md
Last active June 17, 2024 06:08
The best FRP iOS resources.

Videos

@AliSoftware
AliSoftware / struct_vs_inheritance.swift
Last active October 14, 2024 16:44
Swift, Struct & Inheritance: How to balance the will of using Struct & Value Types and the need for Inheritance?
// #!Swift-1.1
import Foundation
// MARK: - (1) classes
// Solution 1:
// - Use classes instead of struct
// Issue: Violate the concept of moving model to the value layer
// http://realm.io/news/andy-matuschak-controlling-complexity/
@robertjpayne
robertjpayne / RCTSwiftBridgeModule.h
Last active January 17, 2024 11:43
React Native - Swift Native Modules
#import <Foundation/Foundation.h>
#import "RCTBridgeModule.h"
#define RCT_EXTERN_MODULE(objc_name, objc_supername) \
RCT_EXTERN_REMAP_MODULE(objc_name, objc_name, objc_supername)
#define RCT_EXTERN_REMAP_MODULE(js_name, objc_name, objc_supername) \
objc_name : objc_supername \
@end \
@interface objc_name (RCTExternModule) <RCTBridgeModule> \