wget --no-check-certificate https://raw.github.com/seebi/dircolors-solarized/master/dircolors.ansi-dark
mv dircolors.ansi-dark .dircolors
eval `dircolors ~/.dircolors`
git clone https://github.com/sigurdga/gnome-terminal-colors-solarized.git
cd gnome-terminal-colors-solarized
./set_dark.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Variations of Fizzbuzz in OCaml, translated from the Rust version in | |
"FizzBuzz Revisited" by Lindsey Kuper: | |
http://composition.al/blog/2013/03/02/fizzbuzz-revisited/ *) | |
(* The FizzBuzz test proposed by Imran Ghory: | |
http://imranontech.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/ *) | |
(* and made famous by Jeff Atwood: | |
http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html *) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This code is editable and runnable! | |
fn main() { | |
// A simple integer calculator: | |
// `+` or `-` means add or subtract by 1 | |
// `*` or `/` means multiply or divide by 2 | |
let program = "+ + * - /"; | |
let mut accumulator = 0; | |
for token in program.chars() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let player_scores = [ | |
("Jack", 20), ("Jane", 23), ("Jill", 18), ("John", 19), | |
]; | |
let players = player_scores | |
.iter() | |
.map(|&(player, _score)| { | |
player | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let mut teams = [ | |
[ ("Jack", 20), ("Jane", 23), ("Jill", 18), ("John", 19), ], | |
[ ("Bill", 17), ("Brenda", 16), ("Brad", 18), ("Barbara", 17), ] | |
]; | |
let teams_in_score_order = teams | |
.iter_mut() | |
.map(|team| { | |
team.sort_by(|&a, &b| a.1.cmp(&b.1)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH RECURSIVE | |
x(i) AS ( VALUES (0) | |
UNION ALL SELECT i + 1 | |
FROM x | |
WHERE i < 101), | |
Z(Ix, Iy, Cx, Cy, X, Y, I) AS ( | |
SELECT | |
Ix, | |
Iy, | |
X :: FLOAT, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var child_process = require('child_process'); | |
exports.handler = function(event, context) { | |
var proc = spawn('./test', [ JSON.stringify(event) ], { stdio: 'inherit' }); | |
proc.on('close', function(code){ | |
if(code !== 0) { | |
return context.done(new Error("Process exited with non-zero status code")); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; echowuhao's solution to Intro to Vectors | |
;; https://4clojure.com/problem/6 | |
:a :b :c |
OlderNewer