Skip to content

Instantly share code, notes, and snippets.

View cryptiklemur's full-sized avatar

Aaron Scherer cryptiklemur

View GitHub Profile
@cryptiklemur
cryptiklemur / install.sh
Created October 18, 2012 20:00
Install HomeDir
#!/bin/bash
command -v git > /dev/null 2>&1 || { echo >&2 "Git is required for this install. Please install and try again. Aborting."; exit 1; }
command -v curl > /dev/null 2>&1 || { echo >&2 "Curl is required for this install. Please install and try again. Aborting."; exit 1; }
server=$1
if [ -z "$1" ]
then
echo "Specifiy a server name please (Shows up in PS1)":
@cryptiklemur
cryptiklemur / colors.sh
Created May 23, 2013 18:27
Color codes for bash
#!/bin/bash
# Reset
Color_Off='\e[0m' # Text Reset
# Regular Colors
Black='\e[0;30m' # Black
Red='\e[0;31m' # Red
Green='\e[0;32m' # Green
Yellow='\e[0;33m' # Yellow
Blue='\e[0;34m' # Blue
<?php
/**
* Copyright 2013 Aaron Scherer
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@cryptiklemur
cryptiklemur / MemcachedStore.php
Created July 29, 2013 21:57
MemcachedStore class for the Symfony2 AppCache Class
<?php
use Symfony\Component\HttpKernel\HttpCache\StoreInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Aequasi\Bundle\MemcachedBundle\Cache\AntiStampedeMemcached as Memcached;
/**
* {@inheritDoc}
*
@cryptiklemur
cryptiklemur / keybase.md
Created February 19, 2015 16:41
keybase.md

Keybase proof

I hereby claim:

  • I am aequasi on github.
  • I am aequasi (https://keybase.io/aequasi) on keybase.
  • I have a public key whose fingerprint is 7C29 7BD9 BC1C 5E8C C79F 5C2D 6C16 BE44 A09A 7E00

To claim this, I am signing this object:

@cryptiklemur
cryptiklemur / main.js
Created February 9, 2017 06:55 — forked from izy521/main.js
Use CTRL + Enter to send a Discord Embedified message. You'll need to provide your account token to the code, on line 3. Will be removed if you refresh. Highlighting a selection of your message will let you send only that as the embed, and the rest as a normal message.
(function start_embed_generator(window, document) {
var my_token = "-YOUR_TOKEN_HERE-";
var color_reg = /(\#.+?)(\s|$)/;
var text_bar_color = "rgb(92, 156, 199)";
window.addEventListener('keydown' , handle_event);
window.addEventListener('keyup' , revert_bar );
return !console.log("Embed generator up!");
<?php
/*
* This file is part of php-restcord.
*
* (c) Aaron Scherer <[email protected]>
*
* This source file is subject to the license that is bundled
* with this source code in the file LICENSE
*/
import {Mutex} from "await-semaphore";
import {Channel} from "eris";
import {setInterval} from "timers";
const mutex: Mutex = new Mutex();
export default class ChannelBuffer<T> {
private _messages: T[] = [];
constructor(private _channel: Channel, tick: Function, interval: number = 1000) {
@cryptiklemur
cryptiklemur / afssh
Last active May 22, 2018 19:04
Allows for SSHing (with tunnels) to any of the ansible inventories
#!/bin/bash
directory=~/projects/php-nginx-wp-ansible
if [[ "$2" != "dbservers" && "$2" != "webservers" ]]; then
echo ""
echo "$2 is not a valid type. Pass either dbservers or webservers"
exit
fi
@cryptiklemur
cryptiklemur / git.bash
Created October 16, 2018 22:19
Handy git functions
pull() {
git pull ${1:-origin} ${2:-HEAD}
}
push() {
git push ${1:-origin} ${2:-HEAD}
}