Skip to content

Instantly share code, notes, and snippets.

imerkle imerkle

Block or report user

Report or block imerkle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@imerkle
imerkle / gist:5c8a39e05cbc08a1142f57e0fcbf3071
Created Apr 30, 2018 — forked from leonardo-m/gist:6e9315a57fe9caa893472c2935e9d589
A selection of 101 LINQ Samples converted to Rust
View gist:5c8a39e05cbc08a1142f57e0fcbf3071
// Port of the C# 101 LINQ Samples rewritten into Apple's Swift 3.
#![feature(ordering_chaining, step_by)]
fn main() {
// linq5: Where - Indexed
/*
//c#
public void Linq5()
{
View stars.js
(function() {
var COLORS, Confetti, NUM_CONFETTI, PI_2, canvas, confetti, context, drawCircle, i, range, resizeWindow, xpos;
NUM_CONFETTI = 350;
COLORS = [[85, 71, 106], [174, 61, 99], [219, 56, 83], [244, 92, 68], [248, 182, 70]];
PI_2 = 2 * Math.PI;
@imerkle
imerkle / theme.json
Last active Nov 2, 2017
Example theme.json for barterdex
View theme.json
{
"direction": "ltr",
"palette": {
"AppBg": "#fbbf40",
"AppSectionBg": "#FFF",
"AppSectionHeaderBg": "#175d42",
"RootColor": "#333",
"AppBgImageHeight": "660px",
"AppSectionTypoBg": "#f9f9f9",
"AppSectionTypoColor": "#868686",
@imerkle
imerkle / commandslinux.txt
Created Sep 7, 2017
important linux commands
View commandslinux.txt
fuser -k 8080/tcp
history -c && history -w
command &
ps -ef | grep something // show bg process
View csv.txt
function countSyllables(word)
{
var vowels = [ 'a', 'e', 'i', 'o', 'u', 'y' ];
var currentWord = word.match(/\S/g);
var numVowels = 0;
var lastWasVowel = false;
var sylabels = [];
var charset = "";
View cool.json
[{
"FIELD1": "System",
"FIELD2": "Region",
"FIELD3": "Pronunciation1_Syllables",
"FIELD4": "Pronunciation1",
"FIELD5": "Pronunciation2_Syllables",
"FIELD6": "Pronunciation2",
"FIELD7": "Pronunciation3_Syllables",
"FIELD8": "Pronunciation3"
},{"FIELD1":"Tanoo","FIELD2":"Derelik","FIELD3":"2","FIELD4":"ta-nu","FIELD5":"","FIELD6":"","FIELD7":"","FIELD8":""},{"FIELD1":"Lashesih","FIELD2":"Derelik","FIELD3":"3","FIELD4":"la-she-si","FIELD5":"","FIELD6":"","FIELD7":"","FIELD8":""},{"FIELD1":"Akpivem","FIELD2":"Derelik","FIELD3":"3","FIELD4":"ak-pi-ven","FIELD5":"","FIELD6":"","FIELD7":"","FIELD8":""},{"FIELD1":"Jark","FIELD2":"Derelik","FIELD3":"1","FIELD4":"jark","FIELD5":"","FIELD6":"","FIELD7":"","FIELD8":""},{"FIELD1":"Sasta","FIELD2":"Derelik","FIELD3":"2","FIELD4":"sas-ta","FIELD5":"","FIELD6":"","FIELD7":"","FIELD8":""},{"FIELD1":"Zaid","FIELD2":"Derelik","FIELD3":"1","FIELD4":"zeid","FIELD5":"","FIELD6":"","FIELD7":"","FIELD8":""},{"FIELD1":"Yuzier","FIELD2":"Derelik","FIELD3":"2",
View eve.json
[
{
"FIELD1": "Tanoo",
"FIELD2": "Derelik",
"FIELD3": "2",
"FIELD4": "ta-nu",
"FIELD5": "",
"FIELD6": "",
"FIELD7": "",
"FIELD8": ""
@imerkle
imerkle / thumbnail_test.json
Last active Aug 8, 2017
thumbnail preview test file
View thumbnail_test.json
{
"res" : [
{
"src": "https://i9.ytimg.com/sb/9FoW9PcxIAU/storyboard3_L1/M0.jpg?sigh=rs%24AOn4CLC1irgit83PPeEv4gotrypPNphf7A",
"x": 0,
"y": 0,
"w": 159,
"h": 89.5
},
{
@imerkle
imerkle / colorfromstring.txt
Created Jul 26, 2017
genarate color from string
View colorfromstring.txt
const getHashCode = str => {
let hash = 0;
for (let i = 0; i < str.length; i++) {
hash = str.charCodeAt(i) + ((hash << 5) - hash);
}
return hash;
};
const getHSL = (number, saturation, lightness) => {
var shortened = Math.abs(number % 360);
@imerkle
imerkle / annotest.json
Last active Jul 16, 2017
json of anootiation
View annotest.json
{
"res": [
{
"end": 10000,
"start": 4000,
"text": "4 to 10 seconds im show",
"style": {
"height": 200
}
},
You can’t perform that action at this time.