Skip to content

Instantly share code, notes, and snippets.

View gist:e2f6f3c35103460629fae54a5cc97109
geraldstanje / rand_location.js
Last active Apr 14, 2017
generate random location (lat, long)
View rand_location.js
function getRandomCoordinates(radius, uniform) {
// Generate two random numbers
var a = Math.random(),
b = Math.random();
// Flip for more uniformity.
if (uniform) {
if (b < a) {
var c = b;
b = a;
View print4.html
%html{:lang => "en", "ng-app" => "myApp"}
%script{:src => ""}
%script{:src => ""}
%script{:src => ""}
%meta{:charset => "utf-8"}/
%title My AngularJS App
View gist:4e1d7c0d3f9b7f02350e,css,js,console,output
View gist:50ba6ce5fa872fb51b9a
geraldstanje / gist:6d51cbb84702bff4bb06
Last active Jan 18, 2016
get the max memory usage of an app
View gist:6d51cbb84702bff4bb06
# start the app:
while true; do ./main; sleep 0.1; done;
# monitor:
for i in {1..200};
x=`ps aux | grep -m1 main | awk '{print $6}'`;
if [ $x -gt $max ]; then
View gist:31d257581de0bff6e565
geraldstanje / gist:885782cc3f6570637ca9
Last active Oct 23, 2015
C++ performance tutorials / talks
View gist:885782cc3f6570637ca9
Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures":
Scott Meyers - The evolving search for effective C++ - Keynote @ Meeting C++ 2014:
Writing Quick Code in C++, Quickly:
View gist:c0782002c1f959aacec8
View gist:196225f2aef2bb0ca329
You can’t perform that action at this time.