This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.nio.charset.Charset; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
/** | |
* Created by yapiti on 07/09/15. | |
*/ | |
public class Main { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
final File realDocument = new File(adapter.get(currentPage).getUriLocal().getPath()); | |
final File copyDocument = File.createTempFile("pdf", "pdf"); | |
IOUtils.copy(new FileInputStream(realDocument), new FileOutputStream(copyDocument)); | |
PDDocument document = PDDocument.load(copyDocument); | |
PDPage page=document.getPage(document.getNumberOfPages() - 1); | |
ByteArrayOutputStream outputStream=new ByteArrayOutputStream(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Si modification de fichier en cours | |
git stash //Pour sauvegarder les modification en cours et remettre la branch propre | |
//un "git status" ne doit vous indiquer aucune modifications | |
git fetch --all //Pour synchro le dépot local avec le serveur | |
git merge master | |
//Si fichiers en conflit | |
//les ouvrirs, corriger le code | |
git add mon_fichier_en_conflit.yolo //marquer comme résolu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//En Java 7 | |
findViewById(R.id.mon_bouton).setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
maFonction(); | |
} | |
}); | |
//En Java 8 + Retrolambda | |
findViewById(R.id.mon_bouton).setOnClickListener(v -> maFonction()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo start-stop-daemon --start --chuid www-data --background --exec /usr/bin/php -- /var/www/tt-rss/update_daemon2.php --feeds --quiet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bash | |
./gradlew -Pcoverage clean connectedDebugAndroidTest | |
#build.gradle | |
testCoverageEnabled (project.hasProperty('coverage') ? true : false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
MAINTAINER Nicolas Barranger <[email protected]> | |
USER root | |
RUN mkdir /monero && cd /monero && mkdir data | |
RUN apt update && apt install -y wget ca-certificates openssl bzip2 | |
WORKDIR /monero | |
RUN wget -O monero.tar.bz2 https://downloads.getmonero.org/linux64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
new SubClass(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import qarnot | |
import os | |
import operator | |
# Edit 'samples.conf' to provide your own credentials | |
# Create a connection, from which all other objects will be derived |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
dnscrypt: | |
image: gists/dnscrypt-proxy | |
restart: unless-stopped | |
container_name: dnscrypt | |
ports: | |
- "127.0.0.1:53:5353/udp" | |
- "127.0.0.1:53:5353/tcp" |
OlderNewer