Skip to content

Instantly share code, notes, and snippets.

View RafalSladek's full-sized avatar

Rafal Sladek RafalSladek

View GitHub Profile
@RafalSladek
RafalSladek / arch-install-laptop.md
Created May 10, 2016 19:21
Arch Linux Laptop Install - E6430

Arch Install

Boot from Archlinux ISO on USB

  1. IF Wireless # wifi-menu
  2. timedatectl set-ntp true
  3. parted /dev/sda
  4. mklabel gpt - YES
  5. mkpart efi fat32 1MiB 1025MiB
  6. mkpart root ext4 1025MiB 31GiB
@RafalSladek
RafalSladek / purgeAndroid.txt
Created February 27, 2017 09:36 — forked from tahmidsadik/purgeAndroid.txt
How to completely remove Android Studio from Mac OS X
How to Completely Remove Android Studio
Execute these commands from the terminal
rm -Rf /Applications/Android\ Studio.app
rm -Rf ~/Library/Preferences/AndroidStudio*
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf ~/Library/Application\ Support/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*
@RafalSladek
RafalSladek / renamefiles.fish
Created April 26, 2017 14:42 — forked from staydecent/renamefiles.fish
File renaming pattern for Fish Shell with OSX sed
# 'Item*' it the pattern to look for
# sed "s/I/i/g" is the replacement pattern
for f in Item*; mv $f (echo {$f} | sed "s/I/i/g"); end
@RafalSladek
RafalSladek / mount_smbfs.sh
Created May 14, 2017 10:02 — forked from natritmeyer/mount_smbfs.sh
How to mount and unmount a SMB share on Mac OS X (using mount_smbfs)
#Mounting the share is a 2 stage process:
# 1. Create a directory that will be the mount point
# 2. Mount the share to that directory
#Create the mount point:
mkdir share_name
#Mount the share:
mount_smbfs //username:password@server.name/share_name share_name/
@RafalSladek
RafalSladek / setupVpn.sh
Last active July 9, 2017 15:01 — forked from nodesocket/vpnsetup.sh
install ipsec vpn
wget https://git.io/vpnsetup -O vpnsetup.sh && sudo \
VPN_IPSEC_PSK='your_ipsec_pre_shared_key' \
VPN_USER='your_vpn_username' \
VPN_PASSWORD='your_vpn_password' sh vpnsetup.sh

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@RafalSladek
RafalSladek / ssh_agent_start.fish
Created July 11, 2017 05:00 — forked from gerbsen/ssh_agent_start.fish
Auto-launching ssh-agent in fish shell
# content has to be in .config/fish/config.fish
# if it does not exist, create the file
setenv SSH_ENV $HOME/.ssh/environment
function start_agent
echo "Initializing new SSH agent ..."
ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV
echo "succeeded"
chmod 600 $SSH_ENV
. $SSH_ENV > /dev/null
@RafalSladek
RafalSladek / oracle_guid_helpers.sql
Created December 12, 2017 16:25 — forked from sandcastle/oracle_guid_helpers.sql
Oracle GUID helper functions for converting between GUID and RAW(16)
set serveroutput on;
declare
raw_guid raw(16);
guid varchar2(64);
begin
raw_guid := guid_to_raw ('88c6a267-65d2-48d6-8da2-6f45e2c22726');
guid := raw_to_guid('67A2C688D265D6488DA26F45E2C22726');
#!/usr/bin/env bash
# IMPORTANT: Run this script from /home/<USER>/ directory: bash -c "$(curl SCRIPT_URL)"
# (optional): Preparing the environment if you want to install zen from source:
# Once you get the VM up and running you need to login with your root account and run below commands.
# apt-get update && apt-get upgrade -y
# apt-get install -y build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python zlib1g-dev wget bsdmainutils automake libgtk2.0-dev && apt-get autoremove -y
@RafalSladek
RafalSladek / isdockerlive.sh
Created January 9, 2018 10:16 — forked from peterver/isdockerlive.sh
A shell script that uses curl to see if docker is up and running
#!/bin/bash
rep=$(curl -s --unix-socket /var/run/docker.sock http://ping > /dev/null)
status=$?
if [ "$status" == "7" ]; then
echo 'not connected'
exit 1
fi