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 | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/etc/cakeagent | |
# Make sure we have some auth information | |
if [ -f /etc/cakeagent/auth.log ] | |
then | |
Authentication=($(cat /etc/cakeagent/auth.log)) | |
else | |
echo "Something has gone wrong and we can not find your auth credentials. Please reinstall" | |
exit 1 |
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
all: fetch report | |
fetch: | |
aws s3 sync --exclude "*" --include "*2018-03-*" --include "*2018-04-*" --include "*2018-05-*" s3://$BUCKET/$PATH/ . | |
report: | |
find . -name \*.gz | xargs gzcat | goaccess --log-format CLOUDFRONT --date-format CLOUDFRONT --time-format CLOUDFRONT -o ./report.html |
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 | |
/** | |
* $ php p.php | |
* S SPAWNED! RRRRS SPAWNED! RRRRRS SPAWNED! R | |
*/ | |
function spawn() { | |
$descriptorspec = array( |
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 | |
# | |
# Setup: | |
# wget https://github.com/restic/restic/releases/download/v0.7.3/restic_0.7.3_linux_amd64.bz2 | |
# bunzip2 restic_0.7.3_linux_amd64.bz2 | |
# mv restic_0.7.3_linux_amd64 /usr/local/bin/restic | |
# chmod a+x /usr/local/bin/restic | |
# | |
# crontab -e | |
# 0 1 * * * /root/bin/restic-backup.sh 2>&1 >>/var/log/restic-backup.log |
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> | |
<style type="text/css"> | |
body { | |
margin: 60px; | |
} |
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 | |
test |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/* /website/static/js/editmode/wysiwyg.js */ | |
CKEDITOR.stylesSet.add( 'custom_styles', [ | |
// Paragraph Styles | |
{ name: 'Regular Text', element: 'p', attributes: { 'class': '' }}, | |
{ name: 'Large Text', element: 'p', attributes: { 'class': 'content__text-L' } } | |
]); | |
CKEDITOR.editorConfig = function( config ) { | |
// add our custom styles |
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 | |
# see: http://unix.stackexchange.com/questions/117093/find-where-inodes-are-being-used | |
# show inode usage: | |
df -i | |
# find where all those files are (roughly) - starts at / | |
find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n | |
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 | |
OLD=$(ls -tr /boot/vmlinuz-* | head -n -3 | cut -d- -f2- | | |
awk '{print "linux-image-" $0 " linux-headers-" $0}' ) | |
echo "OLD:" | |
echo "$OLD" | |
echo | |
echo -n "CURRENT: " | |
uname -r |
NewerOlder