Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block dcpesses

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
brew_cask_command="$brew_command cask"
echo '#!/bin/bash'
echo ''
echo 'trap ctrl_c INT'
echo 'function ctrl_c() {'
echo 'echo "** Trapped CTRL-C"'
dcpesses / index.js
Created Mar 29, 2017
HTTPS Proxy Server in node.js
View index.js
// via
// Install npm dependencies first
// npm init
// npm install --save url@0.10.3
// npm install --save http-proxy@1.11.1
// node ./index.js
var httpProxy = require("http-proxy");
var http = require("http");
var url = require("url");
var net = require('net');
dcpesses /
Created Jun 5, 2016 — forked from nrollr/
Enable SSL in Apache for 'localhost' (OSX, El Capitan)

Enable SSL in Apache (OSX)

The following will guide you through the process of enabling SSL on a Apache webserver

  • The instructions have been verified with OSX El Capitan (10.11.2) running Apache 2.4.16
  • The instructions assume you already have a basic Apache configuration enabled on OSX, if this is not the case feel free to consult Gist: "Enable Apache HTTP server (OSX)"

Apache SSL Configuration

Create a directory within /etc/apache2/ using sudo mkdir /etc/apache2/ssl
Next, generate two host keys:

dcpesses / Chromecast batch conversion script
Last active Mar 3, 2017 — forked from steventrux/Chromecast batch conversion script
A bash script to batch convert video files for chromecast compatibility
View Chromecast batch conversion script
#! /bin/bash
# Batch Convert Script by StevenTrux
# Modified by Danny Pesses to handle filenames with spaces and display color highlighting
# The Purpose of this Script is to batch convert any video file to mp4 or mkv format for chromecast compatibility
# this script only convert necessary tracks if the video is already
# in H.264 format it won't convert it saving your time!
dcpesses / laravel-intro.markdown
Last active Aug 29, 2015
Introduction to Laravel Framework v4.2
View laravel-intro.markdown

Please note, this documentation originally appeared at and has been updated to fix several issues and/or outdated code.


Introduction to Laravel Framework

This book is about Laravel, a web application development framework that saves you time and effort and makes web development a joy. Laravel has shaken up the PHP community in a big way - especially when you consider that version 1.0 of Laravel was only a couple of years ago. It has been generating a lot of buzz with the promise of making web applications fast and simple to create. Using Laravel, you can build and maintain high-quality web applications with minimal fuss.

dcpesses / mysql_splitdump.php
Last active Aug 29, 2015
Splits a LARGE sql dump into individual sql files of each database.
View mysql_splitdump.php
* mysql_splitdump.php
* Splits a LARGE sql dump into individual sql files of each database
* Based off of example code from
# With a little help from
sudo raspi-config
# Expand Filesystem
# Advanced Options -> Audio -> Change to 3.5 Headphone
# Internationalisation Options
sudo reboot
# if locale errors show up,
sudo dpkg-reconfigure locales
# Uncheck en_UK.UT8
# Check en_US.UTF8
dcpesses / photoreflect.js
Last active Mar 27, 2016
Re-enable right-click & add Download links to thumbnail pages on PhotoReflect pages.
View photoreflect.js
Copy the single line of code below, then add it as a new bookmark to your web browser of choice:
Then browse to the thumbnails of the album, click on that bookmark, and...enjoy!
document.oncontextmenu=document.body.oncontextmenu = new Function("return true");
View restore-server-after-mountain-lion-upgrade.markdown

Get your dev server back to speed on Mountain Lion

(based off of 'Get Mountain Lion and Homebrew to Be Happy')

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

View twitter-entities.js
* twitter-entities.js
* This function converts a tweet with "entity" metadata
* from plain text to linkified HTML.
* See the documentation here:
* Basically, add ?include_entities=true to your timeline call
* Based off existing code from Wade Simmons
* Licensed under the MIT license
You can’t perform that action at this time.