This file contains hidden or 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 is just a Gist that i want to show off on my personal websites. These are where i will be creating a library of useful information | |
and code, including possible plugins for Commnetivity. |
This file contains hidden or 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 | |
header("Content-Type: application/json"); | |
$curl = curl_init(); | |
$query_array = array( | |
"a"=>"zone_load_multi" | |
,"tkn"=>"8fd535bb...11dbbcdab" | |
,"email"=>"[email protected]" | |
); |
This file contains hidden or 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 | |
$cache_file = "/home/cpaneluser/public_html/weather.json"; | |
if (file_exists($cache_file) && (filemtime($cache_file) > (time() - 60 * 5 ))) { | |
// Cache file is less than five minutes old. | |
// Don't bother refreshing, just use the file as-is. | |
$file = file_get_contents($cache_file); | |
This file contains hidden or 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
To delete all your exited containers. | |
% docker ps -a -q --filter "status=exited" | xargs docker rm | |
And to then delete all your untagged images. | |
% docker rmi `docker images -q --filter "dangling=true"` |
This file contains hidden or 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
To list drives by UUIDs | |
sudo blkid | |
/dev/sda1: UUID="38159b38-18fc-4511-81eb-a0e0fbf35f84" TYPE="ext2" PARTUUID="23c65b5b-01" | |
/dev/sda5: UUID="Afr241-YeaV-VvzI-KwGm-TFDv-pC2s-bIAuRy" TYPE="LVM2_member" PARTUUID="23c65b5b-05" | |
/dev/sdb: UUID="92604d6f-b523-46e7-9b42-0e36946d299f" SEC_TYPE="ext2" TYPE="ext3" | |
/dev/mapper/bigfoot--1--vg-root: UUID="12747bcd-ce80-46be-a511-776150125d23" TYPE="ext4" | |
/dev/mapper/bigfoot--1--vg-swap_1: UUID="fa7cd8db-4abc-4654-832e-1c31863db2c3" TYPE="swap" |
This file contains hidden or 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
apt-get update && \ | |
sudo apt-get install linux-image-extra-virtual apparmor lxc cgroup-lite docker.io && \ | |
sudo update-rc.d docker defaults && \ | |
sudo groupadd docker && \ | |
sudo chown root:docker /var/run/docker.sock && \ | |
sudo chown maietta:docker /var/run/docker.sock && \ | |
sudo usermod -aG docker maietta && \ | |
sudo service docker start |
This file contains hidden or 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
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
This file contains hidden or 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 | |
while read LINE; do curl -o /dev/null --silent --progress-bar --head --write-out '%{http_code} %{time_starttransfer} %{url_effective}\n' "$LINE" >> urls_result.txt done < fiddler.txt |
This file contains hidden or 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 | |
/* | |
Made by Kudusch (blog.kudusch.de, kudusch.de, @Kudusch) | |
--------- | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2004 Sam Hocevar <[email protected]> |
This file contains hidden or 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
curl https://check.torproject.org/exit-addresses | awk '/^ExitAddress/' | grep -o '[0-9]\+[.][0-9]\+[.][0-9]\+[.][0-9]\+' > $PWD/tor-exit-addresses |
OlderNewer