Skip to content

Instantly share code, notes, and snippets.

View avidmaulanas's full-sized avatar

Avid Maulana Saputra avidmaulanas

  • KOPIHUB
  • Bandung
View GitHub Profile
@avidmaulanas
avidmaulanas / cmdline.txt
Created February 3, 2016 21:19
Set manual IP address to Raspberry Pi
ip=192.168.1.200::192.168.1.1:255.255.255.0:rpi:eth0:off
@avidmaulanas
avidmaulanas / deploy unlock
Created January 4, 2016 03:46
Removes the deploy lock file
mina <env> deploy:force_unlock
@avidmaulanas
avidmaulanas / fix commit message
Created December 7, 2015 11:41
fix commit message
git commit --amend -m "New commit message"
@avidmaulanas
avidmaulanas / git-remote-to-other
Created November 29, 2015 07:58
Git push existing repo to a new and different remote repo server
git remote rename origin <new_remote>
git remote add origin URL_TO_GITHUB_REPO
git push origin master
@avidmaulanas
avidmaulanas / gist:77d7b5a297e2e15374e9
Created November 26, 2015 04:00
Enable connect to port 443 (https) at ubuntu server
echo ipv4 >> ~/.curlrc
@avidmaulanas
avidmaulanas / remote_git
Created November 24, 2015 03:30
Remove and add remote url git repo
remove:
git remote remove <remote-name>
add:
git remote add <remote-name> <url-git>
@avidmaulanas
avidmaulanas / reindex_searchkick
Last active August 29, 2015 14:24
Searchkick reindex
All Model
=========
rake searchkick:reindex:all
Model
=====
rake searchkick:reindex CLASS=Product
NOTE
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2EA8F35793D8809A
<h1>Sample#preview_image_file_browser</h1>
<input id="one_image" name="one_image" type="file">
<div id="preview_container"></div>
<script type="text/javascript">
var setPreviewImage = function(file){
var reader = new FileReader(),
newImage = new Image();
@avidmaulanas
avidmaulanas / css_resources.md
Last active August 29, 2015 14:23 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides