Skip to content

Instantly share code, notes, and snippets.

View yogiprsetya's full-sized avatar

Yogi Prasetya yogiprsetya

View GitHub Profile
@font-face {
font-family: "Roboto";
font-style: normal;
font-weight: 400;
font-display: swap;
src: local("Roboto"), local("Roboto-Regular"), url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu4mxK.woff2) format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
@yogiprsetya
yogiprsetya / wp-minify.php
Created August 8, 2020 03:30
Minify HTML wordpress
class HTML_Compression {
protected $compress_css = true;
protected $compress_js = true;
protected $info_comment = true;
protected $remove_comments = true;
protected $html;
public function __construct($html) {
if (!empty($html)) {
$this->parseHTML($html);
@yogiprsetya
yogiprsetya / lazy-placeholder.css
Created June 21, 2020 11:49
Placeholder for lazy-load image.
.lazy {
background: #ededed linear-gradient(to right, #f6f7f8 0%, #f0f0f0 20%, #f6f7f8 40%, #f6f7f8 100%) repeat scroll 0% 0% / 800px 200px;
display: inline-block;
position: relative;
animation: 1s linear 0s infinite normal forwards running animation-oh6j69;
width: 100%;
}
@yogiprsetya
yogiprsetya / Basic setting Apache
Created December 2, 2019 10:36
base apache config via .HTACCESS file
## GZip ##
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
@yogiprsetya
yogiprsetya / Rename App React Native
Last active October 31, 2019 16:07
Change package name and appID for Android in React Native
Manually switched the old and new package ids:
PROJECT_NAME => new.app.id
android/app/src/main/java/com/PROJECT_NAME/MainActivity.java:
package MY.APP.ID;
In android/app/src/main/java/com/PROJECT_NAME/MainApplication.java:
package MY.APP.ID;