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
/** | |
* Execute a function given a delay time | |
* | |
* @param {type} func | |
* @param {type} wait | |
* @param {type} immediate | |
* @returns {Function} | |
*/ | |
var debounce = function (func, wait, immediate) { | |
var timeout; |
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
const PORT = process.env.PORT || 3001; | |
const STR_REGEX = 'socket\\-[a-z0-9]+'; | |
var express = require('express'); | |
var app = express(); | |
var http = require('http').createServer(app); | |
var io = require('socket.io')(http, { | |
handlePreflightRequest: (req, res) => { |
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
<VirtualHost *:80> | |
ServerName dee-basic.test | |
Redirect permanent "/" "https://dee-basic.test/" | |
</VirtualHost> | |
<VirtualHost *:443> | |
ServerName dee-basic.test | |
DocumentRoot /var/www/dee-basic/web |
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
gerhana 2 juli 2019 | |
------------------- | |
jarak bulan-matahari = 152107000-372930 = 151734070 km | |
jari2 bumi = 6378 km | |
jari2 matahari = 695700 km | |
jari2 bulan = 1737.5 km | |
jarak bulan ke permukaan bumi = 372930-6378 = 366552 km |
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 | |
namespace app\controllers; | |
use app\classes\SSE; | |
use app\helpers\Notification; | |
use Yii; | |
use yii\web\Controller; | |
/** |
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
/* File laramix/main.less */ | |
@import '../node_modules/bootstrap/dist/css/bootstrap.css'; | |
@import '../node_modules/admin-lte/dist/css/AdminLTE.css'; | |
@import '../node_modules/admin-lte/dist/css/skins/_all-skins.css'; | |
@import '../node_modules/font-awesome/css/font-awesome.css'; | |
@import '../node_modules/admin-lte/plugins/iCheck/all.css'; | |
@import 'css/app.less'; |
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 | |
// Based on <https://github.com/mecha-cms/extend.minify> | |
define('MINIFY_STRING', '"(?:[^"\\\]|\\\.)*"|\'(?:[^\'\\\]|\\\.)*\'|`(?:[^`\\\]|\\\.)*`'); | |
define('MINIFY_COMMENT_CSS', '/\*[\s\S]*?\*/'); | |
define('MINIFY_COMMENT_HTML', '<!\-{2}[\s\S]*?\-{2}>'); | |
define('MINIFY_COMMENT_JS', '//[^\n]*'); | |
define('MINIFY_PATTERN_JS', '/[^\n]+?/[gimuy]*'); | |
define('MINIFY_HTML', '<[!/]?[a-zA-Z\d:.-]+[\s\S]*?>'); |
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 | |
namespace console\controllers; | |
/** | |
* Description of AlmanakController | |
* | |
* @author Misbahul D Munir <[email protected]> | |
* @since 1.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
void setup(void){ | |
} | |
long t1=0,t2=0; | |
void loop(void){ | |
if(t1 < millis()){ | |
// kode di sini yang mau di delay | |
t1 = millis() + 3000; // delay tiap 3 detik | |
} |