Skip to content

Instantly share code, notes, and snippets.

View tsteur's full-sized avatar

Thomas Steur tsteur

View GitHub Profile
@mathiasbynens
mathiasbynens / setZeroTimeout.js
Created September 14, 2010 22:23
Cross-browser-compatible setZeroTimeout
/*! Cross-browser-compatible setZeroTimeout
*
* I took the original setZeroTimeout and made it cross-browser-compatible, using setTimeout(fn, 0) as a fallback in case postMessage is not supported.
* Mathias Bynens <http://mathiasbynens.be/>
* See <http://mathiasbynens.be/notes/settimeout-onload>
*
* Copyright statement below:
*
* See <http://dbaron.org/log/20100309-faster-timeouts>
* By L. David Baron <[email protected]>, 2010-03-07, 2010-03-09
@toddb
toddb / teamcity.pp
Created March 20, 2012 21:52
Puppet Teamcity script - straightforward, non-modularised & procedural
class teamcity {
@package{ [ "java-1.6.0-openjdk", "wget", "tar", "gzip" ]:
ensure => installed,
}
$src="http://download.jetbrains.com/teamcity/TeamCity-7.0.tar.gz"
$username="teamcity"
$installdir="/opt"
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active November 5, 2024 18:44
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@tsteur
tsteur / find_unused_styles_in_titanium_mobile_alloy.php
Created April 26, 2013 18:26
Finds unused styles within a Titanium Mobile - Alloy project. In order to execute it you need to place it within the root of your Titanium project and execute it using `php find_unused_styles_in_titanium_mobile_alloy.php`. PHP should be preinstalled on almost all Macs. Script only searches for app/styles/*.tss files. It does not perform a search…
<?php
foreach (getAllTssFilenames() as $tssfile){
echo "\nSearching for unused styles in $tssfile:\n";
outputUnusedStyles($tssfile);
}
function getAllTssFilenames()
{
return glob('app/styles/*.tss');
@grantges
grantges / index.js
Created September 11, 2014 21:09
Create object properties on an Alloy Widget
/** Create your Widget **/
var myWidget = Alloy.createWidget("myWidget");
/*
Now the widget has an icon and title based on the default values as we defined them
in the widget.js file (lines 26/27)
*/
@asfaltboy
asfaltboy / css_path.js
Created March 28, 2015 14:19
Get Element CSS Selector
/*
* Copyright (C) 2015 Pavel Savshenko
* Copyright (C) 2011 Google Inc. All rights reserved.
* Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2008 Matt Lilek <[email protected]>
* Copyright (C) 2009 Joseph Pecoraro
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@askilondz
askilondz / gistlog.yml
Last active August 10, 2024 18:35
Adaptive Streaming with MPEG-DASH and HLS using AWS

Adaptive Streaming has become the neccessity for streaming video and audio. Unfortantely, as of this post, there isn't a whole lot of tutorials that accumulate all of the steps to get this working. Hopefully this post achieves that. This post focuses on using Amazon Web Services (AWS) to transcode for HLS and DASH and be the Content Delivery Network (CDN) that delivers the stream to your web page. We'll be using Video.js for the HTML5 player as well as javascript support libaries to make Video.js work with HLS and DASH.

So Here's what you need:

Set up three S3 buckets

@igogrek
igogrek / How I started loving Vue.md
Last active April 27, 2024 03:59
How I started loving Vue

This article is the logical conclusion of my previous article - How I stopped loving Angular. Recommended to check before reading this one.

We have been using Vue instead of Angular for nearly a year now. In this article, I will highlight my impressions on Vue and differences compared to Angular.

Moreover, I will add some hands on experience notes from usage of Vue on real projects.