Skip to content

Instantly share code, notes, and snippets.

View jewel-andraia's full-sized avatar
🧜‍♀️
diving back into coding

Jewel Andraia Darger-Sacher jewel-andraia

🧜‍♀️
diving back into coding
View GitHub Profile
<?php
$json = file_get_contents('upd.json');
$jsonObj = json_decode($json);
echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Extension Updates</key>
<array>
unbind C-b
set -g prefix C-w
# pane switching
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# pane creation
@BrynM
BrynM / git-stylebot.css
Last active June 30, 2018 22:46
Wide GitHub Stylebot Customizations
/*
* Use your whole screen for GitHub! This makes GH's layout more flexible to accomodate widescreen displays.
*
* Use/Installation:
* 1. Get Stylebot at https://chrome.google.com/webstore/detail/stylebot/oiaejidbmkiecgbjeifoejpgmdaleoha?hl=en
* 2. Right-click on a GitHub page and select "Stylebot->Style Element" (it doesn't matter which element).
* 3. When the Stylebot window opens, click the "edit CSS" button and paste the entire contents of this file in.
* 4. (optional) Edit to your tastes if you like, but you may lose the ability to update from this gist unless you
* re-make your changes.
*/
expression => or_expression
or_expression => and_expression ["OR" and_expression]*
and_expression => predicate ["AND" predicate]*
predicate => "(" expression ")" | "NOT" expression | subreddit_test | score_test | day_test
subreddit_test => "subreddit IS " /^\/r\/[a-z0-9]+$/i
| "subreddit MATCHES" /^\/r\/[a-z0-9*]+$/i
/*
(*
ENBF + JavaScript RegEx
*)
start = ws, expression, ws
@jalbertbowden
jalbertbowden / ie-6-9-detect.js
Last active April 7, 2020 10:30 — forked from peteboere/ie-mobile-detect.js
JavaScript IE Version Detection, IE6-10 and IE Mobile
// ----------------------------------------------------------
// A short snippet for detecting versions of IE:
// Uses a combination of object detection and user-agent
// sniffing.
// ----------------------------------------------------------
// If you're not in IE then:
// ie === NaN // falsy
// If you're in IE then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
@jednano
jednano / gitcom.md
Last active May 31, 2023 08:23
Common git commands in a day-to-day workflow

Git Cheat Sheet

Initial Setup

Create an empty git repo or reinitialize an existing one

git init
@carlj
carlj / gist:3782351
Created September 25, 2012 14:44
iPhone 5 UIImage Category
+ (UIImage*)imageNamedForDevice:(NSString*)name {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
{
if (([UIScreen mainScreen].bounds.size.height * [UIScreen mainScreen].scale) >= 1136.0f)
{
//Check if is there a path extension or not
if (name.pathExtension.length) {
name = [name stringByReplacingOccurrencesOfString: [NSString stringWithFormat:@".%@", name.pathExtension]
withString: [NSString stringWithFormat:@"-568h@2x.%@", name.pathExtension ] ];
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: