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
Headphones Last.fm auto update | |
----- |
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
/** | |
* The onOpen function runs automatically when the Google Docs document is | |
* opened. Use it to add custom menus to Google Docs that allow the user to run | |
* custom scripts. For more information, please consult the following two | |
* resources. | |
* | |
* Extending Google Docs developer guide: | |
* https://developers.google.com/apps-script/guides/docs | |
* | |
* Document service reference documentation: |
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
#DigitalOcean VPSs usually come with the empty configuration: all traffic is allowed. Just to make sure of this, we can flush the firewall rules - that is, erase them all: | |
iptables -F | |
#We can then add a few simple firewall rules to block the most common attacks, to protect our VPS from script-kiddies. We can't really count on iptables alone to protect us from a full-scale DDOS or similar, but we can at least put off the usual network scanning bots that will eventually find our VPS and start looking for security holes to exploit. First, we start with blocking null packets. | |
iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP | |
#We told the firewall to take all incoming packets with tcp flags NONE and just DROP them. Null packets are, simply said, recon packets. The attack patterns use these to try and see how we configured the VPS and find out weaknesses. The next pattern to reject is a syn-flood attack. | |
iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP | |
#Syn-flood attack means that the attackers |
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
<script type="text/javascript" charset="utf-8"> | |
$(document).ready(function() { | |
var arrExclusive = ["A5", "A6"]; | |
for (index = 0; index < arrExclusive.length; index++) { | |
$('input[type="checkbox"][name$="'+arrExclusive[index]+'"]').change(function(event) { | |
var objClicked = this; | |
var clicked = $(this).attr('name').substr(0,$(this).attr('name').length-2); | |
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
<!DOCTYPE html> | |
<html > | |
<head> | |
<meta charset="UTF-8"> | |
<title>Material Design Lite components demo</title> | |
<link rel="stylesheet" href="css/style.css"> |
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
<div class="media"> | |
<div class="col-sm-3"> | |
<div style="margin: 1em; padding: 0em; border: 1px solid #ccc"> | |
<div style="height:150px; background: url('/scripting/upload/surveys/272922/images/Hardloopster.png') no-repeat; background-size: contain; background-position: center"></div> | |
<div style="padding: 1em"><small>Boodschap 1</small><p>Zorgeloos genieten van het moment met muziek die past bij jouw stemming en smaak</p></div> | |
</div> | |
</div> | |
<div class="col-sm-3"> | |
<div style="margin: 1em; padding: 0em; border: 1px solid #ccc"> | |
<div style="height:150px; background: url('/scripting/upload/surveys/272922/images/Radio%20DJ\'s%205386666.png') no-repeat; background-size: contain; background-position: center"></div> |
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 | |
error=false | |
echo "Starting phplint.." | |
while test $# -gt 0; do | |
current=$1 | |
shift | |
if [ ! -d $current ] && [ ! -f $current ] ; then |
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
json = (loadfile "/home/pi/domoticz/scripts/lua/JSON.lua")() | |
local sonos_name = 'Draagbaar' | |
local sonos=assert(io.popen('curl http://localhost:5005/'..sonos_name..'/state')) | |
local status = sonos:read('*all') | |
sonos:close() | |
local jsonStatus = json:decode(status) | |
local tv_woonkamer_status = 'TV Woonkamer System Alive' |
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
# inherit | |
source ~/.git-bash-for-mac.sh | |
# aliases | |
alias laradock="cd ~/workspace/laradock" | |
alias prod-up="docker-compose -f ~/workspace/laradock/production-docker-compose.yml up -d" | |
alias up="docker-compose up -d" | |
alias down="docker-compose down" | |
alias build="docker-compose up --build" | |
alias workspace="cd ~/workspace" | |
alias serve="php artisan serve" |