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
S3KEY="my aws key" | |
S3SECRET="my aws secret" | |
function uploadS3 | |
{ | |
path=$1 | |
file=$2 | |
aws_path=$3 | |
bucket='aws-bucket-name' | |
date=$(date +"%a, %d %b %Y %T %z") |
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
// Hide the image on error | |
$("img").error(function(){ | |
$(this).hide(); | |
}); | |
// Change the missing image to a default image | |
$('img').error(function(){ | |
$(this).attr('src', 'no-image.jpg'); | |
}); |
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 language="JavaScript"> | |
var now = new Date(); | |
var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); | |
var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December'); | |
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate(); | |
function fourdigits(number) { | |
return (number < 1000) ? number + 1900 : number; | |
} |
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
var myDate = '05/05/2019'; | |
var today = new Date(); | |
function process(date) { | |
var parts = date.split("/"); | |
return new Date(parts[2], parts[1] - 1, parts[0]); | |
} | |
if (process(myDate) <= today) { |
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
var isLocal = location.host.includes('localhost'); |
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
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^example.com$ [NC] | |
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] |
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
<cfoutput> | |
<cfif #StructKeyExists(FORM, "token")#> | |
<cfif #FORM.token# NEQ '##############'> | |
Sorry, Authentication Failed | |
<cfelse> | |
<cfif #FORM.channel_id# NEQ "############"> | |
What are you doing?!?!!?? This channel is not authenticated - stop trying to break stuff. | |
<cfelse> | |
<cfif #FORM.text# EQ "restart"> | |
@#FORM.user_name# - Sonis is restarting |
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
<cfoutput> | |
<cfif #StructKeyExists(FORM, "token")#> | |
<cfif #FORM.token# NEQ '#PUBLICKEY##'> | |
Sorry, Authentication Failed | |
<cfelse> | |
<cfset resturants = "BW3, Roosters, Wendys, Gibbys, Tuscan Table, El Palmor, Goodwins Family | |
Resturant, Cardo's Pizza, Zanzy's Pizza, High Court Cafe, Arby's, Grand Buffett, McDonalds, KFC, Richie's New York Corner Deli, "> | |
<cfset objRandomReport=ArrayNew(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
/* Padding and Margins */ | |
/* 0 */ | |
.padding-top-0 { | |
padding-top: 0px; | |
} | |
.padding-bottom-0 { | |
padding-bottom: 0px; | |
} | |
.padding-left-0 { |
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
Homebrew | |
https://brew.sh/ | |
Oh-My-Zsh | |
https://github.com/robbyrussell/oh-my-zsh/ | |
Lepton | |
http://hackjutsu.com/Lepton/ | |
iTerm2 version 3 |