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 | |
if (! function_exists('version')) { | |
/** | |
* Used to add file modified time for versioning css/js files. | |
* | |
* @param String $filePath - physical path of file. | |
* @return String FilePath | |
*/ | |
function version($filePath = '') | |
{ |
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 is_touch_device() { | |
return (('ontouchstart' in window) | |
|| (navigator.MaxTouchPoints > 0) | |
|| (navigator.msMaxTouchPoints > 0)); | |
} |
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 wrapText(context, text, x, y, maxWidth, lineHeight) { | |
var words = text.split(" "); | |
var line = ""; | |
for(var n = 0; n < words.length; n++) { | |
var testLine = line + words[n] + " "; | |
var metrics = context.measureText(testLine); | |
var testWidth = metrics.width; | |
if(testWidth > maxWidth) { | |
context.fillText(line, x, y); | |
line = words[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
/** | |
* Converts array into utf8 | |
* | |
* @param Array $array | |
* @return Array | |
*/ | |
function utf8_converter($array) | |
{ | |
array_walk_recursive($array, function (&$item, $key) { | |
if (!mb_detect_encoding($item, 'utf-8', 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
.row { | |
width:100%; | |
} | |
.column, | |
.columns { | |
width: 100%; | |
float: left; | |
margin-bottom: 2px; | |
} |
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": "test", | |
"scripts": { | |
"start": "node ./app.js" | |
} | |
} |
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
process.on('SIGINT', function(){ console.log("SIGINT"); terminate() }); | |
process.on('SIGTERM', function(){ console.log("SIGTERM"); terminate() }); | |
var string = "a"; | |
var terminate = function(){ | |
console.log("shuting down..."); | |
string = "b"; | |
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
Frontend: | |
- HTML | |
- CSS | |
- JavaScript | |
- React.js | |
Backend: | |
- Solidity (smart contracts) | |
Tools & Libraries: |