Skip to content

Instantly share code, notes, and snippets.

@nicosomb
nicosomb / new-index.php
Created August 29, 2012 12:10
bookmarklet pour shaarli qui prend en compte le texte sélectionné
$description=(empty($_GET['description']) ? '' : $_GET['description'] ); $tags=''; $private=0;
@nicosomb
nicosomb / index.php
Last active December 16, 2015 16:59
problem with encoded url by a bookmarklet and routes in silex
<?php
require_once __DIR__.'/../vendor/autoload.php';
$app = new Silex\Application();
$app->register(new Silex\Provider\TwigServiceProvider(), array(
'twig.path' => __DIR__.'/../views',
));
$app->register(new Silex\Provider\DoctrineServiceProvider(), array(

Voici mon dépôt git contenant la dernière version de oh_my_zsh, avec quelques commits locaux.

$ cd $ZSH
$ git branch -a
* local
  master
  remotes/origin/HEAD -> origin/master
$ git log --pretty=format:"%h %d %s" | head -4
0649746  (HEAD, local) rebase instead of git pull while upgrading
@nicosomb
nicosomb / Poche.class.php
Created August 7, 2013 19:46
modifier la fonction public function import($from) par la suivante :
<?php
//...
public function import($from)
{
set_time_limit(0);
if ($from == 'pocket') {
$this->importFromPocket();
}
else if ($from == 'readability') {
$this->importFromReadability();
@nicosomb
nicosomb / scroll.html
Created August 8, 2013 12:48
html5 get scroll percentage
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Get Scrollbar Percentage</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
@nicosomb
nicosomb / twig2po.sh
Created September 12, 2013 05:17
parse all twig cache files to generate .po file
xgettext --default-domain=messages -p locale --from-code=UTF-8 -n --omit-header -L PHP $(find /tmp/cache -name "*.php")
@nicosomb
nicosomb / wrong_displayed_links
Last active December 25, 2015 16:09
Wrong displayed links in poche
@nicosomb
nicosomb / gist:9190686
Created February 24, 2014 15:40
htaccess https => http
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
@nicosomb
nicosomb / downloads
Created July 17, 2014 19:07
Pages wallabag.org
[table width ="100%" style ="table-striped table-hover" responsive ="true"]
[table_head]
[th_column]version[/th_column]
[th_column]status[/th_column]
[th_column]description[/th_column]
[th_column]download[/th_column]
[/table_head]
[table_body]
[table_row]
[row_column]<span style="color: #2c3e50;"><strong>1.7.1</strong></span>[/row_column]
@nicosomb
nicosomb / gist:bc48ae894ad0806bf8fc
Created August 24, 2014 18:56
sudo apt-get install -f
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
9 partiellement installés ou enlevés.
Après cette opération, 0 o d'espace disque supplémentaires seront utilisés.
Bareword found where operator expected at /usr/share/perl5/Debconf/Encoding.pm line 15, near "$charmap = `locale"
(Might be a runaway multi-line `` string starting on line 2)
(Missing operator before locale?)
debconf: Perl may be unconfigured (Unrecognized character \xE8; marked by <-- HERE after `locale c<-- HERE near column 23 at /usr/share/perl5/Debconf/Encoding.pm line 15.