Skip to content

Instantly share code, notes, and snippets.

View zulhfreelancer's full-sized avatar

Zulhilmi Zainudin zulhfreelancer

View GitHub Profile
@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 / 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;
@zulhfreelancer
zulhfreelancer / Readme.md
Created April 2, 2018 09:43 — forked from mxstbr/Readme.md
Enable tab completion for JSX with Emmet in Atom

Enable tab completion for JSX with Emmet in Atom

This guide assumes you have the emmet and language-babel packages already installed in Atom

Gif of the tab completion working

  1. Open the keymap.cson file by clicking on Atom -> Keymap… in the menu bar
  2. Add these lines of code to your keymap:
'atom-text-editor[data-grammar~="jsx"]:not([mini])':
@zulhfreelancer
zulhfreelancer / push_more.rb
Created April 14, 2018 11:37 — forked from marckohlbrugge/push_more.rb
Example code for sending notification with Telegram's @PushMoreBot
require "net/https"
class PushMore
WEBHOOK_URL = "https://pushmore.io/webhook/REPLACE_WITH_YOUR_TOKEN"
def initialize(body)
@body = body
end
def deliver