Skip to content

Instantly share code, notes, and snippets.

View scips's full-sized avatar

Sébastien Barbieri scips

View GitHub Profile
#!/bin/bash
# count node
for i in `ls *brol*.xml`; do
xmllint --xpath 'count(//segmentation/segment)' ${i} >> temp.text;
echo " ${i}" >> temp.text;
done;
# concat multiple field matching some text
for i in `ls *LATROIS*xml`; do
xmllint --xpath 'concat(//maxEpisode[text()='0']/../titre/text(), "-", //maxEpisode[text()='0']/../genre/text())' ${i};
echo "";
@scips
scips / .bashrc
Created September 18, 2017 13:44
bashrc
export VISUAL=vim
export EDITOR="$VISUAL"
@scips
scips / ssh_tunnel.md
Created August 31, 2017 08:38
SSH Tunnel + Socks Proxy

SSH Tunnel

ssh -D 8123 -f -C -q -N <remoteuser@remotehost>

Proxy

Configure your Proxy Socks in the network settings of:

  • your browser
  • your DB Client

Keybase proof

I hereby claim:

  • I am scips on github.
  • I am scips (https://keybase.io/scips) on keybase.
  • I have a public key whose fingerprint is A627 C171 7037 41CE 3BD1 7FEF 2CCB 56FB 94A4 FC3F

To claim this, I am signing this object:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style>
#board {
border: 1px solid black;
}
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Small game to guess additions">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style>
.show {display: block}
.hide {display: none}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>WebVR tyout</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/aframe/0.3.1/aframe.min.js"></script>
</head>
<body>
<a-scene stats>
var googleItems = [];
if(_gaq_account) {
googleItems.push('Google Analytics: '+_gaq_account);
}
if(typeof ga === 'function') {
ga(function(){
var trackers = ga.getAll();
for (var i=0; i < trackers.length; ++i) {
var tracker = trackers[i];
googleItems.push("Analytics Universal: "+tracker.get('trackingId'));
@scips
scips / git prompt
Last active August 29, 2015 14:02 — forked from Moosh-be/README
# 1° sudo apt-get install git-core
# 2° dans .bashrc ajouter $(__git_ps1) dans le prompt, et setter quelques variables
export GIT_PS1_SHOWDIRTYSTATE=1 GIT_PS1_SHOWSTASHSTATE=1 GIT_PS1_SHOWUNTRACKEDFILES=1
export GIT_PS1_SHOWUPSTREAM=verbose GIT_PS1_DESCRIBE_STYLE=branch GIT_PS1_SHOWCOLORHINTS=1
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w$(__git_ps1) \[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(__git_ps1) \$ '
@scips
scips / generate_stop_motion.sh
Last active August 19, 2019 14:39
stop motion with image magick and ffmpeg
## Rename file
j=1;for i in `ls`; do prt=$(printf '%04d' $j);j=$((j + 1));echo "mv $i $prt.JPG"; mv $i "$prt.JPG"; done
## crop
mogrify -crop 1920x1080+362+628 *.jpg
## or resize
mogrify resize 1920x1080 *.jpg
## morph if necessary !!! takes time
convert *.jpg -delay 10 -morph 10 %05d.morph.jpg
## create movie
ffmpeg -r 25 -i %05d.morph.jpg output.mp4