Skip to content

Instantly share code, notes, and snippets.

View jpcaruana's full-sized avatar

Jean-Philippe Caruana jpcaruana

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jpcaruana on github.
  • I am jpcaruana (https://keybase.io/jpcaruana) on keybase.
  • I have a public key ASCTsLIzUzxSFLe-fc0MPnb6aRNb9J4oU3mUSjXegW-wmQo

To claim this, I am signing this object:

@jpcaruana
jpcaruana / slocTags.sh
Created December 12, 2014 14:19
sloc over the tags
for tag in `git tag`
do
git co $tag
loc=`sloccount --duplicates --autogen --crossdups --wide --addlangall . | grep "Total Physical Source Lines of Code" | cut -d "=" -f2`
echo "$tag;$loc" >> tags.csv
done
@jpcaruana
jpcaruana / wp_import.sh
Created December 5, 2014 16:32
commande d'import wordpress -> jekyll
ruby -rubygems -e 'require "jekyll-import";
JekyllImport::Importers::WordPress.run({
"dbname" => "blog",
"user" => "votreUser",
"password" => "sonMotDePasseSecret",
"host" => "votreServeur.com",
"table_prefix" => "wp_",
"clean_entities" => true,
"comments" => true,
"categories" => true,
@jpcaruana
jpcaruana / load.txt
Created December 2, 2014 15:06
load for dummies
If load average < number of cores, then the machine is not loaded
If load average == number of cores, then the machine is in full use
If load average >= 4X number of cores, then the machine is highly loaded
If load average >= around 40X number of cores, then the machine is unusable
from http://www.infoq.com/articles/Tuning-Java-Servers
@jpcaruana
jpcaruana / stack.log
Created December 1, 2014 10:57
GCS connector stack trace
2014-11-28 16:59:47,748 (hdfs-hdfs_sink-call-runner-0) [INFO - com.google.cloud.hadoop.util.LogUtil.info(LogUtil.java:142)] GHFS version: 1.3.0-hadoop2
2014-11-28 16:59:50,014 (SinkRunner-PollingRunner-DefaultSinkProcessor) [ERROR - org.apache.flume.sink.hdfs.HDFSEventSink.process(HDFSEventSink.java:467)] process failed
java.lang.OutOfMemoryError: Java heap space
at java.io.BufferedOutputStream.<init>(BufferedOutputStream.java:76)
at com.google.cloud.hadoop.fs.gcs.GoogleHadoopOutputStream.<init>(GoogleHadoopOutputStream.java:79)
at com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystemBase.create(GoogleHadoopFileSystemBase.java:820)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:906)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:887)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:784)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:773)
@jpcaruana
jpcaruana / openMySqlPort.sh
Created October 20, 2014 09:54
ouvrir port mysql
-A INPUT -p tcp -m tcp -s VOTRE_IP --dport VOTRE_PORT_MYSQL -j ACCEPT
@jpcaruana
jpcaruana / install_jekyll_migrate.sh
Created October 20, 2014 09:38
install_jekyll_migrate
gem install jekyll-import
gem install mysql
gem install mysql2
gem install sequel
gem install unidecode
@jpcaruana
jpcaruana / jekyll_draft.sh
Created October 20, 2014 09:28
jekyll draft
jekyll serve --drafts --watch
@jpcaruana
jpcaruana / jekyll.md
Created October 20, 2014 09:19
minimum pour article dans jekyll

layout: post title: JP

Ici, le contenu de votre article, dans votre format préféré

@jpcaruana
jpcaruana / install.sh
Created October 9, 2014 18:26
jekyll install
gem install jekyll
jekyll new barreverte.github.io
cd barreverte.github.io