(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| import os | |
| import re | |
| import subprocess | |
| from bs4 import BeautifulSoup | |
| import rules | |
| def replacer(url, html): | |
| new = html | |
| reload(rules) |
| // wp-content/themes/shop-isle-child/functions.php | |
| // add class 'tinvwl-product-in-list' custom css class | |
| add_action('woocommerce_after_shop_loop_item', 'add_a_custom_button', 11 ); | |
| function add_a_custom_button() { | |
| global $product; | |
| $wlButton = do_shortcode("[ti_wishlists_addtowishlist product_id=".$product->id."]"); | |
| $dom = new DOMDocument; | |
| $dom->loadHTML($wlButton); | |
| $dataTinvWlList = ''; |
| #!/bin/bash | |
| # Instal php5.6 with phpbrew on ubuntu 18.04 | |
| # Install all dependencies | |
| sudo apt update | |
| sudo apt install wget php build-essential libxml2-dev libxslt1-dev libbz2-dev libcurl4-openssl-dev libmcrypt-dev libreadline-dev libssl-dev autoconf | |
| wget https://github.com/phpbrew/phpbrew/raw/master/phpbrew | |
| chmod +x phpbrew | |
| mv phpbrew /usr/local/bin |
| ddns-update-style none; | |
| deny bootp; #default | |
| authoritative; | |
| include "/etc/dhcp/ipxe-option-space.conf"; | |
| # GREEN (private network) | |
| subnet 10.1.1.0 netmask 255.255.255.0 { | |
| range 10.1.1.100 10.1.1.199; | |
| option subnet-mask 255.255.255.0; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| $dir = '/reports'; | |
| $key_name = 'file'; | |
| $key_imei = 'imei'; | |
| if(isset($_FILES[$key_name]) && !is_null($file = $_FILES[$key_name]) && !is_null($imei = $_POST[$key_imei])) { | |
| $now = new \DateTime('NOW'); | |
| $date_dir = sprintf("%s/%s/%s", $now->format('Y'),$now->format('m'),$now->format('d')); | |
| $full_path_dir = sprintf("%s/%s/%s",getcwd(), $dir, $date_dir); |
| ========================HOW TO HOST UPLOAD SCRIPT with DOCKER======================== | |
| 1. Make sure docker was installed and running | |
| 2. Get proper image | |
| Kita akan menggunakan image web server nginx yang sudah terinistall | |
| dan terkonfigurasi dengan php-fpm. | |
| Image yang akan kita gunakan adalah richarvey/nginx-php-fpm dari https://hub.docker.com/r/richarvey/nginx-php-fpm/ | |
| untuk mendownload image dari registry (repo hub.docker.com) jalankan |
| <?php | |
| $dir = 'public/report'; | |
| $key_name = 'file'; | |
| if(!is_null($file = $_FILES[$key_name])) { | |
| $now = new \DateTime('NOW'); | |
| $date_dir = sprintf("%s/%s/%s", $now->format('Y'),$now->format('m'),$now->format('d')); | |
| $full_path_dir = sprintf("%s/%s/%s",getcwd(), $dir, $date_dir); |
| <?php | |
| namespace backend\models; | |
| use Yii; | |
| /** | |
| * This is the model class for table "registrasi". | |
| * | |
| * @property integer $id |