Skip to content

Instantly share code, notes, and snippets.

View jlevallois's full-sized avatar
:octocat:

Jérémy Levallois jlevallois

:octocat:
View GitHub Profile
@jlevallois
jlevallois / shared_ptr.cpp
Created July 18, 2016 08:40
shared_ptr.cpp
#include <memory>
class A
{};
class AA : public A
{};
class AAA : public AA
{}:
#include <iostream>
class A
{
public:
A() = default;
~A() = default;
template< typename TC >
void print()

I upgraded my computer to Ubuntu 16.04, and now I can't build with clang (but works with g++)

 CMake Error at
 /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148
 (message):
   Could NOT find Threads (missing: Threads_FOUND)
 Call Stack (most recent call first):
   /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388
 (_FPHSA_FAILURE_MESSAGE)
#include <cstdlib>
class A
{
public:
A() = default;
~A() = default;
};
class B
@jlevallois
jlevallois / svn-url-extract-from-svn-folder.sh
Created July 16, 2015 08:25
Get SVN URL from a SVN folder
#!/bin/sh
# In your SVN folder :
svn info | grep 'URL' | awk '{print $NF}'
@jlevallois
jlevallois / resolve-problem-with-mergelist.sh
Created July 9, 2015 14:19
Resolve "Problem with Mergelist" on Ubuntu
#!/bin/sh
# remove all mergelists (safe) and regenerate them
sudo rm /var/lib/apt/lists/* -vf && sudo apt-get update
@jlevallois
jlevallois / add-french-dic-sublime-text-3.sh
Last active July 22, 2021 10:50
Adding French dictionnary in Sublime Text 3
#!/bin/sh
cd ~/.config/sublime-text-3/Packages
mkdir "Language - French"
cd "Language - French"
wget https://raw.githubusercontent.com/titoBouzout/Dictionaries/master/French.dic
wget https://raw.githubusercontent.com/titoBouzout/Dictionaries/master/French.aff
wget https://raw.githubusercontent.com/titoBouzout/Dictionaries/master/French.txt # <- credits
## And activate the French dictionary in SublimeText3:
@jlevallois
jlevallois / svn-ignore.sh
Last active August 29, 2015 14:20
Ignore files and folders in SVN
#!/bin/sh
# edit SVN ignore list for current folder
svn propedit svn:ignore .
@jlevallois
jlevallois / pdf-concat-linux-cli.sh
Last active August 29, 2015 14:19
Concat PDF files with different page size to a single PDF file
#!/bin/sh
# Concat all pdf files of the folder to output.pdf
# All pdf files are resized to A4 format
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite \
-sPAPERSIZE=a4 -dPDFFitPage \
-sOutputFile=output.pdf *.pdf
@jlevallois
jlevallois / pdf-compression-linux-cli.sh
Last active March 24, 2017 23:07
Compress a PDF file without much loss
#!/bin/sh
# -dPDFSETTINGS=/screen – selects low-resolution output.
# -dPDFSETTINGS=/ebook – selects medium-resolution output.
# -dPDFSETTINGS=/printer – selects high-resolution output.
# -dPDFSETTINGS=/prepress – selects very high resolution output.
# -dPDFSETTINGS=/default – selects output intended to
# be useful across a wide variety
# of uses, possibly at the expense
# of a larger output file.