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
cat <<EOF | sendmail -t | |
To: [email protected] | |
Subject: Testing | |
From: [email protected] | |
This is a test message | |
EOF |
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 | |
#By Nate Flink | |
#Invoke on the terminal like this | |
#curl -s https://gist.github.com/nateflink/9056302/raw/findreplaceosx.sh | bash -s "find-a-url.com" "replace-a-url.com" | |
if [ -z "$1" ] || [ -z "$2" ]; then | |
echo "Usage: ./$0 [find string] [replace string]" | |
exit 1 | |
fi |
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
CREATE USER 'foobaz'@'%' IDENTIFIED BY 'foopassword'; | |
CREATE DATABASE IF NOT EXISTS `foobaz` ; | |
GRANT ALL PRIVILEGES ON foobaz.* TO foobaz@localhost IDENTIFIED BY 'foopassword'; | |
;superuser | |
CREATE USER 'user'@'%' IDENTIFIED BY 'pass'; | |
GRANT ALL PRIVILEGES ON *.* TO 'user'@'%' WITH GRANT OPTION; | |
CREATE USER 'user'@'localhost' IDENTIFIED BY 'pass'; |
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
Show hidden characters
[ | |
// | |
// TABS (REGULAR) | |
// | |
// Tab set | |
{ | |
"class": "tabset_control", | |
"layer0.texture": "", |
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
function check_anagrams(first_words, second_words) { | |
if (first_words.length != second_words.length) { | |
console.log(0); | |
return; | |
} | |
var letters=[], is_anagram, first_word, second_word, exists; | |
for (var i=0; i<first_words.length; i++) { |
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
#alias to reload the bash profile after adding an alias | |
alias sourcebash="source ~/.bash_profile" | |
#alias to quickly add an alias to the bash profile | |
alias aliasappend=aliasappendfunction | |
aliasappendfunction() { | |
echo 'alias '$1'="'$2'"' >> ~/.bash_profile; | |
sourcebash | |
} |
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 | |
$xml_post_string = | |
'<?xml version="1.0" encoding="UTF-8"?> | |
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.edocbuilder.com/"> | |
<SOAP-ENV:Body> | |
<ns1:getOrderFile> | |
<ns1:docSessionID>replace-with-real-a49a-3862345df1061</ns1:docSessionID> | |
<ns1:email>EMAIL</ns1:email> | |
<ns1:password>PASSWORD</ns1:password> | |
</ns1:getOrderFile> |
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
val = "32.244" | |
if val.is_a? String | |
if val.match /\d+\.\d\d$/ | |
val | |
elsif val.match /(\d+\.\d\d)\d+$/ | |
$1 | |
elsif val.match /\d+\.\d$/ | |
val+'0' | |
elsif val.match /\d+\.$/ | |
val+'00' |
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
<% unless current_user.stripe_charge_id_opencall_2017.blank? %> | |
<div class="ui green message"> The provided card has been charged. </div> | |
<% else %> | |
<div class="ui grid"> | |
<div class="twelve wide column"> | |
<h4>You will only be charged once.</h4> | |
<p>Payment processing occurs offsite via Stripe payments. Your credit information is not stored on this site.</p> | |
</div> |