Skip to content

Instantly share code, notes, and snippets.

View techfort's full-sized avatar

Joe Minichino techfort

View GitHub Profile
@assafweinberg
assafweinberg / RelationalWrapper.js
Last active June 26, 2019 11:44
SQL Join with LokiJS
import loki from 'lokijs';
import _ from 'lodash';
class relationalWrapper {
constructor(dbName) {
this.db = new loki('dbName');
}
//Utility to strip loki meta data
_stripMetaData(obj) {
@Hypercubed
Hypercubed / .gitignore
Last active August 29, 2015 14:10
PowerArray vs....
node_modules/
@staltz
staltz / introrx.md
Last active June 26, 2024 10:24
The introduction to Reactive Programming you've been missing
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@sergiotapia
sergiotapia / md5-example.go
Last active December 5, 2023 03:53
Golang - How to hash a string using MD5.
import (
"crypto/md5"
"encoding/hex"
)
func GetMD5Hash(text string) string {
hasher := md5.New()
hasher.Write([]byte(text))
return hex.EncodeToString(hasher.Sum(nil))
}
@alicial
alicial / mock-service-example.js
Last active June 10, 2019 14:26
AngularJS: Setting up a mocked service to use in controller unit tests.
// Mocked Service
angular.module('mock.users', []).
factory('UserService', function($q) {
var userService = {};
userService.get = function() {
return {
id: 8888,
name: "test user"
}