Skip to content

Instantly share code, notes, and snippets.

👨‍💻
Building @droveio

Evan Sims evansims

👨‍💻
Building @droveio
Block or report user

Report or block evansims

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@evansims
evansims / Octagon
Created Apr 21, 2019
Monokai Pro Slack Theme
View Octagon
#1E1F2B,#1E1F2B,#282A3A,#FFD76D,#1E1F2B,#9A9DA7,#95E18A,#F47777
@evansims
evansims / WilsonConfidenceIntervalCalculator.php
Created Apr 10, 2017 — forked from mbadolato/WilsonConfidenceIntervalCalculator.php
PHP translation of the Wilson ConfidenceInterval Calculator. Ported from Ruby and uses a hardcoded (pre-calculated) confidence (z value) instead of a dynamic calculation with a translation of Ruby's Statistics2.pnormaldist method. Since z doesn't change once it's computed, nor is the computation dependant on the passed-in values, calculating it …
View WilsonConfidenceIntervalCalculator.php
<?php
/*
* (c) Mark Badolato <mbadolato@gmail.com>
*
* This content is released under the {@link http://www.opensource.org/licenses/MIT MIT License.}
*/
namespace Bado\ScoreCalculator;
@evansims
evansims / gender_pronouns.js
Last active Dec 24, 2017
English Gender Pronouns JS/JSON
View gender_pronouns.js
gender: {
nominative: {
neutral: 'they',
masculine: 'he',
feminine: 'she',
elverson: 'ey',
spivak: 'E',
humanist: 'hu',
peh: 'peh',
per: 'per',
@evansims
evansims / gist:210f9a9bc7d42b0ad299
Created Nov 2, 2014
Re-encode a WAV to MP3 using ffmpeg, stripping metadata and reducing volume.
View gist:210f9a9bc7d42b0ad299
ffmpeg -i filename.wav -map_metadata -1 -vol 128 filename.mp3
View keybase.md

Keybase proof

I hereby claim:

  • I am evansims on github.
  • I am evansims (https://keybase.io/evansims) on keybase.
  • I have a public key whose fingerprint is 4F5E C6AC A591 2B02 65AC 2D7C B970 6FBE 74F6 A3EA

To claim this, I am signing this object:

@evansims
evansims / example.html
Last active Jul 14, 2019
Embedding or sharing a image or photo uploaded to Google Drive.
View example.html
<a href="https://drive.google.com/uc?export=view&id=XXX"><img src="https://drive.google.com/uc?export=view&id=XXX" style="width: 500px; max-width: 100%; height: auto" title="Click for the larger version." /></a>
@evansims
evansims / hooks.php
Last active Feb 8, 2018
An example of automatically including header and footer templates using Slim hooks.
View hooks.php
$app->hook('slim.before.dispatch', function () use ($app) {
$app->render('/views/header.php');
});
$app->hook('slim.after.dispatch', function () use ($app) {
$app->render('/views/footer.php');
});
View Prerequisites
apt-get install pigz
@evansims
evansims / backup_mysqld.sh
Created Mar 5, 2012
Backup Databases to Individual ZIPs
View backup_mysqld.sh
#!/bin/bash
mysqlUser=""
mysqlPass=""
backup="/home/username/mysqldump"
databases=( $(mysql -u"$mysqlUser" -p"$mysqlPass" --skip-column-names --batch -e "show databases;" 2>"$temp") );
echo "found ${#databases[@]} databases.";
for i in ${databases[@]}; do
@evansims
evansims / backup.sh
Created Jun 1, 2011
Nightly Backup Script
View backup.sh
#!/bin/bash
mysqlUser="MYSQL USER"
mysqlPass="MYSQL PASSWORD"
backup="/path/to/backups/"
folders[0]="/home/user1/"
folders[1]="/home/user2/"
folders[2]="/var/lib/mongodb/"
You can’t perform that action at this time.