Skip to content

Instantly share code, notes, and snippets.

View muhammadghazali's full-sized avatar

Muhammad Ghazali muhammadghazali

View GitHub Profile
@muhammadghazali
muhammadghazali / using-github-release.md
Created November 14, 2013 08:20
Using GitHub Release

My workflow when using GitHub release:

  1. Drafting new release

  2. Working on the new release

  3. Tagging the new release

  4. Release based on the existing tag

@muhammadghazali
muhammadghazali / Keep your feature branch up to date.md
Last active December 29, 2015 02:59
Keep your feature branch up to date
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
@muhammadghazali
muhammadghazali / how-to-create-a-gif-in-ubuntu.md
Created December 19, 2013 17:30
How to create a GIF in Ubuntu

Required tools

Install the following tools:

sudo apt-get install imagemagick mplayer gtk-recordmydesktop

Then use Desktop Recorder to capture a portion of the screen/application to use as the screencast. After the Desktop Recorder has saved the recording into an OGV video, MPlayer will be used to capture JPEG screenshots, saving them into the 'output' directory.

@muhammadghazali
muhammadghazali / Chapters of Mastering Web Application Development with AngularJS.md
Last active January 2, 2016 22:29
Chapters of Mastering Web ApplicationDevelopment with AngularJS

Book contents

  • Chapter 1: Angular Zen
  • Chapter 2: Building and Testing

Chapter 3: Communicating with a Back-end Server

  • The Promise API with $q
    • Learning $q service basics
      • Working with promises and the $q service
  • Promises are first-class JavaScript objects
@muhammadghazali
muhammadghazali / 01-angularjs-introduction.md
Last active October 14, 2022 06:19
Notes on AngularJS

What is AngularJS

  • AngularJS is not a library, it's a framework that embraces extending HTML into a more expressive and readable format
  • AngularJS is a structural framework for dynamic web apps
  • A framework that lets you use HTML as your template language and extend HTML's syntax to express your application's components clearly and succinctly
  • Angular is an opinionated framework on how a CRUD application should be built

Use AngularJS to build CRUD application

  • Angular was built for the CRUD application in mind. Games and GUI editors are examples of applications with intensive and tricky DOM manipulation. These kinds of apps are different from CRUD apps, and as a result are probably not a good fit for Angular
public class SomeFragment extends Fragment {
MapView mapView;
GoogleMap map;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.some_layout, container, false);
@muhammadghazali
muhammadghazali / upload-apk-to-testflight.sh
Created February 28, 2014 03:24
Bash script to upload your APK to TestFlight via Upload API
#!/bin/bash
printf "Uploading the package to TestFlight...\n"
curl http://testflightapp.com/api/builds.json \
-F file=@REPLACE_THIS_WITH_RELATIVE_PATH_TO_APK \
-F api_token='REPLACE_THIS_WITH_YOUR_API_TOKEN' \
-F team_token='REPLACE_THIS_WITH_YOUR_TEAM_TOKEN' \
-F notes='Link to your release notes' \
-F notify=True \
@muhammadghazali
muhammadghazali / Gunakan native method untuk melakukan custom query di sails-mongo.js
Created March 24, 2014 15:22
Muhammad Ghazali's Online Notes: Gunakan native method untuk melakukan custom query di sails-mongo
Station.native(function(err, collection) {
collection.find({
location: {
$near: {
$geometry: {
type: "Point",
// coordinates: [longitude, latitude]
coordinates: [50, 50]
}
},