Skip to content

Instantly share code, notes, and snippets.

View wirwolf's full-sized avatar

Andru Cherny wirwolf

View GitHub Profile
@akost
akost / convert.sh
Created April 4, 2012 19:06
Bash script for recursive file convertion windows-1251 --> utf-8
#!/bin/bash
# Recursive file convertion windows-1251 --> utf-8
# Place this file in the root of your site, add execute permission and run
# Converts *.php, *.html, *.css, *.js files.
# To add file type by extension, e.g. *.cgi, add '-o -name "*.cgi"' to the find command
find ./ -name "*.php" -o -name "*.html" -o -name "*.css" -o -name "*.js" -type f |
while read file
do
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active May 2, 2024 23:15
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh key
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
eval "$(ssh-agent -s)"
@abs
abs / gist:c0d598996870dda719b3
Last active November 28, 2016 22:14
Downloads and installs the startssl CA certs into the global Java keystore
#!/bin/sh
#
# Downloads and installs the startssl CA certs into the global java keystore
# Author: Klaus Reimer <k@ailis.de>
#
# Check if JAVA_HOME is set
if [ "$JAVA_HOME" = "" ]
then
echo "ERROR: JAVA_HOME must be set."
@hit9
hit9 / ngx-lua.sh
Created March 9, 2015 10:57
Script to compile nginx on ubuntu with lua support.
#!/bin/sh
# Script to compile nginx on ubuntu with lua support.
NGX_VERSION='1.6.2'
LUAJIT_VERSION='2.0.3'
LUAJIT_MAJOR_VERSION='2.0'
NGX_DEVEL_KIT_VERSION='0.2.19'
LUA_NGINX_MODULE_VERSION='0.9.15'
@jtbonhomme
jtbonhomme / jira-behing-nginx-ssl
Created September 26, 2015 07:49 — forked from alertor/jira-behing-nginx-ssl
Atlassian JIRA behind nginx + SSL
# force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf
server {
listen 80;
server_name jira.example.com;
access_log off;
return 301 https://$server_name$request_uri;
}
# /etc/nginx/conf.d/jira.conf
server {
@Ryan4CN
Ryan4CN / ngx-lua.sh
Last active May 31, 2019 23:16 — forked from hit9/ngx-lua.sh
[编译Nginx使之支持Lua脚本]Script to compile nginx on ubuntu with lua support.
#!/bin/sh
apt-get install -y libreadline-dev libncurses5-dev libpcre3-dev \
libssl-dev perl make build-essential
# Script to compile nginx on ubuntu with lua support.
NGX_VERSION='1.8.0'
LUAJIT_VERSION='2.0.4'
LUAJIT_MAJOR_VERSION='2.0'
@sdieunidou
sdieunidou / rabbitmq.txt
Created October 22, 2015 19:51
create admin user on rabbitmq
rabbitmqctl add_user test test
rabbitmqctl set_user_tags test administrator
rabbitmqctl set_permissions -p / test ".*" ".*" ".*"
@Brainiarc7
Brainiarc7 / refind-setup.md
Last active April 26, 2024 06:39
Setting up rEFInd on Ubuntu 16.04 LTS for multi-boot purposes with secure boot enabled.

Deploying rEFInd on Ubuntu 16.04 LTS with secure boot enabled

Hello guys,

For these dual-booting Ubuntu 16.04 with an alternate operating system in UEFI boot mode, it may often be necessary to use a third-party boot manager such as rEFInd, as it's significantly superior to grub2's on UEFI-capable systems.

This write-up assumes that:

(a). The user is running a current Ubuntu 16.04LTS operating system installation (preferably on a dual-boot system)

@kamermans
kamermans / zabbix_v3_2_template_percona_mysql_server.xml
Created March 24, 2017 18:05
Percona Monitoring Plugins MySQL Template for Zabbix 3.2
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<date>2017-03-24T18:03:00Z</date>
<graphs>
<graph>
<graph_items>
<graph_item>
<calc_fnc>2</calc_fnc>
<color>157419</color>
<drawtype>1</drawtype>
@rwenz3l
rwenz3l / hetzner-proxmox-docker.sh
Created September 2, 2017 15:29
Hetzner Dedicated with Debian 9 (Stretch) and Proxmox 5 (LXC) + Docker-CE + Portainer [NAT]
#############################################
### Proxmox V & Docker-CE + Portainer #
#############################################
## Rescue System
# Erase other disks
dd if=/dev/zero of=/dev/sda bs=1M count=100
dd if=/dev/zero of=/dev/sdb bs=1M count=100
# You can install debian 9 via the guide: