Skip to content

Instantly share code, notes, and snippets.

@mccahill
mccahill / config.js
Last active November 18, 2021 19:00 — forked from jeffrafter/server.js
Example of a node OAuth (Twitter) and OAuth2 (Google Calendar) client that works with the version 3 Express framework. This assumes you have a config.js file holding the keys and secrets
module.exports = {
'HOSTPATH': 'http://your.host.here',
'PORT': 80,
'EXPRESS_SESSION_SECRET': '123456',
'TWITTER_CONSUMER_KEY': 'your-consumer-key-here',
'TWITTER_CONSUMER_SECRET': 'your-secret-here',
'GOOGLE_APP_ID': 'your-app-id-here',
'GOOGLE_CONSUMER_SECRET': 'your-consumer-secret-here',
};
@NickDiMucci
NickDiMucci / BasicEntityCollision.cs
Last active May 16, 2021 06:54
Basic collision detection via ray casting in Unity.
public class BasicEntityCollision : IEntityCollision {
private Vector3 size;
private Vector3 center;
// Give a bit of space between the raycast and boxCollider to prevent ray going through collision layer.
private float skin = .005f;
private LayerMask collisionMask;
private LayerMask playerMask;
public bool OnGround { get; set; }
@jonathandixon
jonathandixon / Grunt-Cordova-CLI.md
Last active January 5, 2021 22:00
Using Grunt with a Cordova 3 project.

Grunt and Cordova 3

The advantages of using Grunt with Cordova:

  1. It simplifies working with the cordova cli.
  2. It provides a mechanism to copy platform customization to the platforms directory without having to commit the generated plugins and platforms directories to version control.
  3. It provides a way to watch resources and automatically run cordova commands.

Stack Overflow: .gitignore for PhoneGap/Cordova 3.0 projects - what should I commit?

@dommmel
dommmel / capture_screenshot.js
Created January 8, 2013 10:00
Script to take full page screenshots using phantomJs via CasperJs. Run via ```casperjs capture_screenshot.js```
var casper = require('casper').create({
viewportSize: {width: 950, height: 950}
});
casper.start('http://www.google.com/', function() {
this.captureSelector('/tmp/pp.png', 'body');
});
casper.run();
@Jabbslad
Jabbslad / xbox.js
Created January 21, 2012 19:55
Xbox Live Scraper For PhantomJS
/*
Copyright (c) 2012 Jabbslad
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@webdevwilson
webdevwilson / XboxGamercard.class.php
Created January 22, 2011 19:45
PHP API for Xbox Live
<?php
define('URL_PREFIX', 'http://gamercard.xbox.com/en-US/');
define('URL_AFFIX', '.card');
define('SUBSCRIPTION_GOLD', 'Gold');
define('SUBSCRIPTION_SILVER', 'Silver');
class XboxGamercard {
public $gamertag;
anonymous
anonymous / xbl.py
Created October 3, 2011 02:24
Python script to get Xbox Live friends
#!/usr/local/bin/python
import urllib
import urllib2
import re
import json
import htmlentitydefs
import cookielib
LOGIN,PASSWD = "yourlogin@someemail.com", "yourpassword"