This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
# File: | |
# nginx_modsite | |
# Description: | |
# Provides a basic script to automate enabling and disabling websites found | |
# in the default configuration directories: | |
# /etc/nginx/sites-available and /etc/nginx/sites-enabled | |
# For easy access to this script, copy it into the directory: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Caps Lock to arrow keys", | |
"rules": [ | |
{ | |
"description": "Caps Lock as modifier (required, pick one)", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "caps_lock", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias ll='ls -alF' | |
alias la='ls -A' | |
alias l='ls -CF' | |
# docker | |
alias dc='docker-compose' | |
alias dw='dc exec web' | |
alias dt='dc exec -e "RAILS_ENV=test" web' | |
alias dx='dw bundle exec' | |
alias dxr='dx rails' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Simple script to fetch F660 admin password which occasionally changed by telkom | |
# | |
# OSX 10.13 (High Sierra) no longer have telnet, workaround: https://forums.developer.apple.com/thread/91472 | |
# | |
# usage: | |
# $ ./f660_pass 192.168.1.1 | |
# | |
ip=${1:-"192.168.1.1"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:2.4.1 | |
RUN apt-get update -qq && apt-get install -y build-essential | |
# install nodejs : https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions | |
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - && apt-get install -y nodejs | |
# for postgresql | |
RUN apt-get install -y libpq-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"save_on_beautify": false, | |
"tab_size": 2, | |
"ruby": "~/.rbenv/shims/ruby", | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'resolv' | |
url = 'mail.bocistudio.com' | |
begin | |
r = Resolv::DNS.open do |dns| | |
dns.getresource(url, Resolv::DNS::Resource::IN::CNAME) | |
end | |
r.name.to_s # => return alias domain | |
rescue Resolv::ResolvError => e | |
# handle error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Telkom Speedy / Indihome | |
0.0.0.0 internet-positif.org | |
0.0.0.0 stat01.u-ad.info | |
0.0.0.0 cfs.u-ad.info | |
0.0.0.0 u-ad.info | |
0.0.0.0 cfs.uzone.id | |
0.0.0.0 cfs1.uzone.id | |
0.0.0.0 cfs2.uzone.id | |
0.0.0.0 kendedes.uzone.id | |
0.0.0.0 mercusuar.uzone.id |