Skip to content

Instantly share code, notes, and snippets.

View Desgard's full-sized avatar
:shipit:
Web3 time!

Gua Desgard

:shipit:
Web3 time!
View GitHub Profile
@puttin
puttin / reveal_build_phase.sh
Last active September 18, 2019 13:40
Reveal App build phase
#!/bin/bash
# see also http://support.revealapp.com/kb/getting-started/load-the-reveal-server-via-an-xcode-breakpoint
# remove Debug check; change framework path; simplify
# find original one in Reveal.app
set -e
REVEAL_APP_PATH=$(mdfind kMDItemCFBundleIdentifier="com.ittybittyapps.Reveal2" | sort | head -n 1)
[ ! -e "${REVEAL_APP_PATH}" ] && echo "warning: Reveal Server not loaded: Cannot find a compatible Reveal app." && exit 0
echo "Found Reveal at ${REVEAL_APP_PATH}"
var CryptoJS = require('crypto-js')
var request = require('request-promise')
/*
* npm install crypto-js request-promise request
* node wx_t1t_hack.js
*/
// export function testEncription(msg, fullKey) {
// var fullKey = fullKey.slice(0, 16)
@huytd
huytd / .gitconfig
Created August 4, 2016 16:26
Use neovim as diff tool
[merge]
tool = vimdiff
[mergetool]
prompt = true
[mergetool "vimdiff"]
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[difftool]
prompt = false
[diff]
tool = vimdiff
@JadenGeller
JadenGeller / Matrix Examples.swift
Last active August 10, 2023 10:03
Matrices in Swift
// Numerical matrix examples
let x: Matrix = [[10, 9, 8], [3, 2, 1]]
let y: Matrix = [[1, 2, 3], [4, 5, 6]]
let z: Matrix = [[1, 2], [3, 4], [5, 6]]
x + y // [[11, 11, 11], [7, 7, 7]]
x * y // [[10, 18, 24], [12, 10, 6]]
2 * x // [[20, 18, 16], [6, 4, 2]]
y ** z // [[22, 28], [49, 64]]
@ndarville
ndarville / diff.mdown
Created July 23, 2012 20:33
Paul Heckel's Diff Algorithm

[Isolating Differences Between Files][paper]

Advantage over Other Algorithms

The diff output is more specific:

[I]f a whole block of text is moved, then all of it, rather than just the beginning and end, is detected as changed.

>The algorithm described here avoids these difficulties. It detects differences that correspond very closely to our intuitive notion of difference.