Skip to content

Instantly share code, notes, and snippets.

View ryankinal's full-sized avatar

Ryan Kinal ryankinal

View GitHub Profile
@ryankinal
ryankinal / README.md
Created December 1, 2017 16:39
Copies course listings code to a pantheon environment.

This script should be downloaded and customized to your local environment. The script copies code from the course listings plugin (as defined on line 16) to a temp directory, does some cleanup, and then copies it to a default site (line 3) or to the specified site (with the -s option).

Usage

cltowp [-s [site]] [-n]

Options

  • -s - Copies the course listings code to the provided site
  • -n - Copies vendor and node_modules directories in addition to source code
var base = {
getType: function() {
return 'badass';
}
};
var user = Object.create(base);
user.setName = function(name) {
this.name = name;
};
@ryankinal
ryankinal / gulpfile.js
Created July 5, 2016 19:37
Synchronous vs. Asynchronous tasks
/*
There are three main tasks I want to run one after the other (synchronously).
Some of these tasks are divided into smaller tasks which can be run concurrently.
Based on the output of gulp, it seems that this isn't quite happening,
though I may be misreading it.
Output:
[15:14:07] Using gulpfile ~\projects\colibri\common-client\gulpfile.js
[15:14:07] Starting 'lint'...
[15:14:07] Finished 'lint' after 18 ms
@ryankinal
ryankinal / curriculum.md
Last active October 27, 2016 16:40
JS Curriculum

JS Curriculum

Goals:

  • Know the language.
  • HTTP requests/responses
  • Be able to create client-side and server-side code effectively, with a focus toward the toolsets being used for McKissock S1.
  • A probject of some hopefully useful sort

Sections

@ryankinal
ryankinal / randomalbum.js
Created May 7, 2014 15:18
Amazon Cloud Player Random Album
javascript:(function(){
var a = document.querySelectorAll('.album .albumTitle'),
e = a[Math.floor(Math.random() * a.length)];
if (confirm(e.innerText)) {
e.parentNode.querySelector('a.playAlbum').click();
}
})();
@ryankinal
ryankinal / LICENSE
Created February 13, 2014 21:51 — forked from rlemon/LICENSE
RYAN KINAL ESQUIRE PUBLIC LICENSE
Version 1, February 2014
Copyright (C) 2014 Ryan Kinal <email@address.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed, it is not used for evil (If you have to ask yourself if it is being used for evil, it is probably being used for evil.), and you consider buying Ryan Kinal a beer(no cheap stuff... well okay).
RYAN KINAL ESQUIRE PUBLIC LICENSE
@ryankinal
ryankinal / link.txt
Created October 1, 2013 14:01
JavaScript is Jarig
@ryankinal
ryankinal / button.html
Created June 7, 2013 13:54
Ah, building buttons with tables
<table id='tbl_custpage_filter' cellpadding='0' cellspacing='0' border='0' style='margin-right:6px;cursor:hand;'>
<tr id='tr_custpage_filter' class='pgBntG'>
<td id='tdleftcap_custpage_filter'>
<img src='/images/nav/ns_x.gif' class='bntLT' border='0' height='50%' width='3' />
<img src='/images/nav/ns_x.gif' class='bntLB' border='0' height='50%' width='3' />
</td>
<td id='tdbody_custpage_filter' height='20' valign='top' nowrap class='bntBgB'>
<input type='button' style='' class='rndbuttoninpt bntBgT' value='Apply Filter' id='custpage_filter' name='custpage_filter' onmousedown="this.setAttribute('_mousedown','T'); setButtonDown(true, false, this);" onmouseup="this.setAttribute('_mousedown','F'); setButtonDown(false, false, this);" onmouseout="if(this.getAttribute('_mousedown')=='T') setButtonDown(false, false, this);" onmouseover="if(this.getAttribute('_mousedown')=='T') setButtonDown(true, false, this);" >
</td>
<td id='tdrightcap_
@ryankinal
ryankinal / index.html
Created June 4, 2013 20:38
jQuery breaking
<html>
<head>
<title>jQuery can break too</title>
<script>
$('#myDiv').size(); // 0
</script>
</head>
<body>
<div id="myDiv"></div>
<script>
@ryankinal
ryankinal / index.html
Created June 4, 2013 20:34
Fucking solution, motherfucker.
<html>
<head>
<title>DOING SMART STUFF</title>
<script src="library.js"></script>
</head>
<body>
<h1>OMG some DOM</h1>
<div>Some more elements</div>
<script>
myLib.start();