Skip to content

Instantly share code, notes, and snippets.

@jakebellacera
jakebellacera / ICS.php
Last active March 11, 2024 05:12
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
@dariusk
dariusk / canvas2Xscale.js
Created August 29, 2011 14:38
Artifact-free screen scaling for a canvas game, limited to 1X, 2X, 4X
// Adapted from Zachary Johnson's Commander Clone 0.2 screen scaling example http://www.zachstronaut.com/projects/commander-clone/0.2/game.html
// Modified to strictly choose 1X or 2X or 4X scaling as appopriate, so we don't end up with screwed up scaling artifacts.
// NOTE: uses jQuery for the DOM load event
$(function () {
fullScreenify();
window.addEventListener('resize', fullScreenify, false);
function fullScreenify() {
@paularmstrong
paularmstrong / jquery.fancyselect.css
Created September 12, 2011 17:05
Fancy Select Box replacement that allows you to style everything about your select box
.fancyselect {
display: inline;
position: absolute;
padding: 2px 2px 0 2px;
}
.fancyselect.open {
background: #FFF;
border: 2px solid #DDD;
padding: 0;
}
@aemkei
aemkei / LICENSE.txt
Last active October 28, 2023 16:42 — forked from 140bytes/LICENSE.txt
Binary Tetris - 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@jgarber
jgarber / MIT-LICENSE.txt
Created April 4, 2012 14:57
Responsive video
Copyright (c) 2011 ZURB, http://www.zurb.com/
@badsyntax
badsyntax / labelled_marker.js
Created April 12, 2012 09:45
Google Maps V3 Labelled Marker
/*
* An example of how to use a Google Map overlay to display a label on top of marker.
* This is a slight re-work of http://www.tdmarketing.co.nz/blog/2011/03/09/create-marker-with-custom-labels-in-google-maps-api-v3/
* I suggest you rather view that blog post, this code is pasted here purely for my own personal reference.
*/
var
point = {
lat: 37.8478115,
long: 15.2934327
@paularmstrong
paularmstrong / verifyemail.js
Created June 28, 2012 19:13
Verify email addresses
// Verify an email address
// Usage: node verifyemail.js billgates@gmail.com
var exec = require('child_process').exec,
net = require('net'),
email = process.argv.splice(2)[0],
domain = email.split('@')[1];
function verify(mxrecord) {
console.log('connecting to', mxrecord, '...');
@ronkorving
ronkorving / ios6-timers.js
Last active March 9, 2022 03:40
iOS6 webkit timer bug workaround
(function (window) {
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6.
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling.
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction).
// This code is released in the public domain. Do with it what you want, without limitations. I do not promise
// that it works, or that I will provide support (don't sue me).
// Author: rkorving@wizcorp.jp
var timeouts = {};
@phoboslab
phoboslab / touch-button.js
Last active August 10, 2021 14:44
Touch Button Plugin for Impact
ig.module(
'plugins.touch-button'
)
.requires(
'impact.system',
'impact.input',
'impact.image'
)
.defines(function(){ "use strict";
@bzgeb
bzgeb / TriggerContainerEditor.cs
Created September 28, 2012 14:52
Example Drag & Drop area in a custom inspector for the Unity editor
using UnityEngine;
using System.Collections;
using UnityEditor;
[CustomEditor (typeof(TriggerContainer))]
public class TriggerContainerEditor : Editor
{
private SerializedObject obj;