git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
#!/bin/bash | |
echo "XAMPP Switcher" | |
if [ -z "$1" ] ; then | |
# No argument | |
echo | |
echo "Silahkan ketik versi PHP" | |
echo "[5] Untuk PHP versi 5" | |
echo "[7] Untuk PHP versi 7" |
/* | |
* gpio_relay.c - example of driving a relay using the GPIO peripheral on a BCM2835 (Raspberry Pi) | |
* | |
* Copyright 2012 Kevin Sangeelee. | |
* Released as GPLv2, see <http://www.gnu.org/licenses/> | |
* | |
* This is intended as an example of using Raspberry Pi hardware registers to drive a relay using GPIO. Use at your own | |
* risk or not at all. As far as possible, I've omitted anything that doesn't relate to the Raspi registers. There are more | |
* conventional ways of doing this using kernel drivers. | |
*/ |
<?php | |
/* | |
Script memerlukan file bernama ".htaccess" dengan isi seperti ini: | |
----------------------------------- | |
Options -MultiViews | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^ index.php [QSA,L] | |
----------------------------------- |
/* | |
Sketch auto off baterai | |
menggunakan relay | |
Author: Komputronika.com | |
*/ | |
// Definisi |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
<?php | |
function user_ip_address() { | |
if( array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER) && !empty($_SERVER['HTTP_X_FORWARDED_FOR']) ) { | |
if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',')>0) { | |
$addr = explode(",",$_SERVER['HTTP_X_FORWARDED_FOR']); | |
$ip = filter_var(trim($addr[0]), FILTER_VALIDATE_IP) | |
return $ip; | |
} else { | |
return $_SERVER['HTTP_X_FORWARDED_FOR']; |
<?php | |
// Constants | |
$FIREBASE = "_YOUR_FIREBASE_URL_"; | |
$NODE_DELETE = "temperature.json"; | |
$NODE_GET = "temperature.json"; | |
$NODE_PATCH = ".json"; | |
$NODE_PUT = "temperature.json"; | |
// Data for PUT |