Skip to content

Instantly share code, notes, and snippets.

View zulhfreelancer's full-sized avatar

Zulhilmi Zainudin zulhfreelancer

View GitHub Profile
This gist is the update of this post https://u.osu.edu/hasnan.1/2014/03/30/rails-4-multiple-file-upload-with-carrierwave-nested-form-and-jquery-file-upload/
License MIT
@zulhfreelancer
zulhfreelancer / rails-4-new-options
Created June 4, 2016 16:19 — forked from brianpetro/rails-4-new-options
Command line options for ` rails new --help ` (Rails 4.2). Useful for planning new Ruby on Rails app. 'Where can I find options for “rails new” command?'
Because I couldn't find these with a quick Google search on 28 April 2015:
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /home/brian/.rvm/rubies/ruby-2.2.0/bin/ruby
-m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL)
[--skip-gemfile], [--no-skip-gemfile] # Don't create a Gemfile
#!/usr/bin/env bash
curl -X GET -H "X-User-Key: QzjEU8bFLL88lrzWm8D3vtFXTqUIcvN8" \
"https://apis.pos.com.my/apigateway/as2corporate/api/v2trackntracewebapijson/v1/?id=YOUR_POSLAJU_TRACKING_CODE&Culture=En"
@zulhfreelancer
zulhfreelancer / capybara.md
Created February 10, 2017 09:34 — forked from steveclarke/capybara.md
RSpec Matchers

Capybara

save_and_open_page

Matchers

have_button(locator)
@zulhfreelancer
zulhfreelancer / 1_kubernetes_on_macOS.md
Created November 30, 2017 14:05 — forked from kevin-smets/1_kubernetes_on_macOS.md
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@zulhfreelancer
zulhfreelancer / medium_LightsailAndDocker_Blob.sh
Created December 14, 2017 06:56 — forked from JoshuaTheMiller/medium_LightsailAndDocker_Blob.sh
A series of commands formatted in such a way that it just needs to be copy pasted into a terminal. Installs the latest community edition of Docker.
sudo apt-get update; \
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common -y; \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -; \
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@zulhfreelancer
zulhfreelancer / HelloYou.sol
Created March 17, 2018 13:25 — forked from lukehedger/HelloYou.sol
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.18+commit.9cf6e910.js&optimize=undefined&gist=
pragma solidity ^0.4.18;
// import './SomeContract.sol';
contract HelloYou {
event Hello(address you);
function sayHello() public {
address _person = msg.sender;