Skip to content

Instantly share code, notes, and snippets.

Avatar
Rooting

Ben (CMNatic) CMNatic

Rooting
View GitHub Profile
@mccabe615
mccabe615 / phpdangerousfuncs.md
Last active Jan 20, 2022
Dangerous PHP Functions
View phpdangerousfuncs.md

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 Sep 15, 2020
Example production Travis file
View .travis.yml
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 Sep 15, 2020
Travis Docker caching config
View .travis.yml
sudo: required
services:
- docker
env:
global:
- REGISTRY_USER=myrobot
# REGISTRY_PASS=...
- secret: "<something long>"
before_script:
View BirdMan
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 Feb 22, 2012
Keeping a fork up to date
View gist:1885435

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