Skip to content

Instantly share code, notes, and snippets.

View rizqyhi's full-sized avatar
⛰️
Code & hike

Rizqy Hidayat rizqyhi

⛰️
Code & hike
View GitHub Profile
@rizqyhi
rizqyhi / readme.md
Last active November 2, 2016 06:21

Naruto Scrapper

A small script to collect direct download link of Naruto. Its easier and more efficient rather than browse through the site episode by episode, then find a link to the download site, and messing with their super annoying auto-popup-ads. Thank you to the site's owner he made the permalink well organized so we don't need to search it first. Also rocks SF because they don't required us to enter captcha, click generate-link-button, etc. :)

First, we need a scrapper package, Goutte. Install it with composer:

composer require "fabpot/goutte:2.*"

Then simply put the scrapper.php inside the directory where you run the composer command.

@rizqyhi
rizqyhi / package.json
Last active April 14, 2017 03:54
Belajar Firebase Functions: Kirim Email dari Contact Form
{
"name": "contact-form-email",
"description": "Kirim email dari contact form dengan Firebase Functions",
"dependencies": {
"nodemailer": "^2.4.1",
"firebase-admin": "^4.1.1",
"firebase-functions": "^0.5.1"
}
}
@rizqyhi
rizqyhi / index.js
Created April 14, 2017 03:54
Belajar Firebase Functions: Kirim Email dari Contact Form
var functions = require('firebase-functions');
var nodemailer = require('nodemailer');
// Setting email dan password pengirim
const gmailEmail = 'email.kamu@gmail.com';
const gmailPass = 'password.email.kamu';
const mailer = nodemailer.createTransport({
service: 'Gmail',
auth: {user: gmailEmail, pass: gmailPass}
@rizqyhi
rizqyhi / challenge.php
Last active May 22, 2017 15:54
Pak Amir punya perpus...
<?php
/*
21 May 2017
created by Arif Akbarul Huda.
PENGANTAR
Pak Amir adalah orang terpandang didesanya yang memiliki hobi membaca.
Dirumahnya tersimpan ratusan koleksi buku.
Supaya bermanfaat, Pak Amir membuat perpustakaan pribadi dan warga sekitar boleh meminjam.
@rizqyhi
rizqyhi / igfeed.php
Created July 18, 2017 04:45
Simple instagram media grabber. Result is cached. Output as JSON.
<?php
$username = 'sadarkawasan';
$cache_time = 60 * 60 * 2; // seconds
$media = "";
if (file_exists('igfeed.json') && (filemtime('igfeed.json') > (time() - $cache_time ))) {
$media = file_get_contents('igfeed.json');
} else {
$html = file_get_contents('https://www.instagram.com/'.$username);
@rizqyhi
rizqyhi / deploy.js
Last active June 16, 2021 10:18
Deploy via FTP with Yarn dan ftp-deploy
const FtpDeploy = require('ftp-deploy');
const chalk = require('chalk');
const ora = require('ora');
const logSymbols = require('log-symbols');
const deployer = new FtpDeploy();
const config = {
username: 'your-ftp-username',
password: 'your-ftp-password',
host: 'your-server.com',
@rizqyhi
rizqyhi / Formattting.md
Created February 12, 2018 04:33
Productive with Sublime #1

Source code awal

                        $table->string('type');
                        $table->string('name');
                        $table->text('description');
                        $table->text('data_sources');
                        $table->integer('created_by');

Hasil yang diinginkan