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
# Goto a directory you can write to: | |
cd ~ | |
#get composer: | |
curl -s https://getcomposer.org/installer | php | |
# move composer into a bin directory you control: | |
sudo mv composer.phar /usr/local/bin/composer | |
# double check composer works | |
composer about |
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
/* Send Google Form by Email v2.1 */ | |
/* For customization, contact the developer at amit@labnol.org */ | |
/* Tutorial: http://www.labnol.org/?p=20884 */ | |
function Initialize() { | |
var triggers = ScriptApp.getProjectTriggers(); | |
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
<?= | |
_:: | |
o_O | |
() | |
; | |
class _{ static | |
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
#!/bin/bash | |
docker ps --filter "label=com.docker.compose.project" -q | xargs docker inspect --format='{{index .Config.Labels "com.docker.compose.project"}}'| uniq |
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(Recognition,c){ | |
var recognition = new Recognition; | |
recognition.lang = 'en-US'; | |
recognition.interimResults = false; | |
recognition.maxAlternatives = 5; | |
recognition.start(); | |
c.log('listening now'); | |
function triggerEvent(elem, Event, type) { | |
var event = new Event(type, {'bubbles': true, 'cancelable': 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
## Usage Example: serv home.html 5050 | |
## 2nd and 3rd arguments are optional | |
serv() { | |
open -a "Google Chrome" http://localhost:${2:-2020}/${1:-} | |
/usr/bin/php -S localhost:${2:-2020} -t . | |
} |
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
/* | |
* Pass it your string of latlong and it'll return a promise to come back with the locality, city. | |
* | |
* getCity('12.9715987,77.5945627').done(function(cityName){ | |
* $elem.val( cityName ) | |
* }); | |
* | |
* Info: jQuery is required for $.Deferred() and $.getJSON to work! | |
* Regardless of everything modify it as per your convenience :) | |
*/ |
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
{ | |
"require": { | |
"mfacenet/hello-world": "v1.*" | |
} | |
} |
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 | |
DB::listen(function ($sql) { | |
$log = vsprintf('[SQL] - ' . str_replace('?', '"%s"', $sql->sql), $sql->bindings); | |
if( App::runningInConsole() ) { | |
print($log); | |
} else { | |
\Log::info($log); | |
} |
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 lang="en-US" class="no-js"> | |
<head> | |
<meta charset="UTF-8"> | |
<script type="text/javascript">(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script> | |
<title></title> | |
<style type="text/css"> .no-js span.disabledjavascript{ display:block; } .js span.disabledjavascript{ display:none; } </style> | |
</head> | |
<body> | |
<h2>Regular Page</h2> |
NewerOlder