Skip to content

Instantly share code, notes, and snippets.

View habibimroncn's full-sized avatar
🏠
Working from home

Habib Imron Cahyo Nugroho habibimroncn

🏠
Working from home
View GitHub Profile
@habibimroncn
habibimroncn / gist:ccce79073ddf14b06988
Created October 29, 2015 03:17
Everything you can override in a refinerycms project with refinerycms-blog
When starting a project that includes refinerycms-blog:
$ rake refinery:override view=refinery/pages/*
$ rake refinery:override view=layouts/*
$ rake refinery:override view=refinery/blog/shared/*
$ rake refinery:override view=refinery/blog/posts/*
$ rake refinery:override view=refinery/*
$ rake refinery:override controller=refinery/blog/*
$ rake refinery:override controller=refinery/*
@habibimroncn
habibimroncn / _readme.md
Created November 26, 2015 09:28 — forked from aaronksaunders/_readme.md
Simple File Upload Pt 2: with Associated Object Kinvey + Angular (User, Files,Data)

Simple File Upload with Associated Object Kinvey + Angular

###Setup Kinvey

###Initialize & Login

###Upload File

###Create Parent Object

@habibimroncn
habibimroncn / php-webscraping.md
Created December 11, 2015 03:27 — forked from anchetaWern/php-webscraping.md
web scraping in php

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 %}

@habibimroncn
habibimroncn / wysiwyg-meta-box.php
Created February 3, 2016 09:24 — forked from retgef/wysiwyg-meta-box.php
How to add a Wordpress WYSIWYG editor to a meta box.
<?php
define('WYSIWYG_META_BOX_ID', 'my-editor');
define('WYSIWYG_EDITOR_ID', 'myeditor'); //Important for CSS that this is different
define('WYSIWYG_META_KEY', 'extra-content');
add_action('admin_init', 'wysiwyg_register_meta_box');
function wysiwyg_register_meta_box(){
add_meta_box(WYSIWYG_META_BOX_ID, __('WYSIWYG Meta Box', 'wysiwyg'), 'wysiwyg_render_meta_box', 'post');
}
@habibimroncn
habibimroncn / jQuery Scramble Web Page Email Addresses
Created February 10, 2016 02:26
jQuery Scramble Web Page Email Addresses from Sam Deering
jQuery(document).ready(function($) {
//email spam protection - Example Markup: name[at]domain[dot]com
$('.email').each(function() {
var $email = $(this);
var address = $email.text()
.replace(/s*[at]s*/, '@')
.replace(/s*[dot]s*/g, '.');
$email.html(''+ address +'');
});
});
@habibimroncn
habibimroncn / jquery.email-antispam.js
Created February 10, 2016 02:26
Simple spam protection for email addresses using jQuery
/* Simple spam protection for email addresses using jQuery.
* Well, the protection isn’t jQuery-based, but you get the idea.
* This snippet allows you to slightly ‘obfuscate’ email addresses to make it harder for spambots to harvest them, while still offering a readable address to your visitors.
* E.g. Changed "dot" to "dotty" to confuse some of the more intelligent harvesters.
* <a href="mailto:foo(at)example(dotty)co(dotty)uk">foo at example dotty co dotty uk</a>
* →
* <a href="mailto:foo@example.com">foo@example.co.uk</a>
*/
$(function() {
@habibimroncn
habibimroncn / build.gradle
Last active March 3, 2016 08:38 — forked from gabrielemariotti/build.gradle
Use signing.properties file which controls which keystore to use to sign the APK with gradle.
android {
signingConfigs {
release
}
buildTypes {
release {
signingConfig signingConfigs.release
}
# -------------- In my case it was this location, change accordingly -----------
# I only show here the part of that file I changed
## [ v3_req ]
##
### Extensions to add to a certificate request
##
##basicConstraints = CA:FALSE
##keyUsage = nonRepudiation, digitalSignature, keyEncipherment
[ v3_req ]
@habibimroncn
habibimroncn / List.md
Created March 14, 2016 03:59 — forked from msurguy/List.md
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@habibimroncn
habibimroncn / dhf_sort.css
Created July 21, 2016 02:42 — forked from deadlyhifi/dhf_sort.css
WordPress - class to make custom posttypes sortable with AJAX in admin.
#sortable-list{margin-top:20px;}
#sortable-list li{padding:10px;width:50%;font-weight:bold;cursor:move;border:1px solid #ddd;background:#f5f5f5;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff));background:-ms-linear-gradient(bottom, #eeeeee, #ffffff);background:-moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;}
#loading-animation{display:none;}