Skip to content

Instantly share code, notes, and snippets.

View jakiestfu's full-sized avatar
🌺

Jacob Kelley jakiestfu

🌺
View GitHub Profile
//if($request_url)...
// Save GET queries
$parsedUrl = parse_url(home_url($request_url));
if($parsedUrl['query']){
$queries = explode('&',$parsedUrl['query']);
foreach($queries as $query){
$queryInfo = explode('=',$query);
$_GET[$queryInfo[0]]=end($queryInfo);
}
@jakiestfu
jakiestfu / twitPuff.js
Created August 17, 2012 17:08
Twitter iOS Puff
var twitPuff = (function () {
function openPuff(imgUrl) {
if (typeof imgUrl == undefined) {
return;
}
$('#tw-puff-blanket').css({
display: 'block',
lineHeight: window.innerHeight + 'px'
});
$('#tw-puff-blanket').html('<img>');
@jakiestfu
jakiestfu / context.css
Created August 28, 2012 23:03
Contextual Menus with Twitters Bootstrap
.dropdown-context .nav-header{
cursor:default;
}
.dropdown-context:before, .dropdown-context-up:before {
position: absolute;
top: -7px;
left: 9px;
display: inline-block;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
@jakiestfu
jakiestfu / metro-parallax.js
Created September 10, 2012 21:05
Background Parallax for Metro-UI-CSS
var coefficient = 10;
$('.metro-scroll').scroll(function(e){
var bgpos = Math.floor((this.scrollLeft/coefficient)*-1) + 'px 0px';
$('body').css('background-position', bgpos);
});
@jakiestfu
jakiestfu / iTunes.js
Created October 11, 2012 18:03
iTunes Search API
var iTunes = (function() {
var endpoint = 'http://itunes.apple.com/search',
searchOptions = {
term: '',
country: 'US',
media: '',
entity: '',
attribute: '',
callback: 'iTunes.end',
@jakiestfu
jakiestfu / gh.enterprise.js
Last active December 10, 2015 19:18
This bit of Javascript will activate the GitHub Enterprise styling on most GitHub pages.
(function(d) {
d.body.classList.add('enterprise');
var style = document.createElement('style')
style.type = 'text/css'
style.innerHTML = '.enterprise .header-logo-blacktocat:hover, .enterprise .top-nav a:hover, .enterprise #user-links a:hover, .enterprise .advanced-search:hover{color:#fff;text-shadow:0 0 10px #fff;}'
d.getElementsByTagName('head')[0].appendChild(style);
})(document);
@jakiestfu
jakiestfu / IcoMoon Session.json
Last active December 10, 2015 20:49
IcoMoon Session for GitHub Mobile Webapp. http://icomoon.io/app/
{"share":"6", "iconsVersion":"1.5", "icomoon":"{\"selected\":[{\"idx\":\"635\",\"unicode\":\"e000\"},{\"idx\":\"10\",\"unicode\":\"e001\"},{\"idx\":\"383\",\"unicode\":\"e002\"},{\"idx\":\"492\",\"unicode\":\"e003\"},{\"idx\":\"1\",\"unicode\":\"e005\"},{\"idx\":\"517\",\"unicode\":\"e006\"},{\"idx\":\"669\",\"unicode\":\"e007\"},{\"idx\":\"579\",\"unicode\":\"e008\"},{\"idx\":\"578\",\"unicode\":\"e009\"},{\"idx\":\"613\",\"unicode\":\"e00a\"},{\"idx\":\"430\",\"unicode\":\"e00b\"},{\"idx\":\"409\",\"unicode\":\"e00c\"},{\"idx\":\"385\",\"unicode\":\"e00d\"},{\"idx\":\"316\",\"unicode\":\"e00e\"},{\"idx\":\"284\",\"unicode\":\"e00f\"},{\"idx\":\"713\",\"unicode\":\"e010\"},{\"idx\":\"582\",\"unicode\":\"e011\"},{\"idx\":\"575\",\"unicode\":\"e013\"},{\"idx\":\"47\",\"unicode\":\"e015\"},{\"idx\":\"585\",\"unicode\":\"e004\"},{\"idx\":\"532\",\"unicode\":\"e012\"},{\"idx\":\"774\",\"unicode\":\"e014\"}],\"customIcons\":[{\"metadata\":{\"id\":\"iconic\",\"name\":\"Iconic\",\"link\":\"http://somerandomdude.com/
@jakiestfu
jakiestfu / polyTexMe.js
Last active December 12, 2015 02:38
Ported to JS from https://gist.github.com/4700257 by @kelleydv This is a function in python that accepts a list of arrays. The arrays represent the coefficients of a polynomial, in increasing degree. For example, the array (1,0,3) represents the polynomial 3x^2+1. The output is an array of lines of LaTeX code suitable for insertion into an enume…
/*
* polyTexMe
* @param polynomials: Array
* @return: Array
*
* polyTexMe takes a list of coefficient-arrays,
* where the degree of the term is equal to the index
*/
var polyTexMe = function(polynomials){
<?PHP
class Diamonds{
private $math;
private $latex;
function makeExpressions(){
$style = $this->style;
This file has been truncated, but you can view the full file.
'use strict';
var COMPILED = !0, goog = goog || {};
goog.global = this;
goog.DEBUG = !1;
goog.LOCALE = "en";
goog.provide = function (a) {
if (!COMPILED) {
if (goog.isProvided_(a))
throw Error('Namespace "' + a + '" already declared.');