$ nano /etc/lightdm/lightdm.conf
Add:
xserver-command=X -s 0 -dpms
Note: This assumes you've already flashed an SD card. In this gist I used Jesse Stretch Lite.
After flashing the sd card, create and add a blank file named "ssh" to the /boot partition. This will turn on ssh when the Pi boots. Also create and add a file called "wpa_supplicant.conf" to the /boot partition as well. Configure the contents of the wpa_supplicant.conf file like this: {See This Gist}
Insert your sd card into the Pi and boot the Pi. From a remote machine find your Pi's IP address using a tool like Fing.
After logging in, run these commands:
| dd if=/dev/urandom of=/dev/hdX |
| unzip -p /path/to/file.zip | sudo dd of=/dev/sdX bs=4M conv=fsync status=progress |
Assuming libapache2-mod-php is a suitable way to enable PHP in Apache for you, you can proceed in this way:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0
| ffmpeg -i <file.mov> -vcodec copy -acodec aac -strict experimental -ab 128k <file.mp4> |
| public function getInstagram($count=3) { | |
| $user_id = 'YOUR-USER-ID'; | |
| $token = 'YOUR-TOKEN'; | |
| $cnt = (int) $count; | |
| $url = "https://api.instagram.com/v1/users/{$user_id}/media/recent/?access_token={$token}&count={$count}"; | |
| $curl_connection = curl_init($url); | |
| curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30); | |
| curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true); | |
| curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false); | |
| $result = curl_exec($curl_connection); |
| /** | |
| * Add troll names as a key/value pair: | |
| * 'troll-name':'' | |
| * Leave the value blank. | |
| */ | |
| var theTrolls = {'some troll':'','another troll':''}, | |
| getDivs = document.getElementsByTagName('div'), | |
| divLength = getDivs.length, | |
| i, | |
| foundOne; |
| <?php | |
| require('./lib/Stripe.php'); | |
| if ($_POST) { | |
| // Set your secret key: remember to change this to your live secret key in production | |
| Stripe::setApiKey("SECRET_KEY"); | |
| $error = ''; | |
| $success = ''; | |
| // Create the charge on Stripe's servers - this will charge the user's card |