Skip to content

Instantly share code, notes, and snippets.

@gotakk
gotakk / README.md
Last active August 28, 2015 13:53 — forked from Remiii/README.md
Hubot MamaCake (Paris 18e)
@gotakk
gotakk / source_code_pro_font_install.sh
Created April 3, 2015 15:01
Bash script to install source code pro font (edited by Adobe) in Ubuntu
#!/bin/bash
FONT_NAME="SourceCodePro"
URL="https://github.com/adobe-fonts/source-code-pro/archive/1.017R.tar.gz"
mkdir /tmp/$FONT_NAME
cd /tmp/$FONT_NAME
wget $URL -O "`echo $FONT_NAME`.tar.gz"
tar --extract --gzip --file ${FONT_NAME}.tar.gz
sudo mkdir /usr/share/fonts/truetype/$FONT_NAME
sudo cp -rf /tmp/$FONT_NAME/. /usr/share/fonts/truetype/$FONT_NAME/.

Hello noob, tu en a marres d'avoir l'erreur

Not enough random bytes available.  Please do some other work to give
the OS a chance to collect more entropy! (Need X more bytes)

lorsque tu essayes de générer une clé gpg ? Ce tuto est fait pour toi !

  1. Installer les paquets nécessaires

It's still a work in progress...

Intro

As William Durand was recently explaining in his SOS, he "didn't see any other interesting blog post about REST with Symfony recently unfortunately". After spending some long hours to implement an API strongly secured with oAuth, I thought it was time for me to purpose my simple explanation of how to do it.

Ok, you know the bundles

You might have already seen some good explanation of how to easily create a REST API with Symfony2. There are famous really good bundles a.k.a. :

@gotakk
gotakk / README.md
Last active August 29, 2015 14:16 — forked from Remiii/README.md

GENERATING A REFRESH TOKEN

STEP 1

  • Go to http://cloud.google.com/console and log-in
    • Activate youtube-data API (APIs & auth -> APIs)
    • Register a new app (APIs & auth -> registered apps)
  • Name it, select native
@gotakk
gotakk / readline.php
Created March 6, 2015 11:07
little reimplementation of readline.php
<?php
function readline($prompt = '')
{
echo $prompt;
return rtrim(fgets(STDIN), "\n");
}
?>
Based on your issues in installing ncdu my recommendation would be to use du and sort on together.
For instance:
du /home | sort -rn (will search all files/directories under /home and sort them by largest to smallest.
du -h /home | sort -rh (same but will show it in MB/KB/etc) - Note this requires coreutils 7.5 or newer (sort --version to check)
You can replace /home with any directory of your choice.