Skip to content

Instantly share code, notes, and snippets.

View ajaypatelaj's full-sized avatar
🎯
Focusing

Ajay Patel ajaypatelaj

🎯
Focusing
View GitHub Profile
@miguelmota
miguelmota / contact.html
Last active May 24, 2016 13:27
Simple Angular.js contact form example.
<div class="col-lg-12 col-md-12 col-sm-12" ng-controller="ContactController">
<div class="alert alert-danger" ng-show="error">
<button class="close" data-dismiss="alert">x</button>
<strong>Error!</strong> An error occured while trying to send message.
</div>
<div class="alert alert-success" ng-show="success">
<button class="close" data-dismiss="alert">x</button>
<strong>Success! </strong> Your message was successfully sent.
</div>
<form role="form" name="contactForm">
@francoishill
francoishill / gist:6483997
Created September 8, 2013 11:27
Media queries for mobile devices - Requires at least requires the meta viewport tag with content 'width=device-width'
/*http://i-skool.co.uk/mobile-development/web-design-for-mobiles-and-tablets-viewport-sizes/*/
/*At least requires the meta viewport tag with content 'width=device-width'*/
@media only screen and (max-width: 1080px) and (orientation : portrait) {
/* PORTRAIT:
Windows Surface Pro*/
}
@media only screen and (max-width: 800px) and (orientation : portrait) {
/* PORTRAIT:
Acer Iconia Tab A100
@ajaypatelaj
ajaypatelaj / WP Twitter Trends Widget
Created July 25, 2012 06:52
WP Twitter Trends Widget
@bennadel
bennadel / jquery.event-trace.js
Created June 27, 2012 15:04
Tracing Event Binding And Event Triggering In jQuery
// Create a private scope.
(function( $, on ){
// I proxy the given function and return the resultant GUID
// value that jQuery has attached to the function.
var createAndReturnProxyID = function( target ){
// When generating the proxy, it doesn't matter what the
// "context" is (window in this case); we never actually
@doginthehat
doginthehat / gist:1890659
Last active May 12, 2023 20:13
compare block helper for handlebars
// {{compare unicorns ponies operator="<"}}
// I knew it, unicorns are just low-quality ponies!
// {{/compare}}
//
// (defaults to == if operator omitted)
//
// {{equal unicorns ponies }}
// That's amazing, unicorns are actually undercover ponies
// {{/equal}}
// (from http://doginthehat.com.au/2012/02/comparison-block-helper-for-handlebars-templates/)
@ryanjduffy
ryanjduffy / dev.palm.com.17701
Created August 25, 2011 14:01
toaster example
var _Example = {
name:"com.technisode.example.App",
kind:"Control",
components:[
{kind:"Button", caption:"click me", onclick:"clicked"},
{kind:"toaster.addtsk", name:"addtsk"}
],
clicked:function() {
this.$.addtsk.openAtCenter();
}
@rsanchez1
rsanchez1 / input.js
Created August 3, 2011 13:46
enyo key input example
{kind: "Input", name: "email", hint: "", value: "", onkeypress: "inputChange"},
inputChange: function(source, event) {
enyo.log("called the input change event");
if (event.keyCode == 13) {
enyo.log("pressed enter button, submit form");
}
}
@bueltge
bueltge / post-process.php
Created June 24, 2011 21:08
WordPress Custom Post Type: Insert post via Frontend
<?php
/**
* post-process.php
* make sure to include post-process.php in your functions.php. Use this in functions.php:
*
* get_template_part('post-process');
*
*/
function do_insert() {
if( 'POST' == $_SERVER['REQUEST_METHOD']
@bebraw
bebraw / gameengines.md
Created January 6, 2011 18:07
List of JS game engines. You can find a wikified version at https://github.com/bebraw/jswiki/wiki/Game-Engines. Feel free to modify that. I sync it here every once in a while.

IMPORTANT! Remember to check out the wiki page at https://github.com/bebraw/jswiki/wiki/Game-Engines for the most up to date version. There's also a "notes" column in the table but it simply does not fit there... Check out the raw version to see it.

This table contains primarily HTML5 based game engines and frameworks. You might also want to check out the [[Feature Matrix|Game-Engine-Feature-Matrix]], [[Game Resources]] and [[Scene Graphs]].

Name Size (KB) License Type Unit Tests Docs Repository Notes
Akihabara 453 GPL2, MIT Classic Repro no API github Intended for making classic arcade-style games in JS+HTML5
AllBinary Platform Platform Dependent AllBinary 2D/2.5D/3D n