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 | |
# Script to enable oplog tailing in a production meteor deployment using mongodb 4.0 or later | |
echo "# Enabling replication, required for oplog tailing" >> /etc/mongod.conf | |
echo "replication:" >> /etc/mongod.conf | |
echo " oplogSizeMB: 100" >> /etc/mongod.conf | |
echo " replSetName: rs0" >> /etc/mongod.conf | |
systemctl restart mongod |
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 | |
# Simple script to setup your machine env to use a remote ROS master | |
# example usage: use_robot.sh myrobot | |
# where myrobot is a resolvable hostname or an IP address | |
NORMAL=`tput sgr0 2> /dev/null` | |
GREEN=`tput setaf 2 2> /dev/null` | |
# get the IP of our device we'll use to conect to the host |
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 | |
# Given a github url for a corvoda plugin, such as | |
# | |
# https://api.github.com/repos/cordova-sms/cordova-sms-plugin/ | |
# | |
# this node.js script will generate the appropriate format for "meteor | |
# add" using the last commit for the tarball and pass it to meteor add. | |
# For instance, for the above: | |
# |
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
meteor list | grep ^[a-z] | tr -s ' ' | cut -d ' ' -f1,2 | tr -d '\*\+' | tr ':' '_' \ | |
| while read X Y; do \ | |
cat ~/.meteor/packages/$X/$Y/web.browser.json \ | |
| xargs -0 node -e "X = JSON.parse(process.argv[1]); \ | |
X.uses.forEach(function(d) { \ | |
console.log(\"$X\", \"$Y\", d.package, d.constraint); \ | |
})"; \ | |
done | sort |
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 | |
# explore a JSON file in node.js | |
# run: seejson.sh file.json | |
# then look at "json" in the opening node shell | |
node -e "json = require(\"./$1\"); repl = require(\"repl\").start(\"> \"); console.log(\"loaded... see json\");" |
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
/* | |
(MIT License) | |
Copyright (c) 2012 Christian Fritz | |
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, |
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 | |
BLACK="\033[30m" | |
RED="\033[31m" | |
GREEN="\033[32m" | |
YELLOW="\033[33m" | |
BLUE="\033[34m" | |
PINK="\033[35m" | |
CYAN="\033[36m" | |
WHITE="\033[37m" |
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
%% /** --------------------------------------------------------- | |
%% a file full of squeezing options | |
%% -- which you should try to avoid | |
%% ------------------------------------------------------------- | |
%% | |
%% from: | |
%% http://www.eng.cam.ac.uk/help/tpl/textprocessing/squeeze.html | |
%% ---------------------------------------------------------- */ | |
%% * Page Layout | |
%% o \columnsep: gap between columns |
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
/* | |
(MIT License) | |
Copyright (c) 2012 Christian Fritz | |
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, |
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 | |
# ---------------------------------------------------------------------- | |
# This shell script produces the latex source-package of a paper | |
# as required by AAAI, in preparation for printed proceedings. | |
# Copyright (C) 2009 Christian Fritz "fritz at cs dot toronto dot | |
# edu" | |
# | |
# I thank Jorge Baier for his contributions and Shirin Sohrabi for her | |
# feedback that has lead to improvements to the script. Thanks also |