Skip to content

Instantly share code, notes, and snippets.

View micktaiwan's full-sized avatar
🏠
Working from home

Mickael Faivre-Maçon micktaiwan

🏠
Working from home
View GitHub Profile
@micktaiwan
micktaiwan / meteor_clean_cache.sh
Created April 11, 2019 22:58
Cleaning cache for Meteor applications
#!/usr/bin/env bash
files=`find -type d -name "bundler-cache" -o -name "node_modules" -o -name "isopacks" -o -name ".npm" -o -name "plugin-cache" -o -name "build" -o -name ".build*"`
echo
#echo "========== bundler-cache $(#files[*])"
for file in $files
do
if [ -e $file ]; then # because if we delete "node_modules", subdirectories "node_modules" could have already been deleted
echo `du -sh --total "$file"`
sudo rm -drf "$file"
fi
@micktaiwan
micktaiwan / GraphViz_width_problem.rb
Created July 3, 2011 06:32
Ruby code using GraphViz
# this is a Ruby comment
def graph_node(n, parent=nil, depth=0)
#print n, " "
gn = @g.add_node(n.object_id.to_s, :label=>n.to_graphviz, :shape=>"Mrecord")
if parent
e = @g.add_edge(parent, gn)
end
if n == @current_pos_node
gn[:color] = "brown3"