Skip to content

Instantly share code, notes, and snippets.

View mirzalazuardi's full-sized avatar
🙃

Mirzalazuardi Hermawan mirzalazuardi

🙃
View GitHub Profile
@sahensley
sahensley / tmux-conf-copy-to-windows-clipboard.md
Created July 26, 2019 05:34
Tmux config to copy to the Windows system clipboard

About

Tmux 2.4 (April 2017) added a very useful copy-pipe-and-cancel command.

The config below configures copying to the tmux buffer and the Windows system clipboard in one command, including click-and-drag copying (without holding shift). I'm sure there's a way to get this to work with copy-mode (emacs style) but I'm not familiar enough with it to offer any advice. I've tested the config successfully both in WSL via PowerShell and WSL via MinTTY.

Config

# Configure copying

At the moment upgrading vue-loader causes some changes in how things are done. These are my config options for these items just to get it working.

config/webpack/environment.js

const { environment } = require('@rails/webpacker')
const coffee = require('./loaders/coffee')
const vue = require('./loaders/vue')

environment.loaders.append('vue', vue)
require 'apple_id'
# NOTE: in debugging mode, you can see all HTTPS request & response in the log.
# AppleID.debug!
pem = <<-PEM
-----BEGIN PRIVATE KEY-----
:
:
-----END PRIVATE KEY-----
@carlolars
carlolars / .wsl-git.md
Last active February 4, 2024 07:21
HOWTO: Use WSL and its Git in a mixed development environment

How to setup a development environment where Git from WSL integrates with native Windows applications, using the Windows home folder as the WSL home and using Git from WSL for all tools.

Note if using Git for Windows, or any tool on the Windows side that does not use Git from WSL then there will likely be problems with file permissions if using those files from inside WSL.

Tools

These are the tools I use:

  • git (wsl) - Command line git from within WSL.
  • Fork (windows) - Git GUI (must be used with wslgit)
  • wslgit - Makes git from WSL available for Windows applications. Important! Follow the installation instructions and do (at least) the first optional step and then the Usage in Fork instructions.
@przbadu
przbadu / _vue-rails.md
Last active July 16, 2022 21:48
Vue js and Rails integration

Setup Rails and Vuejs

  1. Generate new rails app using --webpack flag
rails new myApp --webpack=vue

Note:

  1. You can use --webpack=angular for angular application and --webpack=react for react.
# Basic commands
:Git [args] # does what you'd expect
all of your `~/.gitconfig` aliases are available.
:Git! [args] # same as before, dumping output to a tmp file
Moving inside a repo.
@alea12
alea12 / crontab
Created March 28, 2017 02:50
Nginx + Let's Encrypt + Rails5 + Puma
00 05 01 * * /home/alea12/letsencrypt/letsencrypt-auto certonly --webroot -w /var/www/html -d example.net --renew-by-default && nginx -t && nginx -s reload
@PavloBezpalov
PavloBezpalov / 1. ELK.install
Last active January 5, 2024 16:14
ELK Stack with Rails (Elasticsearch, Logstash, Kibana) on Ubuntu VPS
INSTALL JAVA
$ sudo apt-get update && sudo apt-get install default-jre
INSTALL ELASTIC SEARCH https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html
$ wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
$ echo "deb https://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
$ sudo apt-get update && sudo apt-get install elasticsearch
$ sudo update-rc.d elasticsearch defaults 95 10
$ sudo service elasticsearch restart
$ sudo service elasticsearch status
@lucaspiller
lucaspiller / _fields.html.slim
Last active June 26, 2021 23:03
Reform 2.2 nested form (with support for cocoon gem)
= f.simple_fields_for :inputs do |input|
= render 'input_fields', f: input
.links
= link_to_add_association f, :inputs, partial: 'input_fields', force_non_association_create: true do
Add