Skip to content

Instantly share code, notes, and snippets.

@ryanckulp
ryanckulp / first_5.rb
Last active January 15, 2016 18:20
first 5 weeks of coding
# week 1
def get_people_names(people)
arr = []
people.each do |person|
arr << person.name
end
arr
end
# week 2
@ryanckulp
ryanckulp / shadow
Last active February 23, 2017 23:40
my final code, which has a lighter grey shadow
#!/bin/bash
convert "$1" \
\( -clone 0 -background grey -colorize 40% -shadow 80x3+10+10 \) \
\( -clone 0 -background grey -colorize 40% -shadow 80x3-5-5 \) \
-reverse -background none -layers merge +repage "shadow-$1"
@ryanckulp
ryanckulp / fomo_z_index.css
Last active May 11, 2017 14:53
un-hide fomo notifications
div#someone-purchased {z-index: 2147483647 !important;}
@ryanckulp
ryanckulp / fomo_selz_snippet.js
Created May 31, 2017 01:53
fomo_selz_snippet
var loadScript = function(location, callback){
var fileRef = document.createElement('script');
fileRef.setAttribute('type','text/javascript');
if (callback) {
if (fileRef.readyState) { // IE
fileRef.onreadystatechange = function() {
if (fileRef.readyState == 'loaded' || fileRef.readyState == 'complete') {
fileRef.onreadystatechange = null;
callback();
@ryanckulp
ryanckulp / fanburst.rb
Created June 3, 2017 15:48
fanburst autofollow script
require 'json'
require 'curb'
# follows artists on fanburst.com using their user_id
# confirmed 4.20.17 that 22,300+ profiles exist
# artist id can be found via 'data' attribute on a profile's "follow" button
COOKIE = 'REDACTED'
CSRF_TOKEN = 'REDACTED'
@ryanckulp
ryanckulp / soundcloud.rb
Created June 3, 2017 16:04
soundcloud autofollow strategy
require 'json'
require 'curb'
# TODO: find artist IDs for a genre relevant to me, ie acoustic rock
BASE_URL = 'https://api-v2.soundcloud.com/me'
FOLLOWINGS = '/followings/'
CLIENT_ID = 'REDACTED'
ACCESS_TOKEN = 'REDACTED'
@ryanckulp
ryanckulp / edd_fomo.js
Created July 19, 2017 00:05
fomo checkout mapping for electronic digital downloads
<script>
function goFomo() {
// return early if inputs invalid
var first_name = jQuery('input[name="edd_first"]').val();
var email = jQuery('input[name="edd_email"]').val();
var products = jQuery('span.edd_checkout_cart_item_title');
var title = jQuery(products[0]).text();
var images = jQuery('.edd_cart_item_image');
SELECT * from users where name LIKE 'Ryan%' AND CREATED_AT BETWEEN '2017-08-07'
AND '2017-08-15' order by id;