Instantly share code, notes, and snippets.

View drive.scan.rb
#!/usr/bin/env ruby
require 'json'
# Position of the mounted drive
$SOURCE = "/Volumes/GoogleDrive/Il mio Drive"
# Destination of the json file
$DEST = "/tmp/result.json"
# Size for "too big" files
$XGB = 2
View compile.m
MEX_OPT = ['-I', '/usr/local/Cellar/boost/1.67.0_1/include'];
MEX_SRC = { ...
'menage_share.cpp', ...
'read_share.cpp', ...
'write_share.cpp' ...
for i = 1:length(MEX_SRC)
mex(MEX_OPT, MEX_SRC{i});
View goto.rb
#!/usr/bin/env ruby
require 'optparse'
def convert_to_path(f, is_file)
ret = f.gsub(/^([A-Z]):/) { |m| "/mnt/#{m[0].downcase}" }
ret = ret.gsub(/\\/, "/")
ret = ret + "/../" if is_file
return ret

Default Graphic Configuration


Check which is the startup file through the command:

which startup
View Procfile
web: node .
View pos.rb
#!/usr/bin/env ruby
# Reconstruct position
f = 0
for a in 0...25
for b in 0...25
next if b == a
for c in 0...25
View Makefile
CXX = g++
CXXFLAGS = --std=c++11 -g -I. -Wall
$(CXX) $(CXXFLAGS) main.cpp -o main
.PHONY: clean
rm -rf main
View state2_hash.json
"Alabama": "AL",
"Alaska": "AK",
"American Samoa": "AS",
"Arizona": "AZ",
"Arkansas": "AR",
"California": "CA",
"Colorado": "CO",
"Connecticut": "CT",
"Delaware": "DE",
View Evolutionary.tex
\tikzstyle{scale all}=[every node/.style={scale=#1}, scale=#1]
solution/.pic = {
View Trajectory.tex