composer create-project --prefer-dist cakephp/app bookmarker
bin/cake server
#!/usr/bin/env bash | |
# Initialize variables for widescreens | |
multiPane=false | |
# Process options | |
while getopts "w" opt; do | |
case $opt in | |
w) | |
multiPane=true |
<?php | |
use Illuminate\Support\Collection; | |
use Illuminate\Pagination\Paginator; | |
use Illuminate\Pagination\LengthAwarePaginator; | |
/** | |
* Paginator for a Collection | |
* | |
* @param Collection $items | |
* @param int $perPage |
<?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'); |
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Collection; | |
use Illuminate\Pagination\LengthAwarePaginator; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
public function boot() |
syntax on | |
set nowrap | |
set encoding=utf8 | |
"""" START Vundle Configuration | |
" Disable file type for vundle | |
filetype off " required | |
" |
""" | |
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 |
<?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', |
#!/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 |