This file contains hidden or 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
// Just copy/paste this script in the developer console | |
// (or use the bookmarklet in the comments) | |
var style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.innerHTML = '#reader-ad-container{display: none} #reader-container{margin-right: 0} .feed-header{right: 0}'; | |
document.getElementsByTagName('head')[0].appendChild(style); |
This file contains hidden or 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
#!/bin/bash | |
# First of all, we check if the user is root | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
update-alternatives --install /usr/bin/java java /opt/java/$(ls -tr | tail -1)/bin/java 1 | |
update-alternatives --install /usr/bin/javac javac /opt/java/$(ls -tr | tail -1)/bin/javac 1 |
This file contains hidden or 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
# Difference unicode/general : http://stackoverflow.com/a/367725/330867 | |
CREATE DATABASE dbname CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | |
CREATE USER 'dbuser'@'localhost' IDENTIFIED BY 'dbpass'; | |
GRANT USAGE ON * . * TO 'dbuser'@'localhost' IDENTIFIED BY 'dbpass' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; | |
GRANT SELECT , INSERT , UPDATE , DELETE , CREATE , DROP , INDEX , ALTER , REFERENCES, LOCK TABLES ON `dbname` . * TO 'dbuser'@'localhost'; | |
FLUSH PRIVILEGES; | |
# To dump the database with the master relay details: |
This file contains hidden or 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
yum -y remove cheese evolution libreoffice-calc libreoffice-core libreoffice-draw libreoffice-graphicfilter libreoffice-impress libreoffice-opensymbol-fonts libreoffice-pdfimport libreoffice-ure libreoffice-writer shotwell empathy | |
yum -y install --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm | |
yum -y install --nogpgcheck http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm | |
yum -y install --nogpgcheck http://rpms.famillecollet.com/remi-release-20.rpm | |
printf "[google-chrome]\nname=google-chrome - 64-bit\nbaseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64\nenabled=1\ngpgcheck=1\ngpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub" > /etc/yum.repos.d/google-chrome.repo |
This file contains hidden or 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
/** | |
* You need to know it's better to use the always up-to-date sdk from Twilio | |
* This is just a snippet that demonstrate how to send an sms to Twilio using curl. | |
* It works well though ;) | |
*/ | |
function twilio($to, $message) { | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, str_replace('{auth_key}', TWILIO_KEY, 'https://api.twilio.com/2010-04-01/Accounts/{auth_key}/Messages.json')); | |
curl_setopt($ch, CURLOPT_TIMEOUT, 5); |
This file contains hidden or 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
/** | |
* Search existing emails based on the full name and the website. | |
* | |
* @param {string} token : The API token bought at https://voilanorbert.com | |
* @param {string} fullname : The name of the person to search | |
* @param {string} domain : The domain to search against. | |
* | |
* @return The list of emails or an error code (starting with "ERR-{code}") | |
* | |
* @customfunction |
This file contains hidden or 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
# -*- coding:utf-8 -*- | |
from flask import current_app | |
from urllib import urlencode | |
import httplib2 | |
def twilio(phone, message): | |
params = { | |
'From': current_app.config['TWILIO_FROM'], |
This file contains hidden or 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
/** | |
* Verify that the provided email is well recognized by the MX server. | |
* | |
* @param {string} token : The API token bought at https://voilanorbert.com | |
* @param {string} email : The email to verify | |
* | |
* @return Boolean as 1/0 if it exists or an error code (starting with "ERR-{code}") | |
* | |
* @customfunction | |
*/ |
This file contains hidden or 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
// https://eu.soyoustart.com/fr/commande/soYouStart.xml?reference=143sys10&quantity=1 | |
function find(reference) { | |
jQuery.ajax({ | |
'url': 'https://ws.ovh.com/dedicated/r2/ws.dispatcher/getAvailability2' | |
}).done(function (data) { | |
for (var i = 0; i < data.answer.availability.length; i++) { | |
if (data.answer.availability[i].reference !== reference) continue; | |
for (var y=0; y < data.answer.availability[i].zones.length; y++) { |
This file contains hidden or 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
<?php | |
namespace Crawler\Extractors; | |
class LinkExtractor { | |
private static $excludes = array( | |
'.png', '.gif', '.jpg', '.jpeg', '.svg', '.mp3', '.mp4', '.avi', '.mpeg', '.ps', '.swf', '.webm', '.ogg', '.pdf', | |
'.3gp', '.apk', '.bmp', '.flac', '.gz', '.gzip', '.jpe', '.kml', '.kmz', '.m4a', '.mov', '.mpg', '.odp', '.oga', '.ogv', '.pps', '.pptx', '.qt', '.tar', '.tif', '.wav', '.wmv', '.zip', | |
// Removed '.js', '.coffee', '.css', '.less', '.csv', '.xsl', '.xsd', '.xml', '.html', '.html', '.php', '.txt', '.atom', '.rss' |