Skip to content

Instantly share code, notes, and snippets.

View joshuakemp1's full-sized avatar

Joshua Kemp joshuakemp1

  • Raleigh, N.C.
View GitHub Profile
@kaustavha
kaustavha / speedup.md
Last active January 30, 2024 22:29
Increase playback speed on any video
document.querySelector('video').playbackRate = 1.5
  • Videos on any page using a video tag. Youtube, vimeo etc

  • (Right click/2 finger click on mac -> inspect element); on the video to reveal the <video></video> tag, otherwise you might get a var v = document.querySelector('video'); var t = prompt('Set the playback rate'); v.playbackRate = parseFloat(t) err.

  • Paste this into the console (go to console from the window that pops up from inspect element or cmd + option + i):

@manuelmeurer
manuelmeurer / Instructions.md
Created March 29, 2016 19:10
Bowling Code Challenge

Bowling Code Challenge

  • Please create a repository in GitHub (or a similar service) so that we can follow your progress.
  • The implementation should use "vanilla" JavaScript (no libraries or frameworks).
  • Remember that we are more interested how you approach this problem than seeing you complete all the features (if you don't have enough time to finish everything, simply explain how you would continue the implementation).

Minimum requirements

  • Implement a scoring system for a bowling game according to these rules:
  • A game consists of 10 frames.
// iMacro CheatSheet - Command Reference
// http://wiki.imacros.net/Command_Reference
// iMacros supports 3 types of variables:
// * The macro variables !VAR0 thru !VAR9. They can be used with the SET and ADD command inside a macro.
// * Built-in variables. They contain certain values set by iMacros.
// * User-defined variables. They are defined in-macro using the SET command.
@kenrett
kenrett / Selenium Cheat Sheet.md
Last active May 25, 2023 01:28
Selenium Cheat Sheet - Ruby

#Getting Started

##Webpage:

<html>
<head>
    <title>Testing with Ruby and Selenium WebDriver</title>
</head>
 
<body bgcolor="antiquewhite">
@andrewh
andrewh / anyconnect.scpt
Last active April 12, 2024 08:48
Applescript to automate the Cisco AnyConnect SSL VPN client on OS X Mavericks
-- 1. Place in ~/Library/Scripts and enable the Applescript menu via the Applescript Editor
-- 2. Substitute "vpn.example.com" and "redacted" for your VPN server and password
-- 3. Open Security & Privacy System Preferences, go to Privacy, Accessibility
-- 4. Enable Applescript Editor and System UI Server
-- 5. Trigger script from the menu
-- 6. Enjoy being connected
tell application "Cisco AnyConnect Secure Mobility Client"
activate
end tell
@mhagerty
mhagerty / yahooOauth
Created December 5, 2012 19:39
A sample Ruby script utilizing Mechanize to navigate Oauth authentication for Yahoo Sports API
# Author: Mike Hagerty, 11/28/2012
# The purpose of this script is to pull data from the Yahoo Sports API. I tried to document the steps as thoroughly as possible, as I had a
# tough time navigating this process
# Yahoo Sports requires Oauth authentication for personal team-related data. This requirement complicates the automation of pulling data, as Oauth in general requires user interaction to complete the authentication process.
# Mechanize is used to automate the user interaction steps required to authenticated via Oauth.
# This script also has example code for storing the data in a mongodb at the end
#!/usr/bin/ruby
@barnes7td
barnes7td / sublime_setup.md
Last active March 28, 2024 17:59
Sublime Terminal Setup

Setup Terminal for Sublime Shorcut "subl":

Open terminal and type:

1. Create a directory at ~/bin:

mkdir ~/bin

2. Copy sublime executable to your ~/bin directory:

@aspyct
aspyct / sort.rb
Last active October 29, 2023 03:08
Ruby implementation of quicksort, mergesort and binary search
# Sample implementation of quicksort and mergesort in ruby
# Both algorithm sort in O(n * lg(n)) time
# Quicksort works inplace, where mergesort works in a new array
def quicksort(array, from=0, to=nil)
if to == nil
# Sort the whole array, by default
to = array.count - 1
end
@igrigorik
igrigorik / pss.rb
Created May 28, 2012 18:18
pagespeed insights API ruby example
require 'net/https'
require 'json'
require 'uri'
#
# Use your project key to query the API
# 1) go to Google API Console: https://code.google.com/apis/console/
# 2) go to "Services" tab and enable "Page Speed Online API"
# 3) go to "API Key" tab and copy your "API Key"
#
@timsavery
timsavery / Ruby Download Parse JSON
Created January 22, 2012 15:19
Example For Downloading and Parsing JSON (Ruby)
require "rubygems"
require "json"
require "net/http"
require "uri"
uri = URI.parse("http://api.sejmometr.pl/posiedzenia/BZfWZ/projekty")
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)