Skip to content

Instantly share code, notes, and snippets.

@enyo
enyo / changelog.sh
Created July 3, 2013 13:04
Print changelog to use for Github releases. (Goes through all commits, and shows the one with a #changelog hashtag)
#!/bin/bash
#echo git log $1...$2 --pretty=format:'<li> <a href="http://github.com/jerel/<project>/commit/%H">view commit &bull;</a> %s</li> ' --reverse | grep "#changelog"
firstTag=$(git tag | tail -2 | head -1)
secondTag=$(git tag | tail -1)
cmd=$(basename $0)
if [ "$1" == "-h" ]
then
@chicoxyzzy
chicoxyzzy / results
Created January 19, 2017 01:21
Benchmarking for loops
Now using node v4.7.2 (npm v2.15.11)
// v8 4.5.103.43 (Node.js 4.7.2)
forVar_______: 2ms
forLet_______: 13ms
forOfVar_____: 66ms
forOfLetConst: 64ms
forEachVar___: 15ms
forEachLet___: 21ms
@GerHobbelt
GerHobbelt / remove_git_submodule.sh
Last active May 22, 2020 10:47 — forked from moyaldror/remove_git_submodule.sh
Complete remove of git submoule
#!/bin/bash
#
# Work repo: https://gist.github.com/GerHobbelt/5f084b559d3197c04e90dfd018a00ee6
#
# Sources:
# https://stackoverflow.com/a/16162000/1635910
# https://gist.github.com/myusuf3/7f645819ded92bda6677
# https://stackoverflow.com/questions/1260748/how-do-i-remove-a-submodule/1260982#1260982
#
if [ $# -ne 1 ]; then

Test LargeStructTest

Running cold

ZeroFormatter
   Serialize                      45 ms
   Deserialize                    40 ms
   Size                           32 bytes
   Total                          85 ms
@moyaldror
moyaldror / remove_git_submodule.sh
Last active August 3, 2021 04:51
Complete remove of git submoule
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: $0 <submodule full name>"
exit 1
fi
MODULE_NAME=$1
MODULE_NAME_FOR_SED=$(echo $MODULE_NAME | sed -e 's/\//\\\//g')
@stwalkerster
stwalkerster / sfnet2github.sh
Created May 17, 2011 17:18
SourceForge.net svn repo to github git repo import script

Licence (MIT Licence)

Copyright (c) 2011 Simon Walker

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

From Fabrice Bellard, with minor name change (umulh):

// return the high 32 bit part of the 64 bit addition of (hi0, lo0) and (hi1, lo1)
Math.iaddh(lo0, hi0, lo1, hi1)

// return the high 32 bit part of the 64 bit subtraction of (hi0, lo0) and (hi1, lo1)
Math.isubh(lo0, hi0, lo1, hi1)

// return the high 32 bit part of the signed 64 bit product of the 32 bit numbers a and b

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPad

Consumer key: CjulERsDeqhhjSme66ECg

@yckart
yckart / jquery.addrule.js
Last active December 29, 2022 12:16
Add css-rules to an existing stylesheet - http://stackoverflow.com/a/16507264/1250044
/*!
* jquery.addrule.js 0.0.2 - https://gist.github.com/yckart/5563717/
* Add css-rules to an existing stylesheet.
*
* @see http://stackoverflow.com/a/16507264/1250044
*
* Copyright (c) 2013 Yannick Albert (http://yckart.com)
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php).
* 2013/11/23
**/