Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀

Mickaël MickaelBergem

🚀
View GitHub Profile
View phisher-flooder.py
#!/usr/bin/python3
import requests
import string
import random
# The URL on which we should be after submitting the form
URL_POST = 'http://priveservicetemporaire.fr/formmail.php'
URL_END = 'http://priveservicetemporaire.fr/merci.html'
EXPECTED_MESSAGE = b'Merci pour votre attention, Votre adresse a \xe9t\xe9 mis \xe0 jour.'
@MickaelBergem
MickaelBergem / mysql-export-csv.sql
Created Feb 10, 2015
Export MySQL results to a CSV file
View mysql-export-csv.sql
SELECT order_id,product_name,qty
FROM orders
INTO OUTFILE '/tmp/orders.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n';
@MickaelBergem
MickaelBergem / local-cache-pip-install.conf
Last active Aug 29, 2015
Cache the pypi packages (pip install...) in a local folder
View local-cache-pip-install.conf
# In ~/.pip/pip.conf
[global]
download_cache = ~/.cache/pip
View favicon.md
<link rel="icon" type="image/png" href="logo.png" />

or

<link rel="icon" href="favicon.ico" />
@MickaelBergem
MickaelBergem / git-clean-merged-branches
Last active Aug 29, 2015
Remove all local branches that have been merged
View git-clean-merged-branches
# Will remove all merged branches, except the current one.
git remote prune origin && git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
@MickaelBergem
MickaelBergem / gist:d710c5b3cd917035d183
Created Dec 4, 2014
Moving PostgreSQL tables from a database to another
View gist:d710c5b3cd917035d183

Copies only the data, assuming the tables are empty (TRUNCATE).

Source database :

pg_dump -a -U bnpipflux bnpipfluxdb | gzip > dump-prod-DD-MM-YYYY.sql

Destination database :

View keybase.md

Keybase proof

I hereby claim:

  • I am MickaelBergem on github.
  • I am mickaelbergem (https://keybase.io/mickaelbergem) on keybase.
  • I have a public key whose fingerprint is 7B5F 5866 97C0 96C7 0D5B 787B 7538 871D A7A3 2A62

To claim this, I am signing this object:

@MickaelBergem
MickaelBergem / owncloud-docker-compose.yml
Created Aug 26, 2015
`docker-compose.yml` file for setting up an ownCloud server using a PostgreSQL database
View owncloud-docker-compose.yml
# Composition of the containers
owncloud:
image: owncloud
ports:
- 80:80
volumes_from:
- owncloud-data
links:
- postgres:owncloud-db
You can’t perform that action at this time.