Skip to content

Instantly share code, notes, and snippets.

View feryardiant's full-sized avatar
🎯
Focusing

Fery Wardiyanto feryardiant

🎯
Focusing
View GitHub Profile
@ericandrewlewis
ericandrewlewis / gist:8290246
Last active January 2, 2016 10:29
WordPress Post Meta ideas
<?php
/**
* Post Meta Box view/controller class.
*
* Extends from a form object base class.
*
* Creates a meta box. Fields can be related to the meta box, but
* all business logic lives within the field object.
*/
@mul14
mul14 / delete_node_modules.sh
Last active July 23, 2018 15:04
Delete all node_modules and bower_components directories
#!/usr/bin/env sh
find . -maxdepth 2 -type d -name node_modules -name bower_components -print0 | xargs -0 rm -rf
@mikemurray
mikemurray / Gruntfile.js
Created July 26, 2013 22:02
Gruntfile for PHP and LESS with livereloading
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
php: {
dev: {
options: {
hostname: '127.0.0.1',
@Asmod4n
Asmod4n / html5-notifications.js
Last active June 18, 2019 22:57
A Polyfill to fix the differences in WebKit, Blink and Gecko HTML5 Desktop Notifications, also adds a way to add your own Javascript Notifications in case your Browser doesn't support them natively.
/*
Copyright (C) 2013 Hendrik Beskow
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@DamianZaremba
DamianZaremba / install_sublime_text.sh
Last active May 25, 2021 21:01
Install sublime text on linux
cd /usr/src/
wget http://c758482.r82.cf2.rackcdn.com/sublime-text_build-3047_i386.deb
dpkg -i sublime-text_build-3047_i386.deb
@brentertz
brentertz / rvm2rbenv.txt
Created November 21, 2011 23:00
Switch from RVM to RBENV
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################
@hok00age
hok00age / Android Get Certificate Function
Last active May 7, 2022 04:08
Taruh code ini di Class Activity. Return berupa string dapat Anda masukkan di perujuk http://rajaongkir.com/akun/ubahperujuk
private String getCertificate() {
String certificate = null;
PackageManager pm = this.getPackageManager();
String packageName = this.getPackageName();
int flags = PackageManager.GET_SIGNATURES;
PackageInfo packageInfo = null;
try {
packageInfo = pm.getPackageInfo(packageName, flags);
} catch (NameNotFoundException e) {
}
@drewjoh
drewjoh / custom.js
Created January 27, 2012 13:55
Dynamic (AJAX) loaded Bootstrap Modal (Bootstrap 2.1)
$(document).ready(function() {
// Support for AJAX loaded modal window.
// Focuses on first input textbox after it loads the window.
$('[data-toggle="modal"]').click(function(e) {
e.preventDefault();
var url = $(this).attr('href');
if (url.indexOf('#') == 0) {
$(url).modal('open');
} else {
@havvg
havvg / ajax-form.js
Created August 1, 2012 13:20
jQuery AJAX form submit with Twitter Bootstrap modal
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),
@callumacrae
callumacrae / build-tools.md
Last active October 25, 2023 15:14
Build tools written in JavaScript