Skip to content

Instantly share code, notes, and snippets.

View synsa's full-sized avatar

Steve Lang synsa

View GitHub Profile
@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 \
// shipitfile.js
module.exports = shipit => {
// Load shipit-deploy tasks
require('shipit-deploy')(shipit)
require('shipit-shared')(shipit)
require('shipit-submodule')(shipit);
var currentPath = "/var/www/tmp/shipit-frontend-deploy";
var Slack = require('slack-node');
@synsa
synsa / git-ssh-configuration.md
Created June 4, 2020 06:51 — forked from cham11ng/git-ssh-configuration.md
Configuring SSH for Git

Git Installation and SSH Configuration

By: Sagar Chamling

Installation

For Linux (Debian/Ubuntu):

sudo apt install git
@synsa
synsa / convert.sh
Created May 29, 2020 06:49 — forked from termie/convert.sh
convert mysql dump to sqlite dump
#!/bin/sh
# ================================================================
#
# Convert a mysql database dump into something sqlite3 understands.
#
# Adapted from
# http://stackoverflow.com/questions/489277/script-to-convert-mysql-dump-sql-file-into-format-that-can-be-imported-into-sqlit
#
# (c) 2010 Martin Czygan <[email protected]>