Skip to content

Instantly share code, notes, and snippets.

View azureru's full-sized avatar
🌎
.....................................

Erwin Maulana Saputra azureru

🌎
.....................................
View GitHub Profile
@azureru
azureru / javascript_resources.md
Created December 3, 2013 09:31 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@azureru
azureru / css_resources.md
Created December 3, 2013 09:31 — 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

@azureru
azureru / depops-cheatsheet.md
Last active July 2, 2019 10:58
Devops Cheat Sheet

Permission Cheat Sheet

You will use this one a lot in Wordpress :P

   chown -R www-data:www-data ./
   // set the proper owner
@azureru
azureru / random_weight
Created August 12, 2014 02:15
All About Random Stuff
<?php
/**
* getRandomWeightedElement()
* Utility function for getting random values with weighting.
* Pass in an associative array, such as array('A'=>5, 'B'=>45, 'C'=>50)
* An array like this means that "A" has a 5% chance of being selected, "B" 45%, and "C" 50%.
* The return value is the array key, A, B, or C in this case. Note that the values assigned
* do not have to be percentages. The values are simply relative to each other. If one value
* weight was 2, and the other weight of 1, the value with the weight of 2 has about a 66%
@azureru
azureru / nginx+pagespeed+spdy.sh
Last active August 4, 2017 19:00
nginx compile
# https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source
# prepare some prerequisites
sudo apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev unzip libssl libssl-dev g++-4.8
# modern psol need these on ubuntu 14
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.8 gcc
@azureru
azureru / build.xml
Last active August 29, 2015 14:05
Jenkins + PHP
<?xml version="1.0" encoding="UTF-8"?>
<project name="name-of-project" default="build">
<target name="build"
depends="prepare,lint,phploc,pdepend,phpmd-ci,phpcs-ci,phpcpd,phpdox,phpunit"/>
<target name="build-parallel"
depends="prepare,lint,tools-parallel,phpunit"/>
<target name="tools-parallel" description="Run tools in parallel">
<parallel threadCount="2">
@azureru
azureru / build.prop
Created November 7, 2015 21:10
Android on Pie Boxes (OrangePi, BananaPi, Raspberry Pi)
# Wifi
ro.wifi.channels=
ro.config.ringtone=Ring_Synth_04.ogg
ro.config.notification_sound=pixiedust.ogg
ro.config.alarm_alert=Alarm_Classic.ogg
wifi.interface=wlan0
wifi.supplicant_scan_interval=15
@azureru
azureru / imagemagick
Last active September 16, 2016 06:00
Imagemagick 7
# make sure to get all dependencies of imagemagick
sudo apt-get build-dep imagemagick
# Add webp and jpeg (explicitly doing this incase the above does not enough)
sudo apt-get install libwebp-dev libjpeg-dev devscripts
# get latest imagick
wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar xf ImageMagick.tar.gz
cd ImageMagick-*/
@azureru
azureru / nginx.conf
Created September 14, 2016 19:59
Nginx Conf Snippets
# base ssl
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/nginx/keys.d/dhparam.pem;
# tweak
client_max_body_size 30M;
@azureru
azureru / extract android kernel.md
Last active March 17, 2024 21:54
How to Extract Android Kernel And Modify The Boot Ramdisk (Android 4.4) on Allwinner based Processor

Extracting Existing Kernel + Ramfs

Enter the machine using adb shell

Run cat /proc/partitions

  #  Path                     Purpose        Size
  0 /dev/block/mmcblk0                       7761920
  1 /dev/block/mmcblk0p1      data           6085631