This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myApp.directives', []).directive('currency', function () { | |
return { | |
restrict: 'A', | |
transclude: false, | |
require: '^ngModel', | |
scope: false, | |
controller: function ($scope, $element, $attrs) { | |
$scope.$watch($attrs.ngModel, function (newValue, oldValue) { | |
var val = newValue.toString().replace(/[^\d.-]/g, ''); | |
val = val.length > 0 ? val : '""'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.pulse { | |
-webkit-animation: pulse 1s linear infinite; | |
-moz-animation: pulse 1s linear infinite; | |
-ms-animation-name: pulse 1s linear infinite; | |
-o-animation-name: pulse 1s linear infinite; | |
animation-name: pulse 1s linear infinite; | |
} | |
@-webkit-keyframes pulse { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Taken from http://snipplr.com/view.php?codeview&id=4086 | |
*/ | |
function calcBusinessDays(dDate1, dDate2) { // input given as Date objects | |
var iWeeks, iDateDiff, iAdjust = 0; | |
if (dDate2 < dDate1) return -1; // error code if dates transposed | |
var iWeekday1 = dDate1.getDay(); // day of week |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
name: 'Verizon', | |
domain: 'vtext.com' | |
}, | |
{ | |
name: 'Sprint', | |
domain: 'vtext.com' | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * from people where email not like '%_@_%_.__%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* RC4 symmetric cipher encryption/decryption | |
* | |
* @license Public Domain | |
* @param string key - secret key for encryption/decryption | |
* @param string str - string to be encrypted/decrypted | |
* @return string | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Converts an ArrayBuffer directly to base64, without any intermediate 'convert to string then | |
// use window.btoa' step. According to my tests, this appears to be a faster approach: | |
// http://jsperf.com/encoding-xhr-image-data/5 | |
function base64ArrayBuffer(arrayBuffer) { | |
var base64 = '' | |
var encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' | |
var bytes = new Uint8Array(arrayBuffer) | |
var byteLength = bytes.byteLength |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>items</key> | |
<array> | |
<dict> | |
<key>assets</key> | |
<array> | |
<dict> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>KHIM Inspections Installation</title> | |
</head> | |
<body> | |
<h2>Release builds</h2> | |
<a href="itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/u/9675825/manifest.plist">KHIM Inspections v0.2.0</a></body> | |
<h2>Testing builds</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/ruby -w | |
require 'rubygems' | |
require 'rmagick' | |
require 'fileutils' | |
include Magick | |
puts 'Go!' | |
limit = ARGV.length > 1 ? ARGV[1].to_i : 18 | |
file = ARGV[0] |
OlderNewer