Skip to content

Instantly share code, notes, and snippets.

View CMNatic's full-sized avatar
Rooting

Ben (CMNatic) CMNatic

Rooting
View GitHub Profile
@mccabe615
mccabe615 / phpdangerousfuncs.md
Last active May 27, 2024 11:38
Dangerous PHP Functions

Command Execution

exec           - Returns last line of commands output
passthru       - Passes commands output directly to the browser
system         - Passes commands output directly to the browser and returns last line
shell_exec     - Returns commands output
\`\` (backticks) - Same as shell_exec()
popen          - Opens read or write pipe to process of a command
proc_open      - Similar to popen() but greater degree of control
pcntl_exec - Executes a program
@JayH5
JayH5 / .travis.yml
Last active September 15, 2020 21:56
Example production Travis file
sudo: required
services:
- docker
env:
global:
- IMAGE_NAME=acme-corp/cake-service
- REGISTRY_USER=myrobot
# REGISTRY_PASS=...
- secret: "<something long>"
@JayH5
JayH5 / .travis.yml
Last active September 15, 2020 21:54
Travis Docker caching config
sudo: required
services:
- docker
env:
global:
- REGISTRY_USER=myrobot
# REGISTRY_PASS=...
- secret: "<something long>"
before_script:
anonymous
anonymous / BirdMan
Created February 9, 2014 15:34
package crappyBird;
import java.awt.Graphics;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URL;
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream