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
#These are the results I found from the period of data on the MDNR site | |
#https://www.dnr.state.mn.us/climate/twin_cities/listings.html | |
#1970-01-18 max temp: -13.0 min temp: -28.0 | |
#1970-01-19 max temp: -10.0 min temp: -34.0 | |
#1970-01-20 max temp: -10.0 min temp: -24.0 | |
#1970-01-21 max temp: -3.0 min temp: -29.0 | |
#1970-02-03 max temp: -5.0 min temp: -21.0 | |
#1971-02-07 max temp: -2.0 min temp: -20.0 | |
#1971-02-08 max temp: 0.0 min temp: -23.0 |
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
SELECT TABLE_NAME 'Table', COLUMN_NAME 'Field', COLUMN_TYPE 'Type', IS_NULLABLE 'Null', | |
COLUMN_KEY 'Key', COLUMN_DEFAULT 'Default', EXTRA 'Extra' FROM information_schema.columns WHERE | |
table_schema = 'yourdb' ORDER BY TABLE_NAME; |
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
ef save_payment | |
form_params = params.permit( | |
:stripeToken, | |
).deep_stringify_keys | |
# # Create a Stripe Customer: | |
customer = nil | |
begin | |
customer = Stripe::Customer.create( |
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> |
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
<?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
#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
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
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
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'; |
NewerOlder