GNU Octave is a high-level interpreted language, primarily intended for numerical computations.
(via GNU Octave)
- not equal
~=
- logical AND
&&
function onFormSubmit(e) { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var row = sheet.getLastRow(); | |
var receiptId = row - 1; | |
sheet.getRange(row,6).setValue(receiptId); | |
var user = {receiptId: receiptId, name: e.namedValues['Name'][0], email: e.namedValues['Email'][0], amount: e.namedValues["Donation Amount"][0]}; | |
sendDoc_(user); | |
} | |
function sendDoc_(user) { |
require "google/cloud/storage" | |
require "google/cloud/speech" | |
# puts "Your project id?" | |
# project_id = gets.chomp | |
# | |
# puts "Your bucket name?" | |
# bucket_name = gets.chomp | |
puts "File name?" |
class Sudoku | |
def initialize(board_string) | |
p "Start game!" | |
board(board_string) | |
end | |
def solve!(string) | |
create_string_array(string) |
# Eg. PORT_NUMBER -> 3000 | |
kill -9 $(lsof -t -i:PORT_NUMBER -sTCP:LISTEN) |
#!/usr/bin/env ruby | |
require "english" | |
require "rubocop" | |
ADDED_OR_MODIFIED = /A|AM|^M/.freeze | |
file_list = `git status --porcelain`.split(/\n/) | |
file_list = file_list.select do |file_name_with_status| | |
file_name_with_status =~ ADDED_OR_MODIFIED |
git for-each-ref --sort=-committerdate --format="%(refname)" refs/heads > all | head -n 10 > first-10 | |
diff first-10 all | sed "s/> refs\/heads\///g" | xargs git branch -D | rm all | rm first-10 |
GNU Octave is a high-level interpreted language, primarily intended for numerical computations.
(via GNU Octave)
~=
&&
function validEmail(email) { // see: | |
var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; | |
return re.test(email); | |
} | |
function validateHuman(honeypot) { | |
if (honeypot) { //if hidden form filled up | |
console.log("Robot Detected!"); | |
return true; | |
} else { |
# move all files from current directory to upper directory | |
mv * ../ | |
# copy all files in 'a' folder to 'b' folder | |
cp -a /a/. /b/ |
# Open Terminal | |
vim ~/.vimrc | |
# Mac OS-X -> .vimrc ; Window -> .gvimrc | |
# Add it in the file and adjust the font size (h12) accordingly | |
set guifont=Menlo\ Regular:h15 |