Skip to content

Instantly share code, notes, and snippets.

View conatus's full-sized avatar

Alex Worrad-Andrews conatus

View GitHub Profile
#!/usr/bin/env bash
###########################################
# Install Terraforming and export AWS #
# @author Adam Eivy #
###########################################
###
# echo helper functions
###
@vik-y
vik-y / delete_all_tweets.py
Last active September 22, 2023 21:04 — forked from davej/delete_all_tweets.py
This script will delete all of the tweets in a specified account.
# -*- coding: utf-8 -*-
"""
This script is forked originally from Dave Jeffery. The original implementation
was very slow and deleted around 2 tweets per second. Making it multithreaded I
am able to delete 30-50 tweets per second.
@author: vik-y
----------------------------------------------------------------------------
This script will delete all of the tweets in the specified account.
@nkbt
nkbt / .eslintrc.js
Last active April 1, 2025 03:07
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@paulirish
paulirish / bling.js
Last active February 18, 2025 14:08
bling dot js
/* bling.js */
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); };
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); };
@bendc
bendc / functional-utils.js
Last active September 15, 2023 12:12
A set of pure ES2015 functions aimed to make functional JavaScript more idiomatic.
// array utils
// =================================================================================================
const combine = (...arrays) => [].concat(...arrays);
const compact = arr => arr.filter(Boolean);
const contains = (() => Array.prototype.includes
? (arr, value) => arr.includes(value)
: (arr, value) => arr.some(el => el === value)
@maurizi
maurizi / ansible-galaxy.bat
Last active May 21, 2024 02:10
Running Ansible on Windows
@echo off
cygwin-shim.bat /bin/ansible-galaxy %*
<?php
/*
Plugin Name: Gravity Forms Queue Listener
*/
class GravityFormsQueueListener {
function __construct() {
add_action('wp_loaded', array($this,'process_push_queue_msg'), 10 );
add_action('gform_after_submission', array( $this, 'send_to_ironio'), 10, 2);
# This gist is compatible with Ansible 1.x .
# For Ansible 2.x , please check out:
# - https://gist.github.com/dmsimard/cd706de198c85a8255f6
# - https://github.com/n0ts/ansible-human_log
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@soopa
soopa / reference-api-designs.md
Last active April 22, 2023 10:56
A running list of API designs worth referencing, alphabetized.
@fakedarren
fakedarren / regex.js
Created March 27, 2013 22:20
Just a few regexs I wrote / stole when creating a wysiwyg text editor a few years ago. God give me strength. Related: http://stackoverflow.com/a/1732454/299237
UI.TextEditor.implement({
cleanHTML: function() {
var html = this.textarea.value;
// Remove double new lines
html = html.replace(/\n\n+/g, "\n");
// Stupid apple-style-spans etc