Skip to content

Instantly share code, notes, and snippets.

View back2arie's full-sized avatar

Azhari Harahap back2arie

View GitHub Profile
{
"error": {
"message": "(#4) Application request limit reached",
"type": "OAuthException",
"is_transient": true,
"code": 4,
"fbtrace_id": "EYe9fTwFLmI"
}
}
{
"og_object": {
"id": "794700120549820",
"description": "As the number of women inmates soars, so does the need for programs and policies that meet their needs.",
"title": "Women Inmates Separate But Not Equal (Paid Post by Netflix From NYTimes.com)",
"type": "website",
"updated_time": "2016-10-15T01:27:36+0000"
},
"share": {
"comment_count": 0,
@back2arie
back2arie / postgresqllogcleaner.pl
Created February 27, 2014 06:17
PostgreSQL log cleaner
#!/usr/bin/perl -s
# postgresqllogcleaner.pl
# PostgreSQL log cleaner
#
# Usage:
# postgresqllogcleaner.pl -i=/path/to/postgresql.log -o=/path/to/output.log
#
# Short description:
# This script used for cleaning postgresql log to be valid SQL
#
<?php
class Email extends Controller {
function index()
{
$this->load->library('email');
$config['protocol'] = "smtp";
$config['smtp_host'] = "smtp.mailserver.net";
@back2arie
back2arie / get_text_between_tag.pl
Created October 20, 2012 06:36
Get text between tag
#!/opt/local/bin/perl
$string = "<TEXT>
First text
Some text
Last text
</TEXT>";
if($string =~ /<(TEXT)>\s*(.*)\s*<\/\1>/gs)
{
$result = $2;
@back2arie
back2arie / dns_over_http.php
Created October 15, 2012 17:14
DNS over HTTP
<?php
$ch = curl_init('http://49.50.8.82/phpjsondns/api.github.com/a');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Host: azhari.harahap.us"));
$content = curl_exec($ch);
$content = json_decode($content, TRUE);
curl_close($ch);
$github = $content['result'][0]['ip'];
$ch = curl_init('https://'.$github.'/legacy/repos/search/:php');
@back2arie
back2arie / cubrid_kalkun.sql
Created July 12, 2012 03:40
Kalkun Cubrid database schema
--
-- Database: "kalkun"
--
-- --------------------------------------------------------
--
-- Table structure for table "kalkun"
--