Skip to content

Instantly share code, notes, and snippets.

View cparker15's full-sized avatar

Christopher Parker cparker15

View GitHub Profile
@millermedeiros
millermedeiros / json.js
Created September 30, 2011 21:25
RequireJS plugin to load JSON files
/*!
* RequireJS plugin for loading JSON files
* - depends on Text plugin and it was HEAVILY "inspired" by it as well.
*
* IMPORTANT: it only works on r.js optimizer after version 0.26+ 20011/09/27
*
* @author Miller Medeiros
* @version 0.0.1 (2011/06/10)
* Released under the WTFPL <http://sam.zoy.org/wtfpl/>
*/
@aknishiumi
aknishiumi / oauth2_sample.xml
Created January 27, 2012 02:16
OpenSocial: OAuth2 Gadget sample
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="OpenSocialGadget OAuth2 sample">
<OAuth2>
<Service name="[service_name]">
<Authorization url="https://.../authorize"/>
<Token url="https://.../oauth2/token"/>
</Service>
</OAuth2>
<Require feature="oauthpopup" />
@phette23
phette23 / lfm-recent-tracks.html
Created February 19, 2012 22:32
Last.fm Recent Tracks API
<h3>Last.fm Scrobbles</h3>
<!-- div below will be filled in with formatted contents of API response -->
<div id="recent-tracks" style="display:none;"><a href="http://last.fm/">Last.fm</a> data hasn't loaded yet.</div>
<!-- leave as display:none for the fade in effect -->
@corydorning
corydorning / Cross-Browser ::before and ::after pseudo-class polyfill
Last active February 18, 2022 00:24
Cross-Browser ::before and ::after pseudo-class polyfill
/* =============================================================================
CSS Declarations
========================================================================== */
/* ==|== The Standard Way =================================================== */
.foo::before {
/* ...css rules... */
}
@radiosilence
radiosilence / gist:4040553
Created November 8, 2012 18:19
RequireJS with Zurb Foundation
requirejs.config({
shim: {
'foundation/jquery.foundation.topbar': {
deps: ['jquery'],
},
'foundation/jquery.cookie': {
deps: ['jquery']
},
'foundation/jquery.event.move': {
deps: ['jquery']
@NoobsArePeople2
NoobsArePeople2 / gist:4481936
Created January 8, 2013 07:18
Installing Nexus S Drivers on Windows 8

Step by step

  1. Download Android SDK
  2. Run <sdk_loc>\tools\android.bat
  3. In the Android SDK Manager, scroll down to "Extras" and select "Google USB Driver". Install it.
  4. Open the Device Manager (tap the Windows button and type "device manager" to search for it).
  5. Right-click the Nexus S and choose "Update Driver Software..."
  6. In the dialog that pops up select, "Browser my computer for driver software"
  7. Browse to <sdk_loc>\extras\google\usb_driver
  8. Click next until the driver is installed
@sr75
sr75 / wget-jdk-oracle-install-example.txt
Last active March 16, 2023 11:28
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \
-O jdk-7-linux-x64.rpm
# ubuntu
@n0ts
n0ts / get_oracle_jdk_x64.sh
Last active September 16, 2023 12:07
Get latest Oracle JDK package bash shell script for linux/osx/windows
#!/bin/bash
# You must accept the Oracle JDK License Update
# https://www.oracle.com/java/technologies/javase-downloads.html
# usage: get_oracle_jdk_x64.sh <jdk_version> <platform> <ext>
# jdk_version: 14
# platform: linux or osx or windows
# ext: rpm or dmg or tar.gz or exec
jdk_version=${1:-14}
@insin
insin / .jshintrc
Last active April 11, 2023 12:56
Template for HTA / browser React apps
{
"browser": true,
"node": true,
"curly": true,
"devel": true,
"globals": {
"ActiveXObject": true,
"async": true,
"moment": true,
cmd = powershell_out("Get-NetFirewallRule -DisplayName 'Block AWS Metadata'")
case cmd.exitstatus
when 1
powershell_out!("New-NetFirewallRule -DisplayName 'Block AWS Metadata' -Action Block -Direction 'outbound' -RemoteAddress '169.254.169.254' -RemotePort '80' -Protocol 'tcp' | Get-NetFirewallSecurityFilter | Set-NetFirewallSecurityFilter -LocalUser 'O:LSD:(D;;CC;;;SY)(D;;CC;;;LA)'")
when 0
powershell_out!("Set-NetFirewallRule -DisplayName 'Block AWS Metadata' -Action Block -Direction 'outbound' -RemoteAddress '169.254.169.254' -RemotePort '80' -Protocol 'tcp' ")
powershell_out!("Get-NetFirewallRule -DisplayName 'Block AWS Metadata' | Get-NetFirewallSecurityFilter | Set-NetFirewallSecurityFilter -LocalUser 'O:LSD:(D;;CC;;;SY)(D;;CC;;;LA)' ")
end