Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View DILL44's full-sized avatar
🌍
on Idcity

Nicolas DILL44

🌍
on Idcity
View GitHub Profile
@DILL44
DILL44 / backupApt
Last active May 15, 2020 20:44
backupApt
#!/bin/bash
configFile=$1
#demande le nom du fichier si il n'a pas été rentrer en paramètre
while [ X$configFile == X ] && [ -f $configFile ]
do
read -p "give file name (can-t be empty):" configFile
done
<?php
namespace AppBundle\Command;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Filesystem\Filesystem;
@DILL44
DILL44 / docker hub
Last active February 13, 2016 13:00
#verveur
#https://hub.docker.com/_/postgres/
docker pull postgres
#https://hub.docker.com/_/nginx/
docker pull nginx
#https://hub.docker.com/_/drupal/
docker pull drupal
#https://hub.docker.com/_/debian/
docker pull debian
#https://hub.docker.com/_/php/
void setup() {
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop() {
if (Serial.available() > 0) { // if there is data coming from the serial port
int data = (int)Serial.read(); // get that data and print it
Serial.println(data);
if (data == 1) { // do what you want with this data
digitalWrite(13, HIGH);
@DILL44
DILL44 / decompresition.sh
Last active November 30, 2015 12:41
mes logiciel linux
###############sytem
sudo apt-get install vim htop git
###############hardware
sudo apt-get install fritzing arduino kicad
###############admin
sudo apt-add-repository 'deb http://liveusb.info/multisystem/depot all main'
wget -q -O - http://liveusb.info/multisystem/depot/multisystem.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox testdisk multisystem gsmartcontrol netdiscover
sudo adduser "$USER" adm
@DILL44
DILL44 / bash
Last active November 27, 2015 14:11
Atelier PiNG Breil
#!/bin/bash
#Xubuntu 14.04
## for 16 Go
## 3Go /
## 2Go swap
## 5Go /opt
## 3Go /var
## 3Go /home
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!ELEMENT projet (name, description, Warning*, illustrations?, authors, fablab?, licence, attachement+, materials?, tools?, skills?, steps?, creationDate, lastModification, tags?)>
<!----------------------------- base elements ----------------------------->
<!ELEMENT name (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT media (image|video)>
<!ELEMENT image EMPTY>
@DILL44
DILL44 / php file for debug
Created November 29, 2012 09:57
write file for testing variable in a php file.
$file=fopen("/path/to/the/file/test.txt", 'w+',true);
$content='';
foreach ($aray as $value){
$content.="id: ".$value."\n";
}
fwrite($file,$content);
fclose($file);
}
@DILL44
DILL44 / drupal update
Last active October 13, 2015 03:38
update for drupal on shared server
wget http://ftp.drupal.org/files/projects/drupal-7.18.zip &&
unzip drupal-7.18.zip &&
rm -R drupal-7.18/sites/ &&
cp -R sites/ drupal-7.18/ &&
mv drupal-7.18/ ../ &&
rm drupal-7.18.zip &&
mkdir ../backup &&
mv * ../backup/ &&
mv .htaccess ../backup/ &&
rm -R ../drupal-7.18/.git*&&
@DILL44
DILL44 / InstallDopCom.sh
Last active October 11, 2015 17:47
script dopCom
git clone git://github.com/DILL44/DopCom.git&&
mv DopCom/* . &&
mv DopCom/.git* . &&
rm -R DopCom &&
wget http://ftp.drupal.org/files/projects/drupal-7.19.zip &&
unzip drupal-7.15.zip &&
rm -R drupal-7.15/sites/&&
mv drupal-7.15/* . &&
mv drupal-7.15/.htaccess . &&
rm -R drupal-7.15* &&