Skip to content

Instantly share code, notes, and snippets.

View hanleybrand's full-sized avatar

Peter Hanley hanleybrand

View GitHub Profile
@radzhome
radzhome / json_schema_to_django_model.py
Last active August 5, 2023 00:46
Converts json schema to django models.py
"""
Json Schema to Django Model
"""
import json
import argparse
import logging
import os
def determine_model_name(model_id=None, filename=None):
@danaspiegel
danaspiegel / zdl.py
Last active September 10, 2023 20:54
Zoom Recording Downloader
#!/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 September 28, 2022 14:55
RabbitMQ integration test
<?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 February 3, 2024 18:53
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@deathbearbrown
deathbearbrown / accessibility.md
Last active April 27, 2017 20:33
Please be accessible, my dudes.

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)
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]];
# 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 September 22, 2023 17:23
Install FreeTDS, unixODBC and pyodbc on OS X

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 May 22, 2022 22:08
Starbound lua API
--- 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
@hofmannsven
hofmannsven / README.md
Last active April 7, 2024 09:28
Git CLI Cheatsheet