Skip to content

Instantly share code, notes, and snippets.

@arifwidip
arifwidip / wemos-dht22-firebase.ino
Created April 19, 2017 13:11
Wemos with DHT22 sensor send data to Firebase
#include "DHT.h"
#include <ESP8266WiFi.h>
#include <FirebaseArduino.h>
#define DHTPIN D4
#define DHTTYPE DHT22
#define FIREBASE_HOST "HOST"
#define FIREBASE_AUTH "AUTH"
#define WIFI_SSID "SSID"
@arifwidip
arifwidip / TM-Farming.lua
Last active November 13, 2016 09:59
Final Fantasy Brave Exvius AutoTouch TM Farming
adaptResolution(640, 1136);
adaptOrientation(ORIENTATION_TYPE.PORTRAIT);
-- Select earth shrine - exit
-- tap(366, 550);
-- log("Select earth shrine");
tap(369, 707);
usleep(1000000);
@arifwidip
arifwidip / wemos-dht22-firebase.ino
Last active January 13, 2017 08:26
WeMos with DHT22 sensor and Firebase
#include "DHT.h"
#include <ESP8266WiFi.h>
#include <FirebaseArduino.h>
#include "MQ135.h"
#define DHTPIN D3
#define DHTTYPE DHT22
#define ANALOGPIN A0
#define RZERO 390.69
@arifwidip
arifwidip / gist:eb19b6ac7a3613c4b031
Created June 13, 2015 23:04
Relational Algebra Example Dataset
group: Data Pegawai
PEGAWAI = {
NamaDepan, Inisial, NamaBelakang, NoKTP, Alamat, Gaji, JenisKelamin, NoKTPKepala, DNO
Arif, AW, Widi, 1234, Bandung, 100000, L, 4321, 1
Satya, SN, Negara, 1235, Jakarta, 100000, L, 4321, 2
Erwin, EJ, Jaya, 4321, Bandung, 100000, L, 0, 1
}
DEPARTEMEN = {
@arifwidip
arifwidip / lipsum_generator.php
Last active August 29, 2015 14:07
Lipsum Text Generator for PHP
<?php
/**
* PHP Functions for Generating Lipsum Text
* based on Code from Emmet Sublime Text Plugin
*
*/
class WP_Dummy_Lipsum_Generator {
var $available_langs = array(
'en' => array(
@arifwidip
arifwidip / twitter-api.php
Created January 22, 2014 09:41
Twitter API wrapper for WordPress
<?php
/**
* Twitter API Class
*/
class TwitterApi {
var $consumer_key = 'CONSUMER_KEY';
var $consumer_secret = 'CONSUMER_KEY';
var $api_baseurl = "https://api.twitter.com/1.1/";
/**
@arifwidip
arifwidip / get_kurs.php
Last active December 19, 2015 04:39
Get Exchange Rates From Bank Indonesia using WordPress HTTP API
<?php
$kurs_page = wp_remote_get( 'http://www.bi.go.id/id/moneter/informasi-kurs/transaksi-bi/', array( 'timeout' => 20 ) );
if( !is_wp_error( $kurs_page) ) {
$result = $kurs_page['body'];
$data_table = explode('<div id="right-cell">', $result);
$data_table = explode ('<table class="table1" cellspacing="0" rules="all" border="1" id="ctl00_PlaceHolderMain_biWebKursTransaksiBI_GridView1">',$data_table[1]);
$data_table = explode ('</table>', $data_table[1]);
$dom = new DOMDocument();
$html = $data_table[0];
@arifwidip
arifwidip / media.js
Created June 12, 2013 00:43
New WordPress 3.5 Media Uploader
/**
* New WordPress 3.5 Media Uploader Snippet
*/
jQuery(document).ready(function($){
// Prepare the variable that holds our custom media manager.
var tgm_media_frame;
// Bind to our click event in order to open up the new media experience.
$(document.body).on('click.tgmOpenMediaManager', '.tgm-open-media', function(e){
// Prevent the default action from occuring.
<div id="pptSelector">
<select name="whichppt" id="whichppt">
<option value="demo-presentation">Demo Presentation</option>
</select>
</div>
<div class="reveal">
<!-- Used to fade in a background when a specific slide state is reached -->
<div class="state-background"></div>
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<!-- SLIDE 1 -->
<section>