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
$ git status --porcelain --untracked-files=no | awk '{if ($1 == "M") print;}' | cut -d " " -f 3-20 | awk '{gsub(/ /,"\\ ");print}' | xargs -L 1 git diff --summary | cut -d " " -f 7-20 | awk '{gsub(/ /,"\\ ");print}' | xargs -L 1 git checkout |
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
<?php | |
/* | |
* | |
* This script will backup your web site by remotely archiving all files on the root FTP directory. | |
* It will work even if your web server is memory limited buy splitting zips in several arhive files it they are too many files. | |
* All zip files will be stored in a directory called temporary which must be writable. | |
* | |
* How to use it: | |
* - Place the script at the root of your FTP. |
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
<?php | |
$filename = $_GET['url']; | |
$ext = pathinfo($filename, PATHINFO_EXTENSION); | |
switch ($ext) { | |
case "gif": | |
header('Content-Type: image/gif'); | |
readfile($filename); | |
break; |
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 object into a key/value par with an optional prefix. Used for converting objects to a query string */ | |
var qs = function(obj, prefix){ | |
var str = []; | |
for (var p in obj) { | |
var k = prefix ? prefix + "[" + p + "]" : p, | |
v = obj[k]; | |
str.push(angular.isObject(v) ? qs(v, k) : (k) + "=" + encodeURIComponent(v)); | |
} | |
return str.join("&"); | |
} |
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
'use strict'; | |
angular.module('cafeApp') | |
.directive('inspect', function($timeout, $http) { | |
Element.prototype.serializeWithStyles = (function () { | |
var defaultStylesByTagName = {}; | |
var noStyleTags = {'BASE':true,'HEAD':true,'HTML':true,'META':true,'NOFRAME':true,'NOSCRIPT':true,'PARAM':true,'SCRIPT':true,'STYLE':true,'TITLE':true}; |
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
(function () { | |
var root = angular.element(document.getElementsByTagName('body')); | |
var watchers = 0; | |
var f = function (element) { | |
if (element.data().hasOwnProperty('$scope')) { | |
watchers += (element.data().$scope.$$watchers || []).length; | |
} | |
angular.forEach(element.children(), function (childElement) { |
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
<html> | |
<head> | |
</head> | |
<script src="http://code.angularjs.org/1.3.0-beta.18/angular.js"></script> | |
<script> | |
var myApp = angular.module('myApp',[]); | |
myApp.controller('MyCtrl', function MyCtrl($scope) { | |
$scope.name = 'Superhero'; | |
setTimeout(function() { |
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"?> | |
<Response> | |
<Dial action="http://twimlets.com/simulring?Dial=true&FailUrl=+http%3A%2F%2Ftwimlets.com%2Fvoicemail%3FEmail%3Dhello%2540minsh.net%26Message%3DMinsh%2520office%2520is%2520busy%2520right%2520now%252C%2520please%2520leave%2520a%2520message%2520and%2520we" timeout="30"> | |
<Number url="http://twimlets.com/whisper?Message=press+any+key">917411718230</Number> | |
<Number url="http://twimlets.com/whisper?Message=press+any+key">918971927344</Number> | |
</Dial> | |
</Response> |
OlderNewer