Skip to content

Instantly share code, notes, and snippets.

@rskelley9
rskelley9 / form-validator.js
Created September 27, 2013 10:53 — forked from ksolo/form-validator.js
Form Validation
// shorthand for $(document).ready();
$(function(){
//Your code...
});
@rskelley9
rskelley9 / form-validator.js
Last active December 24, 2015 01:59 — forked from ksolo/form-validator.js
Form Validation
// When the user clicks the "Sign Up" button
// They should be notified if any of the following conditions are NOT true
// - The email conforms to the standard pattern
// - The password has at least 8 characters
// - The password has at least one capital letter
// - The password has at least one numeric character
// If any of the above conditions are false
// - The form is not allowed to be submitted
// - Error messages are dislpayed
@rskelley9
rskelley9 / index.html
Last active December 24, 2015 07:59 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>
@rskelley9
rskelley9 / zoo.js
Last active December 24, 2015 07:59 — forked from dbc-challenges/zoo.js
// jQuery.each( collection, callback(indexInArray, valueOfElement) )
// bipeds: function(){
// $.each(this.animals, function(index, animal){
// var sum = 0
// if(animal.legs === 2)
// {
// sum += 1
// return sum
// }

Instructions:

  1. Download this application skeleton.
  2. Convert the app to use AJAX.
  3. Add any files you changed to your gist and submit your code.
/* Here is your chance to take over Socrates!
Spend 10 minutes on each of the following hacks to the Socrates website.
Enter them in the console to make sure it works and then save
your results here.
Choose a new pair for each. Add your names to the section you complete.
*/
@rskelley9
rskelley9 / encryption.rb
Last active February 17, 2016 06:40
This ruby program tests the authentication API I am working by standing in as the application client. (note: the RSA keypair pem files are not included and neither is the encryption password (KEY_PASS).)
require 'openssl'
require "base64"
module Encryption
class << self
# create OpenSSL keypair object, used for generated keypair
def gen_rsa_key(size=2048)
rsa_key = OpenSSL::PKey::RSA.new(size)
@rskelley9
rskelley9 / how_to_change_your_mac_address.md
Last active February 9, 2018 22:50
How to change your MAC address with ruby and shell.

Changing Your MAC Address

The following walkthrough will show you how to temporarily change the MAC address of your ethernet/WiFi device. This is useful for MAC spoofing and network security testing.

Notes

  • MAC addresses are 48-bit, hexadecimal uids used for organizing a physical network. They're factory-assigned by the creators of the device's network interface card and are typically coded into the device's firmware. They're generated by encoding a manufacturer's registered id number.

  • Even if you're using a proxy to mask your machine's IP address, a network administrator can still identify your machine by its unique MAC address.

@rskelley9
rskelley9 / notes.txt
Created September 15, 2015 10:05
Rake Task to Start Sinatra Server
About
-----
This is a rake task for starting a thin server using [shotgun](https://github.com/rtomayko/shotgun).
Notes
-----
* Place `server.rake` in `tasks` directory of your Sinatra project
* Update `config` variable on line 7 if necessary
@rskelley9
rskelley9 / how_to.md
Last active December 29, 2024 17:32
Workaround: Connect your Chromecast to a Hotel Wireless Network

About

I recently relocated for new employment. I've been staying in an extended stay hotel for about 3 weeks now. The hotel I'm staying in gives its guests free Wifi access. However, it requires users to accept terms and conditions on a splash page via browser interface before they can use the network. This makes it difficult to use my Chromecast with the network, as it doesn't have a means of accessing that splash page. While I could call the IT help line, I decided to explore a work-around.

Like many networks, my hotel's network attempts to improve security by using MAC address filtering. Luckily, Mac OS X (10.4 - 10.10) makes it very easy to spoof your network card's MAC address.

Here's how to add a devices like Chromecast, AppleTV, Roku to a wireless network that requires a browser to authenticate and accept terms and conditions.

Before You Start