Skip to content

Instantly share code, notes, and snippets.

@malikperang
malikperang / .htaccess
Created November 19, 2013 15:35
htaccess untuk codeigniter
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
@malikperang
malikperang / ffamilyjqmobileoverride
Created January 25, 2014 11:04
Override Jquery Mobile font family
JQuery Mobile - Override font-family themes for the whole body
@font-face {
font-family: 'RobotoRegular';
src: url('../font/roboto/RobotoRegular.eot');
src: url('../font/roboto/RobotoRegular.eot?#iefix') format('embedded-opentype'),
url('../font/roboto/RobotoRegular.woff') format('woff'),
url('../font/roboto/RobotoRegular.ttf') format('truetype'),
url('../font/roboto/RobotoRegular.svg#RobotoRegular') format('svg');
font-weight: normal;
font-style: normal;
@malikperang
malikperang / Vagrantfile
Created November 26, 2015 07:06
Vagrant file for Ubuntu Trusty box
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@malikperang
malikperang / boostrap.sh
Last active November 26, 2015 07:22
Default bootstrap file for Ubuntu trusty vagrant
#!/usr/bin/env bash
# Use single quotes instead of double quotes to make it work with special-character passwords
PASSWORD='admin321'
PROJECTFOLDER='project'
# create project folder
sudo mkdir "/var/www/html/${PROJECTFOLDER}"
# update / upgrade
@malikperang
malikperang / config
Last active November 26, 2015 07:44
Example of multiple GIT user setting
Host bitbucket.org
User git
Hostname bitbucket.org
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Host bitbucket-farizaqm
User git
Hostname bitbucket.org
PreferredAuthentications publickey
@malikperang
malikperang / Ajax
Created April 12, 2016 07:27
Ajax PHP
Basic usage of .ajax would look something like this:
HTML:
<form id="foo">
<label for="bar">A bar</label>
<input id="bar" name="bar" type="text" value="" />
<input type="submit" value="Send" />
</form>
@malikperang
malikperang / meteor.cheatsheet.coffee
Created August 14, 2016 11:01 — forked from LeCoupa/meteor.cheatsheet.coffee
Meteor Cheatsheet: Meteor Core, Publish and Subscribe, Method, Server Connections, Collections, Session, Accounts, Passwords, Templates, Match, Timers, Deps, EJSON, HTTP, Email, Assets, Command Line. More: http://journal.gentlenode.com/meteor-5-cheatsheet/
# METEOR CORE:
Anywhere: Meteor.isClient
Anywhere: Meteor.isServer
Anywhere: Meteor.startup(func)
Anywhere: Meteor.absoluteUrl([path], [options])
Anywhere: Meteor.settings
Anywhere: Meteor.release
@malikperang
malikperang / sales.js
Created November 15, 2016 08:25
Sales api
import { Meteor } from 'meteor/meteor';
import { Mongo } from 'meteor/mongo';
import { check } from 'meteor/check';
import { Transactions } from './transactions.js';
export const Sales = new Mongo.Collection('sales', {idGeneration: 'MONGO'});
if(Meteor.isServer){
Meteor.publish('sales', function() {
import angular from 'angular';
import angularMeteor from 'angular-meteor';
import uiRouter from 'angular-ui-router';
import 'chart.js/dist/Chart.js';
import 'angular-chart.js/dist/angular-chart.js';
import { Meteor } from 'meteor/meteor';
import { Transactions } from '../../../api/transactions.js';
import { countTotalStudent } from '../../../api/aggregations.js';
@malikperang
malikperang / angularjs.es6.filter.js
Created May 8, 2017 06:26 — forked from anein/angularjs.es6.filter.js
Creating an angularjs filter using ES6
class MyFilter {
static filter( value ){
return value.toLowerCase();
}
}
export default MyFilter.filter;