Get the latest raspbian image here
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function encrypt_mcrypt($msg, $key, $iv = null) { | |
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); | |
if (!$iv) { | |
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); | |
} | |
$pad = $iv_size - (strlen($msg) % $iv_size); | |
$msg .= str_repeat(chr($pad), $pad); | |
$encryptedMessage = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $msg, MCRYPT_MODE_CBC, $iv); | |
return base64_encode($iv . $encryptedMessage); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ls Postman*.tar.gz > /dev/null 2>&1 | |
if [ $? -eq 0 ]; then | |
echo "Removing old Postman tarballs" | |
rm -f $(ls Postman*.tar.gz) | |
fi | |
curlExists=$(command -v curl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This isn't the final version of the script. The third may be incorrect. | |
iptables -I OUTPUT -p tcp -m tcp --dport 443 -j REJECT --reject-with icmp-port-unreachable // blocking https sites | |
iptables -I OUTPUT -p tcp -m tcp --dport 80 -j REJECT --reject-with icmp-port-unreachableBlock // blocking http sites | |
iptables -A OUTPUT -s 150.162.0.0/16 -j ACCEPT // accepting ips from 150.162.*.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# A simple Python application for controlling a relay board from a Raspberry Pi | |
# The application uses the GPIO Zero library (https://gpiozero.readthedocs.io/en/stable/) | |
# The relay is connected to one of the Pi's GPIO ports, then is defined as an Output device | |
# in GPIO Zero: https://gpiozero.readthedocs.io/en/stable/api_output.html#outputdevice | |
import sys | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IPTABLES=/sbin/iptables | |
echo " * flushing old rules" | |
${IPTABLES} --flush | |
${IPTABLES} --delete-chain | |
${IPTABLES} --table nat --flush | |
${IPTABLES} --table nat --delete-chain |
This worked for me and might not work for your.
Try it at your own risk!
$ wget -qO - 'http://archive.neon.kde.org/public.key' | sudo apt-key add -
$ sudo apt-add-repository http://archive.neon.kde.org/user
$ sudo apt-get update
$ sudo apt-get install neon-desktop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Blade::directive('active', function ($expression) { | |
return "<?php echo active_url($expression); ?>"; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel 5.2.43 on 2016-08-21. | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ---------------------------------- | |
# Author: D0rkye | |
# Homepage: http://d0rkye.zsenialis.com/ | |
# Most code probably by kyleabaker: http://kyleabaker.com/2010/07/11/how-to-fix-your-ubuntu-boot-screen/ | |
# Script via http://www.webupd8.org/2010/10/script-to-fix-ubuntu-plymouth-for.html | |
# ---------------------------------- | |
sudo apt install v86d hwinfo -y | |
sudo hwinfo --framebuffer | |
echo "---------------------------------------------------------------" |
NewerOlder