Skip to content

Instantly share code, notes, and snippets.

Avatar
:shipit:
shipit

Iqbal Hasnan iqbalhasnan

:shipit:
shipit
View GitHub Profile
View gist:ed92fa2450cab9c5b63d2402f3ff2c72
1.
Error:
java.io.IOException: java.lang.IllegalArgumentException: bucketId out of range: -1
Solution:
set hive.fetch.task.conversion=none;
2.
Error:
java.io.IOException: [Error 30022]: Must use HiveInputFormat to read ACID tables
@iqbalhasnan
iqbalhasnan / gist:dcd034a2ef300df65fe71baf3adafd4f
Created Mar 23, 2017
dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib
View gist:dcd034a2ef300df65fe71baf3adafd4f
ERROR
dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib
FIX
brew update && brew install gmp && rvm reinstall 2.2.5
@iqbalhasnan
iqbalhasnan / gist:5e859772e6014bc6e17630fe207001ba
Created Feb 2, 2017
Capistrano 3 - Changed Repository URL Fix
View gist:5e859772e6014bc6e17630fe207001ba
1 ) remove /home/deployer/appName/repo
2 ) cap production deploy
@iqbalhasnan
iqbalhasnan / carrierwave.rb
Created Jan 10, 2017
Uninitialized Constant Carrierwave::Storage::Fog
View carrierwave.rb
# Before
CarrierWave.configure do |config|
config.storage = :fog
config.fog_credentials = {
:provider => "AWS",
:aws_access_key_id => ENV["S3_KEY"],
:aws_secret_access_key => ENV["S3_SECRET"],
:region => ENV["S3_REGION"]
}
config.fog_directory = ENV["S3_BUCKET"]
@iqbalhasnan
iqbalhasnan / option_groups_from_collection_for_select.rb
Created Jan 7, 2017
ActiveAdmin Group Select With Formstatic
View option_groups_from_collection_for_select.rb
class Category < ApplicationRecord
has_many :types
end
class Type < ApplicationRecord
belongs_to :category
end
# Admin DSL. you need to pass the the selected type_id by passing the form object value.
f.input :category
View Capistrano 3.md

This guide explains the way to setup a production server using Capistrano.

Setup Capistrano on LOCAL

  • Capistrano is a development gem which assist the developer to run commands on the production server (something like a Heroku toolbelt)
  • Hence, it is installed and configured on developer's computer
# Gemfile

# Use Capistrano for deployment
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@iqbalhasnan
iqbalhasnan / gist:18495b8cd60313f826acf980be85dd69
Created Jun 13, 2016
Exception in callback of async function: Error: Handler with name 'u' already exists.
View gist:18495b8cd60313f826acf980be85dd69
Exception in callback of async function: Error: Handler with name 'u' already exists.
Run this to fix above error:
meteor update iron:middleware-stack
View capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@iqbalhasnan
iqbalhasnan / cisco_anny_connect.sh
Created Mar 2, 2016
Cisco AnyConnect Command Line
View cisco_anny_connect.sh
# Connect
printf "USERNAME\nPASSWORD\ny" | /opt/cisco/anyconnect/bin/vpn -s connect HOST
# Disconnect
/opt/cisco/anyconnect/bin/vpn disconnect
You can’t perform that action at this time.