Skip to content

Instantly share code, notes, and snippets.

Avatar

Peter Hanley hanleybrand

View GitHub Profile
@danaspiegel
danaspiegel / zdl.py
Last active Feb 18, 2021
Zoom Recording Downloader
View zdl.py
#!/usr/bin/env python3
import os
import requests
import itertools
from dateutil.parser import parse
API_KEY = ''
API_SECRET = ''
@jakzal
jakzal / QueueScraperTest.php
Last active Jan 21, 2020
RabbitMQ integration test
View QueueScraperTest.php
<?php
namespace Zalas\Infrastructure\Scraper;
use OldSound\RabbitMqBundle\RabbitMq\Consumer;
use OldSound\RabbitMqBundle\RabbitMq\ConsumerInterface;
use OldSound\RabbitMqBundle\RabbitMq\ProducerInterface;
use PhpAmqpLib\Connection\AbstractConnection;
use PhpAmqpLib\Connection\AMQPLazyConnection;
use PhpAmqpLib\Exception\AMQPTimeoutException;
@p3t3r67x0
p3t3r67x0 / openssl_commands.md
Last active Nov 9, 2020
Some list of openssl commands for check and verify your keys
View openssl_commands.md

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@deathbearbrown
deathbearbrown / accessibility.md
Last active Apr 27, 2017
Please be accessible, my dudes.
View accessibility.md

If you have images and you are showing them on the web using an <img> tag, you must ALWAYS include alt text.

If you are writing markdown, you have no excuse not to add alt text.

![Alt text right here buddy](src)

Doing this is lazy. You're better than that.

![](src)
View gist:472fb73184bcb3ea11a2
var reducePath = function (x, y, entryOffset, rangeOffset, entryRequiredWall, entryDisallowedWall) {
var rangeEntryRequiredDirections = [entryDisallowedWall, OppositeDirections[entryDisallowedWall]];
var rangeEntryDisallowedDirections = [entryRequiredWall, OppositeDirections[entryRequiredWall]];
var endDisallowedDirections = [OppositeDirections[entryRequiredWall], OppositeDirections[entryDisallowedWall]];
var endRequiredDirections = [entryRequiredWall, entryDisallowedWall];
var tile = tiles[x][y];
var color = tile.color;
var entry = tiles[x+entryOffset[0]][y+entryOffset[1]];
View osx-for-hackers.sh
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@Bouke
Bouke / gist:10454272
Last active Jan 20, 2021
Install FreeTDS, unixODBC and pyodbc on OS X
View gist:10454272

First, install the following libraries:

$ brew install unixodbc
$ brew install freetds --with-unixodbc

FreeTDS should already work now, without configuration:

$ tsql -S [IP or hostname] -U [username] -P [password]
locale is "en_US.UTF-8"
locale charset is "UTF-8"
@jordoh
jordoh / entity.lua
Last active Dec 15, 2020
Starbound lua API
View entity.lua
--- Stubs for entity.* callbacks defined in C++.
--
-- DO NOT INCLUDE this file in your scripts, it is for documentation purposes only.
--
-- Entity callbacks query and mutate the specific entity that is running the
-- lua script. They can be called from a _different_ entity using
-- world.callScriptedEntity(targetEntityId, "entity.*"), replacing "*" with the
-- name of a function defined below.
--
-- Specific types of entities (e.g. NPCs, Objects) define different sets of
View README.md
@hanleybrand
hanleybrand / auth.ldapauth.py
Last active Dec 22, 2015
Drop-in log-chatty replacement for mdid3: rooibos/auth/ldapauth.py that also will handle ldap configurations that require a bind user (see settings_local_fragment.py for the additional settings you need to add.
View auth.ldapauth.py
from django.contrib.auth.models import User
from django.conf import settings
import ldap
from baseauth import BaseAuthenticationBackend
import logging
class LdapAuthenticationBackend(BaseAuthenticationBackend):
def authenticate(self, username=None, password=None):
for ldap_auth in settings.LDAP_AUTH: