jason$ PASSWORD="Passw0rD"
Safer: If someone has access to the database, they cannot see the passwords in plaintext and must run them through a hashing algorithm
jason$ echo $PASSWORD | md5
c0e49fa492cf94f8a9eab8b8166f271b
#!/usr/bin/env python | |
''' | |
This script will create a file of a specified size | |
Usage: ./create_file_of_size.py --filename myfile --filesize 2 --magnitude mb | |
=> File myfile with size 2mb been created | |
''' | |
# Dependencies | |
import math |
# How random is Ruby's Random Class? | |
require 'descriptive_statistics' | |
def rand_distribution(iters) | |
found = Hash.new | |
100.times { |key| found[key.to_s] = 0 } | |
iters.times do | |
rand_num = Random.rand(0..99) | |
found[rand_num.to_s] += 1 |
# encoding: UTF-8 | |
# Jason M Willems | |
# github.com/at1as | |
# 15 September 2014 | |
# 514-746-0452 | |
require 'Base64' | |
ENCODED = "pr+/trjGu8vDeXmuw8F9y8TT1MPKyYXP2qKJjL7b2tOP5Nnb4dvolsTZ55ry3fCe7eX35/Wk8uvo9v2q//ut+f3/CMCz2gQIt/0P/w0VEQYIDgjCCBAYC9PIHRIQHhLVItD4ISIbIRvl2tkOMCEwIiA54Ss25CbmLjc4LuswLkfvREDyRkNBTDz4SU9VVklDUg4PEA==" |
*PyPi Package* | |
Structure: | |
├── LICENSE.md | |
├── README.md | |
├── hello_world | |
│ ├── __init__.py | |
│ ├── hello_world.py | |
├── hello_world_runner.py |
#!/usr/bin/env ruby | |
## Find necessary method for desired result | |
## entering: | |
## jason$ method_find.rb "HELLO" "hello" | |
## returns: | |
## HELLO.downcase == hello | |
## HELLO.swapcase == hello | |
Create Controller
Generate Model (also creates a migration)
Create Migration
/* Paste into your browser console to replace all instances in FaceBook of big 3 Canadian political parties | |
with "Big Government Party" and their leaders with "Big Government Politician" */ | |
function traverseDOM(node, func) { | |
func(node); | |
node = node.firstChild; | |
while (node) { | |
traverseDOM(node, func); | |
node = node.nextSibling; | |
} |
#!/usr/bin/env python2.7 | |
''' | |
This program will add a number to its reverse until a palindrome is found | |
It will try up to 1000 iterations (configurable), or else notify the user a palindrome was not found | |
''' | |
count, maxIterations, currentValue = 1, 1000, '' | |
#Accept integers in range(1,100) |
#!/usr/bin/env python2.7 | |
''' | |
Return the count of zeros contained in the numbers within a specified range | |
''' | |
index, increment, count = 1, 2, 0 | |
ceiling = int(raw_input("\nCeiling: ")) | |
oddEven = raw_input("Search through:\nOdd numbers \t- 1 \nEven numbers \t- 2 \nOdd & Even \t- 3\n\nInput(1,2,3)? ") |