Skip to content

Instantly share code, notes, and snippets.

@ezynda3
ezynda3 / WTF.sol
Created July 22, 2017 18:48
WTF Token
pragma solidity ^0.4.11;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a * b;
0xAAde9D8a682Bd7e3b1d1403dF0087bD4a8a1043F
0xF278298F27a75c3c6ce93b838C2deF511968DD14
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'tpope/vim-vinegar'
Plugin 'tpope/vim-fugitive'
"-------------Visuals--------------"
set macligatures
set guifont=Fira\ Code:h16
set guioptions-=m " Removes menubar
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set guioptions-=e " Remove gui tabs
set go-=L " Removes left hand scroll bar
set linespace=15
hi LineNr guibg=bg
@ezynda3
ezynda3 / install-zsh-mailcatcher.sh
Last active August 29, 2015 14:08
Quick script to install zsh and bash on CentOS
#!/bin/sh
# Mailcatcher & zsh
yum -y install zsh
yum -y install centos-release-SCL
yum -y install ruby193
yum -y install ruby193-ruby-devel
scl enable ruby193 "gem install mailcatcher"
sed -i 's/sendmail_path = \/usr\/sbin\/sendmail -t -i/sendmail_path = "scl enable ruby193 \/opt\/rh\/ruby193\/root\/usr\/local\/bin\/catchmail"/g' /etc/php.ini
echo "scl enable ruby193 \"/opt/rh/ruby193/root/usr/local/bin/mailcatcher --ip=0.0.0.0\"" >> /etc/rc.local
@ezynda3
ezynda3 / gist:d45f293c5a023d6535b4
Created June 6, 2014 22:08
Webserver Iptables Rules
# Generated by iptables-save v1.4.12 on Mon Jan 13 21:10:32 2014
-F
*filter
:INPUT DROP [1:40]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [16:3248]
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -i docker0 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
@ezynda3
ezynda3 / php.snippets
Created April 2, 2014 02:48
Vim PHP Snippets
snippet <?
<?php
${0}
snippet ec
echo ${0};
snippet <?e
<?php echo ${0} ?>
# this one is for php5.4
snippet <?=
@ezynda3
ezynda3 / .vimrc
Last active June 16, 2016 21:11
Vimrc
syntax enable
set t_Co=256
set background=dark
colorscheme bubblegum
set nocompatible " be iMproved, required
filetype off " required
@ezynda3
ezynda3 / gist:8499153
Created January 19, 2014 01:20
Database seeder
<?php
class JobsTableSeeder extends Seeder {
public function run()
{
$faker = Faker\Factory::create();
Job::truncate();