This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" To get a list of Actions, run `:actionlist ` | |
" Set the leader key to <SPACE> | |
let mapleader = "\<SPACE>" | |
set ignorecase smartcase | |
set NERDTree | |
set hlsearch | |
set showmode | |
set scrolloff=5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Initialize variables for widescreens | |
multiPane=false | |
# Process options | |
while getopts "w" opt; do | |
case $opt in | |
w) | |
multiPane=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Support\Collection; | |
use Illuminate\Pagination\Paginator; | |
use Illuminate\Pagination\LengthAwarePaginator; | |
/** | |
* Paginator for a Collection | |
* | |
* @param Collection $items | |
* @param int $perPage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$winner = rpsCompare('rock', 'paper'); | |
// $winner = rpsCompare('rock', 'rock'); | |
// $winner = rpsCompare('rock', 'scissors'); | |
// $winner = rpsCompare('scissors', 'paper'); | |
// $winner = rpsCompare('scissors', 'rock'); | |
// $winner = rpsCompare('paper', 'scissors'); | |
// $winner = rpsCompare('paper', 'rock'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Collection; | |
use Illuminate\Pagination\LengthAwarePaginator; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
public function boot() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
set nowrap | |
set encoding=utf8 | |
"""" START Vundle Configuration | |
" Disable file type for vundle | |
filetype off " required | |
" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
1. Setup a Twitter Developer account and create new App, get its consumer key and consumer secret and replace them below | |
2. Replace TWEETS_DB, QUERY, and LANGUAGE values | |
3. Install required packages: `pip install tweepy schedule` | |
4. Run process using `python tweets_to_db.py` | |
""" | |
import tweepy | |
import sqlite3 | |
import datetime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Content from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes | |
**/ | |
return array( | |
100 => 'Continue', | |
101 => 'Switching Protocols', | |
102 => 'Processing', // WebDAV; RFC 2518 | |
200 => 'OK', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Started using Focus https://heyfocus.com/ | |
# But I wanted to launch it from the command line | |
# They had bash commands but I use ZSH so I wrote this script | |
# It lauches with the BASH shell and allows optional times to pass | |
open focus://focus?minutes=${1:-15} | |
# Make file executable |
NewerOlder