Skip to content

Instantly share code, notes, and snippets.

View quoidautre's full-sized avatar

3dw4rd5n0wd3n quoidautre

  • New York
View GitHub Profile
@quoidautre
quoidautre / gist:e7cf3ba6c3fea1e9dcd6e953dfb6f071
Created February 13, 2017 17:28
Read url with BeautifulSoup, urllib and write in csv file
from BeautifulSoup import BeautifulSoup as BS
import urllib, urllib2, re
import csv
url = 'http://www.entreprises-aix.com/entreprises.php'
data = {"CaNum": "3246", "btn_rechercher": "RECHERCHER"}
data = urllib.urlencode(data)
req = urllib2.Request(url, data)
response = urllib2.urlopen(req)
@quoidautre
quoidautre / wget.sh
Last active September 22, 2015 07:49 — forked from nepsilon/3-handy-wget-tips.md
Wget tips
# Copy a whole site locally,
# including images, css, js
# and converting links
wget -p -m -k fullweb​.io
# Check for 404 links
wget --spider your-url-list.txt
# give it an HTML page with -F
wget --spider -F you-webpage.html

XSS-game by Google

Welcome, recruit! Cross-site scripting (XSS) bugs are one of the most common and dangerous types of vulnerabilities in Web applications. These nasty buggers can allow your enemies to steal or modify user data in your apps and you must learn to dispatch them, pronto!

At Google, we know very well how important these bugs are. In fact, Google is so serious about finding and fixing XSS issues that we are paying mercenaries up to $7,500 for dangerous XSS bugs discovered in our most sensitive products.

In this training program, you will learn to find and exploit XSS bugs. You'll use this knowledge to confuse and infuriate your adversaries by preventing such bugs from happening in your applications.

There will be cake at the end of the test.

@quoidautre
quoidautre / curl.sublime-snippet
Created December 17, 2012 09:15
curl init options
<snippet>
<content><![CDATA[
\$curl = curl_init();
\$curlOptions = array(
CURLOPT_URL => ${1:url},
CURLOPT_POST => ${2:post},
CURLOPT_POSTFIELDS => ${3:fields},
CURLOPT_RETURNTRANSFER => ${4:return},
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
@quoidautre
quoidautre / application.js
Created November 23, 2012 10:01 — forked from codeschool-courses/models.js
Challenge 7-6 // BackBoneJS - codeschool
var AppRouter = Backbone.Router.extend({
routes: { "appointments/:id": "show", "": "index" },
initialize: function(options){
this.appointmentList = options.appointmentList;
},
index: function(){
var appointmentsView = new AppointmentListView({collection: this.appointmentList});
appointmentsView.render();
@quoidautre
quoidautre / gist:4071057
Created November 14, 2012 08:52
UX: Ligne de flottaison // bookmarklet !!
if ($("#flottaison1").length > 0) {
$("#flottaison1,#flottaison2,#flottaison3,flottaison4").remove();
$("#text-flottaison1,#text-flottaison2,#text-flottaison3,#text-flottaison4").remove();
} else {
$('body')
.append('<hr id="flottaison1"/>')
.append('<span id="text-flottaison1">1024x768 (560px)</span>')
.find('#flottaison1')
.css({
@quoidautre
quoidautre / index.html
Created November 13, 2012 10:15
A CodePen by Chris Coyier. Stairway Hover Nav - Now a jQuery plugin.
<h1>Stairway Nav</h1>
<div>
<h2>One Step</h2>
<nav id="example-one">
<a href="#">Navigation</a>
<a href="#">Navigation</a>
<a href="#">Navigation</a>
<a href="#">Navigation</a>
<a href="#">Navigation</a>
@quoidautre
quoidautre / gist:3800526
Created September 28, 2012 15:28
MYSQL: Procédures stockées avec paramètres
BEGIN
SET @mySelect:= 'SELECT * FROM CATEGORY ';
IF(param_id_category > 0) THEN
SET @mySelect:= CONCAT(@mySelect, 'WHERE CAT_ID=',param_id_category);
END IF;
prepare stmnt FROM @mySelect;
EXECUTE stmnt;
DEALLOCATE PREPARE stmnt;
@quoidautre
quoidautre / gist:3786635
Created September 26, 2012 07:45
Convert svn repository to git
mkdir ~/Sites/repo_tmp
cd ~/Sites/repo_tmp
git-svn init https://svn.example.com/repo/trunk/ --no-metadata
git config svn.authorsfile ~/Sites/git-users.txt
git-svn fetch
git-svn show-ignore > .gitignore
git add .gitignore
git commit -m "Convert svn ignored files to .gitignore"
cd ~/Sites
git clone repo_tmp repo
@quoidautre
quoidautre / gist:3782600
Created September 25, 2012 15:29
MYSQL: Problème avec version de Mysql
mysql_check -u [user] -p[password] --repair --all-databases (ou "mysqlcheck")
mysql_upgrade -u [user] -p[password] --all-databases