Skip to content

Instantly share code, notes, and snippets.

View paulallies's full-sized avatar
🖥️
Coding

Paul Allies paulallies

🖥️
Coding
View GitHub Profile
@paulallies
paulallies / modal.js
Created September 2, 2011 19:09
Modal
requires: yui2-container
//declaration
var YAHOO = Y.YUI2;
var myPopup = function (modalElement) {
//create a locally scoped YUI panel
var modal = new YAHOO.widget.Panel(modalElement, {
fixedcenter: true,
visible: false,
@paulallies
paulallies / YUIAjaxPost.js
Created September 11, 2011 11:39
Ajax Posr
var cfg = {
method: 'POST',
data: '{"clientname": "Test"}',
headers: { 'Content-Type': 'application/json' },
on: { success: function (id, o, args) {
Y.log('Success');
},
failure: function () {
Y.log('Post Error');
}
@paulallies
paulallies / git.txt
Created September 13, 2011 11:03
Git Commands
Initialise repository: git init
Remote add: git remote add appharbor https://paulallies@appharbor.com/nanotouch.git
Add files to repository: git add .
Check in: git commit -m 'Updated'
Push to repository: git push appharbor master
@paulallies
paulallies / AO.js
Created September 16, 2011 20:07
Arrays and Objects
//Bad way to declare objects and arrays
var person = new Object(),
keys = new Array();
//A better way is to use object literals
var person = {},
keys = [];
//Example
var person = {
@paulallies
paulallies / testshit.js
Created June 5, 2012 19:57
this is a test
var test = function(){
alert('hello from github');
};
@paulallies
paulallies / testshit.js
Created June 5, 2012 19:57
this is a test
var test = function(){
console.log('hello from github');
};
var https = require('https');
var test = "";
var host = 'api.mongolab.com';
var options = {
host: host,
port: 443,
path: "/",
method: 'GET'
};
var YUI = require("yui").YUI;
@paulallies
paulallies / dabblet.html
Created December 18, 2012 08:44
Untitled
<!doctype html>
<head>
<head>
<title>This is a test</title>
</head>
<body>
<h2>Testing</h2>
</body>
</head>
@paulallies
paulallies / dabblet.css
Created December 18, 2012 08:43
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@paulallies
paulallies / dabblet.html
Created December 18, 2012 09:52
Untitled
<!doctype html>
<head>
<head>
<title>This is a test</title>
</head>
<body>
<h2>Testing</h2>
</body>
</head>