Skip to content

Instantly share code, notes, and snippets.

Working from home

Rian Ariona ariona

Working from home
View GitHub Profile
ludder / slideDown.js
Created Dec 6, 2012
Vanilla JavaScript slideUp and slideDown functions
View slideDown.js
Element to slide gets the following CSS:
max-height: 0;
opacity: 0;
overflow: hidden;
transition: max-height 0.4s ease 0s;
* Like jQuery's slideDown function - uses CSS3 transitions

Have you ever wanted to get a specific data from another website but there's no API available for it? That's where Web Scraping comes in, if the data is not made available by the website we can just scrape it from the website itself.

But before we dive in let us first define what web scraping is. According to Wikipedia:

{% blockquote %} Web scraping (web harvesting or web data extraction) is a computer software technique of extracting information from websites. Usually, such software programs simulate human exploration of the World Wide Web by either implementing low-level Hypertext Transfer Protocol (HTTP), or embedding a fully-fledged web browser, such as Internet Explorer or Mozilla Firefox. {% endblockquote %}

View WooCommerce: How To Get WooCommerce Page IDs
// Get The Page ID You Need
get_option( 'woocommerce_shop_page_id' );
get_option( 'woocommerce_cart_page_id' );
get_option( 'woocommerce_checkout_page_id' );
get_option( 'woocommerce_pay_page_id' );
get_option( 'woocommerce_thanks_page_id' );
get_option( 'woocommerce_myaccount_page_id' );
get_option( 'woocommerce_edit_address_page_id' );
get_option( 'woocommerce_view_order_page_id' );
get_option( 'woocommerce_terms_page_id' );
magicznyleszek /
Created Aug 20, 2014
Multiply blending mode to PNG in Photoshop
  1. copy your image (Ctrl+A and Ctrl+C)
  2. make a new document-sized pure-black layer behind it
  3. group the black layer and yor image together
  4. add mask to the group
  5. enter mask edit mode (alt+click on the mask icon/thumbnail)
  6. paste your image in the mask (b/w) and then invert it.
  7. save it as a 24-bit transparent PNG
mul14 /
Last active Oct 10, 2021
/etc/hosts for Vimeo, Reddit, and Imgur.

Unblock Vimeo, Reddit, Imgur, GitHub, dan NPM

Saya support Internet Positif untuk memblokir porn, situs judi, dan hal-hal ilegal lainnya. Tapi pemerintah dan ISP sangat konyol karena tidak mengizinkan akses ke Vimeo, Reddit, Imgur, Netflix--yang mana bukanlah situs dengan konten utama ilegal.

Linux / BSD / macOS

Tambahkan list di bawah ke /etc/hosts.


overclokk / nav-menu-exporter-importer.php
Last active Jan 17, 2019 — forked from raynov/nav-menu-exporter-importer.php
[WordPress Plugin] Nav Menu Exporter and Importer / Export and Import nav menus. Requires WordPress Importer plugin. Tested up to 4.7 - It works with, taxonomies, post_type and custom items.
View nav-menu-exporter-importer.php
Plugin Name: Nav Menu Exporter and Importer
Description: Export and Import nav menus. Requires WordPress Importer plugin
Author: hissy, megumi themes
Version: 0.1
Text Domain: nav-menu-exporter-importer
License: GPL version 2 or later -
siswadi / Waktu Sholat Arah
Last active Jul 29, 2021
Waktu Sholat & Arah Kiblat w/ HTTP/JSON API
View Waktu Sholat Arah

Waktu Sholat & Arah Kiblat

Informasi Waktu
christopher4lis / util-elastic-collision.js
Last active Oct 9, 2021
A set of utility functions used to reproduce the effect of elastic collision within HTML5 canvas. Used in the Chris Courses tutorial video on collision detection:
View util-elastic-collision.js
* Rotates coordinate system for velocities
* Takes velocities and alters them as if the coordinate system they're on was rotated
* @param Object | velocity | The velocity of an individual particle
* @param Float | angle | The angle of collision between two objects in radians
* @return Object | The altered x and y velocities after the coordinate system has been rotated
mariusgnicula / gist:2261bb9548ef1a5388704bf0ef02528b
Created Oct 11, 2017
How to include JS into custom Elementor Widget
View gist:2261bb9548ef1a5388704bf0ef02528b
Include your JS into a normal file, just how you are used to and enqueue it with wp_enqueue_script. This will not work in the editor, because you want the functions to fire when you add them.
At the beginning of your widget file, add ‘use Elementor\Plugin;’.
Then at the end of the render() function in your PHP, add this:
<?php if ( Plugin::$instance->editor->is_edit_mode() ) : ?>
<script>Your code here</script
View example.dart
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(