Skip to content

Instantly share code, notes, and snippets.

View maxenceC's full-sized avatar

Maxence Cornet maxenceC

View GitHub Profile
@da2x
da2x / brave_publisher_dns_crawler.py
Created December 6, 2017 19:40
Detects websites with brave-leder-verifications in their DNS records. Note that such a ledger is no guarantee that the website is infact a verified Brave publisher.
# Download and unzip Alexa Top 1 Million websites
# http://s3.amazonaws.com/alexa-static/top-1m.csv.zip
# Run this script.
from os.path import isfile
from urllib.request import urlopen
import concurrent.futures
import socket
import dns.resolver
import time
@robotnealan
robotnealan / sites-available-ghost
Last active March 20, 2019 09:33
DigitalOcean LetsEncrypt Nginx Config
server {
listen 80;
listen [::]:80;
server_name robertnealan.com;
root /var/www/ghost/system/nginx-root;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
@solace
solace / extend-email-send.md
Last active November 20, 2020 06:58
Meteor: Extend default Email.send invocation

Use a non-SMTP mail method in Meteor

Requirements:

  • lodash (or underscore, you may need to change your _ functions to suit)
  • Meteor email package
Meteor.startup(function () {
 var sendEmail = _.bind(Email.send, Email);
@mcginty
mcginty / material_colors.xml
Last active March 17, 2022 04:09
Android XML resource with the full material color palette. Source: http://www.google.com/design/spec/style/color.html#color-color-palette
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="material_red50">#ffffebee</color>
<color name="material_red100">#ffffcdd2</color>
<color name="material_red200">#ffef9a9a</color>
<color name="material_red300">#ffe57373</color>
<color name="material_red400">#ffef5350</color>
<color name="material_red500">#fff44336</color>
<color name="material_red600">#ffe53935</color>
<color name="material_red700">#ffd32f2f</color>
@domenic
domenic / promises.md
Last active March 31, 2024 14:07
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">