Skip to content

Instantly share code, notes, and snippets.

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

Wayan jimmy wayanjimmy

🏠
Working from home
View GitHub Profile
<body>
<p>Image to use:</p>
<img id="scream" width="64" height="64" src="http://placehold.it/64/55C1E7/fff&text=T" alt="The Scream">
<p>Canvas:</p>
<canvas id="myCanvas" width="500" height="800" style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.
</canvas>
<script>
@wayanjimmy
wayanjimmy / fix_brightness
Created March 24, 2015 02:17
Fix brightness Asus A455LD Ubuntu
sudo gedit /etc/default/grub
# change
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
# into
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi="
#then
@wayanjimmy
wayanjimmy / .zshrc
Created March 11, 2015 06:36
zshrc alias
alias work="cd ~/scotch-box && vagrant up"
alias in="cd ~/scotch-box && vagrant ssh"
alias go="cd ~/scotch-box/public"
alias home="cd ~/scotch-box && vagrant halt"
alias gpush="git push -u origin master"
alias gpull="git pull -u origin master"
alias l:serve="php artisan serve --host=192.168.33.10"
alias dream="sudo shutdown -h now"
alias android:cap="adb shell screencap -p /sdcard/screen.png && adb pull /sdcard/screen.png"
<?php
/**
* This script is for easily deploying updates to Github repos to your local server. It will automatically git clone or
* git pull in your repo directory every time an update is pushed to your $BRANCH (configured below).
*
* Read more about how to use this script at http://behindcompanies.com/2014/01/a-simple-script-for-deploying-code-with-githubs-webhooks/
*
* INSTRUCTIONS:
* 1. Edit the variables below
* 2. Upload this script to your server somewhere it can be publicly accessed
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
Google Apps for Android 4.1 (https://www.androidfilehost.com/?fid=22979706399755082 - gapps-jb-20121011-signed.zip)
@wayanjimmy
wayanjimmy / gulpfile.js
Created February 6, 2015 08:35
generic gulpfile.js
var gulp = require('gulp');
var less = require('gulp-less');
var notify = require('gulp-notify');
var gutil = require('gulp-util');
var browserSync = require('browser-sync');
gulp.task('less', function(){
return gulp.src(['./less/main.less'])
.pipe(less({ compress:true }).on('error', gutil.log))
.pipe(gulp.dest('./css'))
@wayanjimmy
wayanjimmy / Vagrantfile
Created January 31, 2015 06:26
vagrant scotchbox
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "scotch/box"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.hostname = "scotchbox"
config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"]
@wayanjimmy
wayanjimmy / fancybox_ajax.js
Last active August 29, 2015 14:14
fancybox ajax
// fancybox show
$.fancybox(result, {
fitToView: true,
width:600,
autoSize: false,
closeClick: false,
openEffect: 'fade',
closeEffect: 'fade',
padding: 0,
title: 'Edit Language',
@wayanjimmy
wayanjimmy / Boxfile
Created January 29, 2015 03:10
Laravel Pagoda Boxfile
web1:
document_root: public
php_version: 5.4.14
php_error_reporting: 0
php_extensions:
- mbstring
- mcrypt
- pdo_mysql
- redis
- zip
### Install OpenJDK
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Download and Install ElasticSearch
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.1.deb
sudo dpkg -i elasticsearch-1.3.1.deb