Skip to content

Instantly share code, notes, and snippets.

View jauhari's full-sized avatar
😇

Jauhari jauhari

😇
View GitHub Profile
@jauhari
jauhari / Lazy Image Size
Created July 20, 2017 22:54 — forked from mtinsley/Lazy Image Size
Generate image sizes on the fly for WordPress
/**
* Create an image with the desired size on-the-fly.
*
* @param $image_id
* @param $width
* @param $height
* @param $crop
*
* @return array
*/

Keybase proof

I hereby claim:

  • I am jauhari on github.
  • I am jauhari (https://keybase.io/jauhari) on keybase.
  • I have a public key ASDFJbH3CNGZHQYdO_GKKaBMSLm-Yp5USMd3CV4QFH9Hkgo

To claim this, I am signing this object:

@jauhari
jauhari / Step by Step Install Vesta CP
Created February 8, 2018 11:04
Step by Step Install Vesta CP that Published on Pakdhw.com
# Connect to your server as root via SSH
ssh [email protected]
# Download installation script
curl -O http://vestacp.com/pub/vst-install.sh
# Run it
bash vst-install.sh
@jauhari
jauhari / functions.php
Created March 8, 2018 05:03
Move WordPress Admin Bar to the Bottom
function pakdhw_move_admin_bar() {
echo '
<style type="text/css">
body.admin-bar #wphead {
padding-top: 0;
}
#wpadminbar {
top: auto !important;
bottom: 0;
position: fixed;
@jauhari
jauhari / wordpress-bar-css.css
Created March 8, 2018 08:15
And Here is the CSS for Moving WordPress Admin Bar to the Bottom
body.admin-bar #wphead {
padding-top: 0;
}
#wpadminbar {
top: auto !important;
bottom: 0;
position: fixed;
}
#wpadminbar .quicklinks .menupop ul {
position: absolute;
@jauhari
jauhari / hosts
Created April 1, 2018 22:15 — forked from mul14/00_etc-hosts.md
/etc/hosts for Vimeo and Reddit
# ---------------------------------------------------
# Vimeo
# ---------------------------------------------------
151.101.0.217 player.vimeo.com
151.101.192.249 vimeo-hp-videos.global.ssl.fastly.net
151.101.2.109 f.vimeocdn.com
151.101.192.217 vimeo.com
151.101.66.109 i.vimeocdn.com
151.101.64.217 developer.vimeo.com
@jauhari
jauhari / last-update.php
Last active August 15, 2021 00:25
Menampilkan Tanggal Terakhir Update di WordPress Theme
<?php
// mengambil waktu lokal dari postingan dalam detik
$local_timestamp = get_the_time('U');
// mengambil data waktu update terakhir tulisan
$lastModifiedTime = get_the_modified_time('U');
if ($lastModifiedTime >= $local_timestamp + 86400) {
echo "<p>Update ";
the_modified_time('F jS, Y');
@jauhari
jauhari / gist:f6f451c1b1f3cdb9929af67f14608321
Created July 11, 2023 12:39
ssh-copy-id on Windows 11
type $env:USERPROFILE\.ssh\id_rsa.pub | ssh {IP-ADDRESS-OR-FQDN} "cat >> .ssh/authorized_keys"
ssh-keygen -t rsa
@jauhari
jauhari / gist:e7601eff51e66a50d45ad63c5f0862d4
Created August 23, 2023 11:14
Find and Delete with the Asterik Command Line on LINUX/UNIX/MacOS
#use this code on current folder and sub folder
find -name "*.ico" -mtime +7 -exec rm -f {} \;
#or use this one on current folder and sub folder
find -name "*.ico" -name "*.avi" -mtime +7 -delete