- You need to have the latest version of Node. Preferably, you're using 9.8.0, but the latest LTS should work as well.
- You should have
npx
installed usingnpm install -g npx
. - Install the React Developer Tools.
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
{ pkgs, config, ... }: | |
{ | |
imports = [ | |
<nixpkgs/nixos/modules/profiles/headless.nix> | |
]; | |
# Enable sudo logins if the user's SSH agent provides a key | |
# present in <filename>~/.ssh/authorized_keys</filename>. | |
# This allows machines to exclusively use SSH keys instead of | |
# passwords. |
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
/* | |
* RedEyes generates rich descriptions of the API, as well as valid examples for | |
* all parameters (in this case, example header, query parameter, and content). | |
* | |
* The API can also be used to generate client libraries in a variety of languages. | |
* | |
* Service handlers are strongly-typed (e.g. retrieveEmployees expects an integer | |
* and a ModelDesc). Any errors in using the API automatically generate rich | |
* descriptions on what was expected. | |
*/ |
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
// Zip together a couple Futures, including one that returns an Option | |
// and pass them to a function to give me a new object: | |
api.channels.tree zip api.pages.getByRoute(route) map { | |
case (tree, Some(page)) => Some(new PagePresenter(context, tree, page)) | |
case _ => None | |
} | |
// Now with an Applicative Functor! | |
(api.channels.tree |@| api.pages.getByRoute(route)) { |
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
CALL=${1:-"cabal build"} | |
$CALL | |
while inotifywait -qq -r -e modify .; do | |
echo '<><><><> Starting build <><><><>'; | |
echo `date`; | |
$CALL; | |
echo '<><><><> Done <><><><>'; | |
sleep 1 | |
done |
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
#!/usr/bin/env stap | |
global samples | |
global all_samples | |
global timestamp | |
probe process("node").mark("gc__start") | |
{ | |
timestamp = gettimeofday_us() | |
} |
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
#!/bin/bash | |
# herein we backup our indexes! this script should run at like 6pm or something, after logstash | |
# rotates to a new ES index and theres no new data coming in to the old one. we grab metadatas, | |
# compress the data files, create a restore script, and push it all up to S3. | |
TODAY=`date +"%Y.%m.%d"` | |
INDEXNAME="logstash-$TODAY" # this had better match the index name in ES | |
INDEXDIR="/usr/local/elasticsearch/data/logstash/nodes/0/indices/" | |
BACKUPCMD="/usr/local/backupTools/s3cmd --config=/usr/local/backupTools/s3cfg put" | |
BACKUPDIR="/mnt/es-backups/" | |
YEARMONTH=`date +"%Y-%m"` |
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
name := "DES encryption in Scala" | |
version := "1.0" | |
scalaVersion := "2.9.1" | |
libraryDependencies += "commons-codec" % "commons-codec" % "1.6" |
NewerOlder