Skip to content

Instantly share code, notes, and snippets.

View leecade's full-sized avatar
🎯
Focusing

斯人 leecade

🎯
Focusing
View GitHub Profile
@leecade
leecade / fs_trie.rs
Created February 28, 2024 13:53 — forked from sevagh/fs_trie.rs
Rust trie that serializes to filesystem
//! # A trie that can be saved to and loaded from a file
//!
//! This crate implements a Trie with char keys.
//! The trie can be saved to and loaded from a file on the local filesystem.
//! This allows the user to persist the trie between executions.
//!
//! Basic example:
//!
//! ```ignore
//! let trie_file = "/path/to/trie-file";
@leecade
leecade / 10.11_troubleshooting.md
Last active October 1, 2023 12:07
10.11_troubleshooting
@leecade
leecade / 0-intro.md
Created May 17, 2017 19:53 — forked from revolunet/0-raspi-cheatsheet-intro.md
Raspberry PI 3 cheat sheet
@leecade
leecade / Samsung Browser
Created May 24, 2017 22:35 — forked from NielsLeenheer/Samsung Browser
Samsung Browser
Note: Some older devices such as the Galaxy S III did not get the Chromium based browser with
the update to Android 4.2 or later. When Samsung later introduced the Galaxy S3 Neo it did get
the new browser.
Note: With the Android 4.3 release and version 1.5 of the Chromium browser, Samsung did not
enable WebAudio API for the Note 3. All other devices did get the WebAudio API.
Note: Samsung did not update the browser version with the upgrade from Android 4.3 to 4.4,
but did add getUserMedia and WebRTC functionality.
@leecade
leecade / signature.js
Created July 3, 2019 15:31
simple signature with node-crypto api
const crypto = require('crypto')
const sign = (value, secret) => {
return value + '.' + crypto
.createHmac('sha256', secret + '')
.update(value + '')
.digest('base64')
.replace(/\=+$/, '')
}
@leecade
leecade / export-syntax.js
Created May 9, 2020 05:44 — forked from caridy/export-syntax.js
ES6 Module Syntax Table
// default exports
export default 42;
export default {};
export default [];
export default foo;
export default function () {}
export default class {}
export default function foo () {}
export default class foo {}
@leecade
leecade / tutorial.md
Created July 23, 2018 02:58 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

@leecade
leecade / toggle_frontmost.scpt
Created March 17, 2013 17:55
toggle app frontmost with applescript
on alfred_script(q)
--todo: Record the last open position
set appName to "Finder"
set startIt to false
tell application "System Events"
if not (exists process appName) then
set startIt to true
else if frontmost of process appName then
set visible of process appName to false
else
@leecade
leecade / safari-get-html.js
Created June 5, 2012 17:21 — forked from subtleGradient/safari-get-html.js
Node.js JavaScript for Mac OS X. Uses osascript AppleScript to control Safari. Remote control Safari from the terminal!
#!/usr/bin/env node #// -*- Mode: Node.js JavaScript; tab-width: 4; -*-
/*
---
url: http://gist.github.com/441101
name : safari-get-html
description : safari-get-html will rock your socks!
authors : Thomas Aylott
copyright : © 2010 Thomas Aylott
license : MIT
@leecade
leecade / recommended.yaml
Last active August 28, 2019 08:08
kubernetes-dashboard v2.0.0-beta3