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 | |
ask("What's your four or five digit pin? Press pound when finished", array( | |
"choices"=>"[4-5 DIGITS]", | |
"terminator" => "#", | |
"timeout" => 15.0, | |
"mode" => "dtmf", | |
"interdigitTimeout" => 5, | |
"onChoice" => "choiceFCN", | |
"onBadChoice" => "badChoiceFCN" | |
) |
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
.shadow-text { | |
text-align: left; | |
color: #fff; | |
text-shadow: black 0.1em 0.1em 0.2em; | |
} |
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
I wrote an article about this on my blog, check it here: | |
http://omarusman.com/blog/tutorials/xampp-innodb-storage-engine-failed-windows8 |
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
Rooting Cherry Mobile Thunder | |
* Do this http://www.technodify.com/how-to-root-micromax-a91-and-cherry-mobile-thunder/ | |
* Note: You need to copy Bin4ry file to C: and rename the folder to something else. ex: (rootandroid) | |
You need to run RunMe.bat as Administrator | |
* Install SQLITE for Root in Playstore | |
* Follow this http://forum.xda-developers.com/showthread.php?t=1835056 |
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
DB::enableQueryLog(); | |
DB::listen( | |
function ($sql) { | |
// To save the executed queries to file: | |
// Process the sql and the bindings: | |
foreach ($sql->bindings as $i => $binding) { | |
if ($binding instanceof \DateTime) { | |
$sql->bindings[$i] = $binding->format('\'Y-m-d H:i:s\''); | |
} else { |
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
/// Replaces commonly-used Windows 1252 encoded chars that do not exist in ASCII or ISO-8859-1 with ISO-8859-1 cognates. | |
var replaceWordChars = function(text) { | |
var s = text; | |
// smart single quotes and apostrophe | |
s = s.replace(/[\u2018\u2019\u201A]/g, "\'"); | |
// smart double quotes | |
s = s.replace(/[\u201C\u201D\u201E]/g, "\""); | |
// ellipsis | |
s = s.replace(/\u2026/g, "..."); | |
// dashes |
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
/** | |
* Toast directive. Ex: <toast msg="Some message." style="success|info|warning|danger"></toast> | |
*/ | |
.directive('toast', [function () { | |
return { | |
restrict: 'E', | |
template: function (elem, attr) { | |
return '<div class="toast">\n' + | |
' <div class="{{ style }}" role="alert">{{msg}}</div>\n' + |
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
* Install miio library: https://github.com/aholstenson/miio | |
`node install -g miio` | |
* Get device token: | |
`miio --discover` | |
or use [python-mirobo](https://github.com/rytilahti/python-mirobo) | |
* See and follow miio library documentation. |
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
private class LongRunningGetIO extends AsyncTask <Void, Void, String>{ | |
protected String getASCIIContentFromEntity(HttpEntity entity) throws IllegalStateException, IOException{ | |
InputStream in = entity.getContent(); | |
StringBuffer out = new StringBuffer(); | |
int n = 1; | |
while (n>0) { | |
byte[] b = new byte[4096]; | |
n = in.read(b); | |
if (n>0){ |
OlderNewer