Skip to content

Instantly share code, notes, and snippets.

View harrifeng's full-sized avatar

Harri Feng harrifeng

View GitHub Profile
@harrifeng
harrifeng / README.md
Created November 24, 2022 15:23 — forked from tknerr/README.md
Vagrant with Ansible Provisioner on Windows

Vagrant with Ansible Provisioner on Windows

Long story short, ansible does not work on a Windows control machine, so you basically have to:

  • either run ansible --connection=local ... in the target vm
  • set up a separate control vm where ansible is installed via shell provisioner

Below are Vagrantfile examples for both approaches

Within the Target VM

curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
#!/bin/bash
yum install epel-release -y
yum install snapd -y
systemctl enable --now snapd.socket
ln -s /var/lib/snapd/snap /snap
@harrifeng
harrifeng / ctrl_h_del.lua
Created January 5, 2022 08:09
Mac ctrl +h to delete
hs.hotkey.bind({"ctrl"}, "h", function()
hs.eventtap.keyStroke('', 'delete')
end)
@harrifeng
harrifeng / multi_emacs_config.org
Created April 29, 2021 03:36
multi emacs config

Install Doom alongside other configs (with Chemacs2)

Chemacs2 is a bootloader for Emacs. It allows you to switch between multiple Emacs configurations. Here is a quick guide for setting it up with Doom Emacs as the default config:

  1. First, install Doom somewhere:
    git clone https://github.com/hlissner/doom-emacs ~/doom-emacs
    ~/doom-emacs/bin/doom install
        

Feature 103

This feature was previsouly created for old users. Recently, all the old users had already join new group.

Owner

Ada John

>>> import sys
>>> sys.maxsize
9223372036854775807
package main
import (
"net/http"
"os"
)
func main() {
shareFolder := "/share"
if len(os.Args) > 1 {
@harrifeng
harrifeng / choco.txt
Created October 15, 2018 06:06
Choco local list
autohotkey
cmder
git
github-desktop
GoogleChrome
nodejs
python
virtualbox
@harrifeng
harrifeng / install-tmux
Created October 8, 2018 07:10 — forked from suhlig/install-tmux
Install tmux 2.7 on rhel/centos 7
# Install tmux on rhel/centos 7
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
tar -xvzf libevent-2.1.8-stable.tar.gz
cd libevent-2.1.8-stable
./configure --prefix=/usr/local