Skip to content

Instantly share code, notes, and snippets.

@boynoiz
boynoiz / profile.json
Created July 14, 2019 05:47 — forked from fcharlie/profile.json
My Windows Terminal profile.json
{
"defaultProfile": "{410aa365-68e4-4a68-83f5-6139ccb43b0a}",
"initialRows": 30,
"initialCols": 120,
"alwaysShowTabs": true,
"showTerminalTitleInTitlebar": true,
"experimental_showTabsInTitlebar": true,
"profiles": [
{
"startingDirectory": "C:\\Users\\$Username",
@boynoiz
boynoiz / dump.sh
Last active September 18, 2017 07:48 — forked from andsens/dump.sh
Backup all MySQL databases into separate files
#!/bin/sh
## backup each mysql db into a different file, rather than one big file
## as with --all-databases. This will make restores easier.
## To backup a single database simply add the db name as a parameter (or multiple dbs)
## Putting the script in /var/backups/mysql seems sensible... on a debian machine that is
## Create the user and directories
# mkdir -p /var/backups/mysql/databases
# useradd --home-dir /var/backups/mysql --gid backup --no-create-home mysql-backup
## Remember to make the script executable, and unreadable by others

XCode

  • Install XCode from App Store.
  • Open XCode and agree to terms and conditions.

XCode CLI Tools

  • xcode-select --install

Install Homebrew

@boynoiz
boynoiz / do-debian8-locale-issues.md
Created March 10, 2016 09:12 — forked from 5car1z/do-debian8-locale-issues.md
Debian 8 DO Locale Issues Fix

#Debian 8 DO Locale Issues Fix

##Problem

"Locale problems" in both the 32-bit & 64-bit versions of Debian 8 droplets

Create a new Debian 8 droplet and login as root:

SSL Cheat Sheet

Create self signed certificate:

openssl req -new -x509 -sha256 -newkey rsa:2048 -nodes -keyout server.key -days 365 -out server.crt

Create new key:

openssl genrsa -out server.key 2048
@boynoiz
boynoiz / sysctl.conf
Created November 7, 2015 10:12 — forked from kgriffs/sysctl.conf
Linux Web Server Kernel Tuning
# Configuration file for runtime kernel parameters.
# See sysctl.conf(5) for more information.
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for
# an explanation about some of these parameters, and instructions for
# a few other tweaks outside this file.
# Protection from SYN flood attack.
net.ipv4.tcp_syncookies = 1
@boynoiz
boynoiz / Rakefile
Last active October 28, 2015 10:47 — forked from rosskevin/Rakefile
Rakefile - less to sass a.k.a. less2sass or less2scss
# less to scss based on http://stackoverflow.com/a/19167099/2363935
namespace :convert do
task :less_to_scss do
source_glob = "resources/assets/less/*.less"
dest_dir = "resources/assets/sass/"
rm_r dest_dir rescue nil
mkdir_p(dest_dir)
@boynoiz
boynoiz / php7.sh
Last active September 5, 2018 16:30
PHP 7.0 on Debian 7 Wheezy
#!/bin/bash
set -e
PHP_VERSION=7.0
# Script base on php7.sh by Tom Van Looy https://gist.github.com/tvlooy/881d0d67d0ad699c38a3
# Dont use this shell script in production server unless you dont care
# You must first add the testing repository in your sourcelist before run this
# You must stop php7-fpm service if you already install
@boynoiz
boynoiz / phpinfo.php
Last active August 29, 2015 14:16 — forked from krisanalfa/phpinfo.php
<!DOCTYPE html>
<html>
<head>
<title>PHP INFO</title>
<style type="text/css">
body {font-family: "Ubuntu Mono", "Monospace", "Monaco", "Courier New"; font-size: 12px}
</style>
<link rel="shortcut icon" href="favicon.png" type="image/x-icon" />
</head>
<body>