Skip to content

Instantly share code, notes, and snippets.

Harvey yevrah

  • Sydney
Block or report user

Report or block yevrah

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
@yevrah
yevrah / amazon_sender.py
Created Jul 15, 2019 — forked from amix/amazon_sender.py
Amazon SES helper script using boto
View amazon_sender.py
# -*- coding: utf-8 -*-
"""
amazon_sender.py
~~~~~~~~
Python helper class that can send emails using Amazon SES and boto.
The biggest feature of this class is that encodings are handled properly.
It can send both text and html emails.
This implementation is using Python's standard library (which opens up for a lot more options).
@yevrah
yevrah / nodejs-cheatsheet.js
Created Mar 14, 2019 — forked from LeCoupa/nodejs-cheatsheet.js
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
View nodejs-cheatsheet.js
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@yevrah
yevrah / flask.py
Created Jul 6, 2018
Flask: Annotated Boilerplate.
View flask.py
# A very simple Flask Hello World app for you to get started with...
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello from Flask!'
@yevrah
yevrah / Upgrade vim
Last active Oct 18, 2019
Update to Vim8 on Centos 7
View Upgrade vim
################################################################################
# Method 1: Install using rpm packages (credit to DarkMukke)
#
rpm -Uvh http://mirror.ghettoforge.org/distributions/gf/gf-release-latest.gf.el7.noarch.rpm
rpm --import http://mirror.ghettoforge.org/distributions/gf/RPM-GPG-KEY-gf.el7
# WARNING: removing vim-minimal uninstalls `sudo` if you skip the second step
# make sure to at least run `yum install sudo`
yum -y remove vim-minimal vim-common vim-enhanced
@yevrah
yevrah / Upgrade vim
Created Feb 7, 2018
Update to Vim8 on Centos 7
View Upgrade vim
# You may use this CentOS 7 repository on Fedora Copr for Vim 8 builds.
# https://copr.fedorainfracloud.org/coprs/mcepl/vim8/
#
# Run these commands on CentOS 7.
# Add this repository:
sudo curl -L https://copr.fedorainfracloud.org/coprs/mcepl/vim8/repo/epel-7/mcepl-vim8-epel-7.repo -o /etc/yum.repos.d/mcepl-vim8-epel-7.repo
# Upgrade Vim to vim 8:
@yevrah
yevrah / romanize.py
Last active Oct 13, 2017
Roman Numerals
View romanize.py
#!/usr/bin/env python3
# encoding: utf-8
class Romanize():
# Values from https://www.math.nmsu.edu/~pmorandi/math111f01/RomanNumerals.html
numbers = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]
numeral = [ 'm', 'cm', 'd', 'cd', 'c', 'xc', 'l', 'xl', 'x', 'ix', 'v', 'iv', 'i']
def calculate(number):
out = ""
@yevrah
yevrah / crud_template.pl
Created Sep 5, 2017
Perl: App.pm Example
View crud_template.pl
#!/usr/bin/env perl
# Sane defaults
require 5.004;
use strict 'vars';
use warnings;
use diagnostics;
use CGI::Carp qw(fatalsToBrowser);
# Stadard libaries
@yevrah
yevrah / crud_template.pl
Created Sep 5, 2017
Perl: App.pm Example
View crud_template.pl
#!/usr/bin/env perl
# Sane defaults
require 5.004;
use strict 'vars';
use warnings;
use diagnostics;
use CGI::Carp qw(fatalsToBrowser);
# Stadard libaries
@yevrah
yevrah / data_sections.pl
Created Jul 7, 2017
PERL: Multiple data sections
View data_sections.pl
#!/usr/bin/env perl
# Sane defaults
use strict;
use warnings;
use feature qw/say/;
use Data::Dumper;
my @data = <DATA>;
@yevrah
yevrah / integration.js
Created Aug 18, 2016
JAVSCRIPT: Angular and Phaser Integration
View integration.js
// Namespace declarations
var wingaru = wingaru || {};
var wingaru.auth = wingaru.auth || {};
var wingaru.games = wingaru.games || {};
var wingaru.activites = wingaru.acivities || {};
var wingaru.videos = wingaru.videos || {};
//
// Generic Helper
//
You can’t perform that action at this time.