Skip to content

Instantly share code, notes, and snippets.

View gyaresu's full-sized avatar

Gareth gyaresu

View GitHub Profile
@gyaresu
gyaresu / hack.sh
Created March 31, 2012 17:01 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@gyaresu
gyaresu / gist:2657161
Created May 11, 2012 02:41
Sum of primes under 2e6
var list = [];
var primes = [];
var start = 2e6;
var total = 0;
function range(x) {
for (i=2; i<=x; i++) {
list.push(i);
}
}
@gyaresu
gyaresu / hackerchallenge2-spacex.js
Created July 28, 2012 22:46 — forked from mediaupstream/hackerchallenge2-spacex.js
HackerRank.com Challenge #2 (SpaceX) Solution in NodeJS
//
// HackerRank.com Challenge #2 (SpaceX Challenge)
// @hacker mediaupstream, aka Derek Anderson
//
// How to Win:
// 1. Install required npm packages: `npm install request sugar`
// 2. Modify the `username` and `password` variables below to match what you used to signup on
// hackerrank.com with
// 3. Run the script: `$ node hackerchallenge2-spacex.js`
// 4. Wait for about 40 minutes...
@gyaresu
gyaresu / gist:3233706
Created August 2, 2012 04:51 — forked from timf/gist:979708
diskspace alias
alias duf='du -sk * | sort -nr | perl -ne '\''($s,$f)=split(m{\t});for (qw(K M G)) {if($s<1024) {printf("%.1f",$s);print "$_\t$f"; last};$s=$s/1024}'\'''
gyaresu@shazbot:~/programming/projects/gnuradio/build|master⚡
⇒ ctest -R qa_volk_test_all -VV
UpdateCTestConfiguration from :/Users/gyaresu/programming/projects/gnuradio/build/DartConfiguration.tcl
UpdateCTestConfiguration from :/Users/gyaresu/programming/projects/gnuradio/build/DartConfiguration.tcl
Test project /Users/gyaresu/programming/projects/gnuradio/build
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
Checking test dependency graph end
test 1

Keybase proof

I hereby claim:

  • I am gyaresu on github.
  • I am gyaresu (https://keybase.io/gyaresu) on keybase.
  • I have a public key whose fingerprint is 52FA 187A 4E78 36B6 2207 B672 75F7 0A5D 623A 7EE6

To claim this, I am signing this object:

/*
* Sorting Dictionaries - https://codewars.com
*
* Python dictionaries are inherently unsorted. So what do you do if you need to sort the contents of a dictionary.
*
* In this kata you will create a function that returns a sorted list of (key, value) tuples (Javascript: arrays of 2 items).
*
* The list must be sorted by the value and be sorted largest to smallest.
*
* sortDict({3:1,2:2,1:3}) == [[1,3],[2,2],[3,1]]
<!DOCTYPE html>
<head>
<link href='https://fonts.googleapis.com/css?family=Poller+One' rel='stylesheet' type='text/css'>
<script src="/assets/jquery.js"></script>
<style>
.robot {
position: relative;
left: 200px;
" text, tab and indent set expandtab
"set softtabstop=4 " makes the spaces feel like real tabs
set smarttab
set shiftwidth=2
set tabstop=2
set lbr
set tw=500
set ai "Auto indent
set si "Smart indent
set wrap "Wrap lines
{
"plugins": [
"react"
],
"ecmaFeatures": {
"jsx": true
},
// I want to use babel-eslint for parsing!
"parser": "babel-eslint",
"env": {