Skip to content

Instantly share code, notes, and snippets.

View synsa's full-sized avatar

Steve Lang synsa

View GitHub Profile
@synsa
synsa / your-domain.com
Created October 9, 2020 01:38 — forked from lukaszflorczak/your-domain.com
Nginx configuration for Nuxt.js
server {
listen 80;
listen [::]:80;
index index.html;
server_name your-domain.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
@synsa
synsa / GitHub protocol comparison.md
Created August 28, 2020 18:45
A comparison of protocols offered by GitHub (for #git on Freenode).

Primary differences between SSH and HTTPS. This post is specifically about accessing Git repositories on GitHub.

Protocols to choose from when cloning:

plain Git, aka git://github.com/

  • Does not add security beyond what Git itself provides. The server is not verified.

    If you clone a repository over git://, you should check if the latest commit's hash is correct.

@synsa
synsa / README.md
Created July 27, 2020 01:34 — forked from dnozay/README.md
selinux policy for gitweb when using autofs / symlinks / ...etc

Commands to compile and load module:

checkmodule -M -m -o gitweb.mod gitweb.te
semodule_package -o gitweb.pp -m gitweb.mod
semodule -i gitweb.pp

Doesn't work on your system?

setenforce 0
@synsa
synsa / balsamiq.svg
Created July 1, 2020 01:45 — forked from steren/balsamiq.svg
Balsmiq Mockup style made with Inkscape
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@synsa
synsa / install_elixir.md
Created June 28, 2020 06:28 — forked from rubencaro/install_elixir.md
Elixir installation guide

Elixir installation guide

Version numbers should be the ones you want. Here I do it with the last ones available at the moment of writing.

The simplest way to install elixir is using your package manager. Sadly, at the time of writing only Fedora shows the intention to keep its packages up to date. There you can simply sudo dnf install erlang elixir and you are good to go.

Anyway, if you intend to work with several versions of erlang or elixir at the same time, or you are tied to a specific version, you will need to compile it yourself. Then asdf is your best friend.

@synsa
synsa / gist:5b0f0025c254c37cec84293d17372d72
Created June 25, 2020 21:02 — forked from mitkot/gist:bbfe1e5141144780a467fb08994b8352
How to extract source files out of src.rpm file
$ rpm2cpio ../hoge.src.rpm | cpio -i
@synsa
synsa / uninstall_chefdk_for_mac.sh
Created June 24, 2020 18:01 — forked from otukutun/uninstall_chefdk_for_mac.sh
uninstall_chefdk_for_mac
#!/bin/bash
if [ -e /opt/chefdk ]; then
rm -rf /opt/chefdk
else
echo "can not found chefdk"
fi
rm /usr/bin/berks
rm /usr/bin/chef
@synsa
synsa / gitignore_per_git_branch.md
Created June 18, 2020 21:21 — forked from wizioo/gitignore_per_git_branch.md
HowTo have specific .gitignore for each git branch

How to have specific .gitignore for each git branch

Objective

My objective is to have some production files ignored on specific branches. Git doesn't allow to do it.

Solution

My solution is to make a general .gitignore file and add .gitignore.branch_name files for the branches I want to add specific file exclusion. I'll use post-checkout hook to copy those .gitignore.branch_name in place of .git/info/exclude each time I go to the branch with git checkout branch_name.

@synsa
synsa / ubuntu1804_ruby_elixir.md
Created June 14, 2020 00:18 — forked from brycejohnston/ubuntu1804_ruby_elixir.md
Ubuntu 18.04 / 18.10 Ruby and Elixir Development Setup

Ubuntu 18.04 / 18.10 Ruby and Elixir Development Setup

Guide to setting up a new Ubuntu 18.04 dev environment with Ruby and Elixir installed with the asdf version management tool.

Update system and install prerequisite packages

Some of these packages may already be installed

sudo apt-get install make binutils gcc build-essential \
 git curl zlib1g-dev openssl libssl-dev libreadline-dev \