This file contains hidden or 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 | |
$stocks = array ( | |
'shutterstock' => array ( | |
'name' => 'Shutterstock', | |
'host' => 'ftp.shutterstock.com', | |
'login' => '', | |
'password' => '', | |
'dir' => '/', |
This file contains hidden or 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
googleimagesdownload -k "islam wallpaper 1080x1920" --size large --format jpg --aspect_ratio tall -l 300 --chromedriver "/Users/dodi/Desktop/labs/images/chromedriver" | |
googleimagesdownload -k "robolox" --size large --format jpg -l 300 --chromedriver "/Users/dodi/Desktop/labs/images/chromedriver" | |
googleimagesdownload -k "graffiti wallpaper iphone" --size large --format jpg -l 300 --chromedriver "/Users/dodi/Desktop/labs/images/chromedriver" | |
googleimagesdownload -k "graffiti art wallpaper android" --size large --format jpg -l 300 --chromedriver "/Users/dodi/Desktop/labs/images/chromedriver" | |
pop art wallpaper iphone |
This file contains hidden or 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
/* If you want to refresh the page if there is no activity then you need to figure out how to define activity. | |
Let's say we refresh the page every minute unless someone presses a key or moves the mouse. | |
This uses jQuery for event binding: */ | |
var time = new Date().getTime(); | |
$(document.body).bind("mousemove keypress", function(e) { | |
time = new Date().getTime(); | |
}); | |
function refresh() { |
This file contains hidden or 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 | |
$servername = "localhost"; | |
$username = "root"; | |
$password = "root"; | |
$dbname = "local"; | |
// Create connection | |
$conn = mysqli_connect($servername, $username, $password, $dbname); | |
// Check connection |
This file contains hidden or 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> | |
<title>Pendaftaran Mahasiswi Imut</title> | |
</head> | |
<style> | |
body{ | |
background:rgba(0,0,0,0.8); | |
} | |
#form-pendaftaran, |
This file contains hidden or 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
Reduce database queries (http://www.catswhocode.com/blog/speeding-up-your-wordpress-blog-7-effective-solutions) | |
It is important to reduce unecessary queries to your database as each query take a few milliseconds to execute. First, you might want to know how many queries your blog execute in order to display a page. To do so, paste the code below in your functions.php file. Once done, just have a look to your site footer to know how many queries has been executed and how many time it took to completely load the page. | |
add_action( 'wp_footer', 'tcb_note_server_side_page_speed' ); | |
function tcb_note_server_side_page_speed() { | |
date_default_timezone_set( get_option( 'timezone_string' ) ); | |
$content = '[ ' . date( 'Y-m-d H:i:s T' ) . ' ] '; | |
$content .= 'Page created in '; | |
$content .= timer_stop( $display = 0, $precision = 2 ); | |
$content .= ' seconds from '; |
ES6:
Learn ES6 (ECMAScript 2015) https://egghead.io/courses/learn-es6-ecmascript-2015
You-Dont-Know-JS/es6 & beyond at master https://github.com/getify/You-Dont-Know-JS/tree/master/es6%20%26%20beyond#you-dont-know-js-es6--beyond
Learn ECMAScript6 by doing it
This file contains hidden or 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
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var plumber = require('gulp-plumber'); | |
var notify = require('gulp-notify'); | |
var browserSync = require('browser-sync'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var spritesmith = require('gulp.spritesmith'); | |
var gulpIf = require('gulp-if'); | |
var nunjucksRender = require('gulp-nunjucks-render'); |