Skip to content

Instantly share code, notes, and snippets.

View cnpdev's full-sized avatar

Tsvetelin Petkov cnpdev

  • BIX.BG
  • Sofia, Bulgaria
View GitHub Profile
#!/bin/sh
# Create a RAM disk with same perms as mountpoint
# Script based on http://itux.idev.pro/2012/04/iservice-speed-up-your-xcode-%D0%BD%D0%B5%D0%BA%D0%BE%D1%82%D0%BE%D1%80%D1%8B%D0%B5-%D1%81%D0%BF%D0%BE%D1%81%D0%BE%D0%B1%D1%8B/ with some additions
# Usage: sudo ./xcode_ramdisk.sh start
USERNAME=$(logname)
TMP_DIR="/private/tmp"
RUN_DIR="/var/run"
SYS_CACHES_DIR="/Library/Caches"
@cnpdev
cnpdev / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
install
cdrom
lang en_US.UTF-8
keyboard uk
network --bootproto=dhcp
authconfig --enableshadow --passalgo=sha512
rootpw --iscrypted $6$7AiofZgT$dtSBjTihyZg.bJh0HEQzysJM6JEzCULmw8vYck6ItIR2voMwr/7TglTBRlOoalLC469ImkYc2CRy0PUkoCa2I1
firewall --enabled --service=ssh
timezone GMT
unsupported_hardware
#!/usr/bin/python
# -*- coding: utf-8 -*-
# set expandtab ts=4 sw=4 ai
import os, sys
import time
import random
import string
import prowlpy
from twisted.python import log
@cnpdev
cnpdev / Template Kamailio.xml
Created February 24, 2016 14:35 — forked from crashdump/Template Kamailio.xml
Kamailio - Zabbix Monitoring
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2013-12-03T11:38:27Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
@cnpdev
cnpdev / Template CouchDB.xml
Created February 24, 2016 14:35 — forked from crashdump/Template CouchDB.xml
CouchDB / BigCouch - Zabbix Monitoring
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2013-12-03T16:57:07Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
@cnpdev
cnpdev / ip6tables
Created February 24, 2016 14:38 — forked from crashdump/ip6tables
### BEGIN INIT INFO
# Provides: firewall
# Required-Start: $network
# Required-Stop: $network
# Default-Start: S 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Firewall (ipv6) rules
# Description: Simple script to initialise an ip6tables firewall
### END INIT INFO
@cnpdev
cnpdev / iptables
Created February 24, 2016 14:39 — forked from crashdump/iptables
### BEGIN INIT INFO
# Provides: firewall-ipv4
# Required-Start: $network
# Required-Stop: $network
# Default-Start: S 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Firewall rules
# Description: Simple script to initialise an iptables firewall
### END INIT INFO
@cnpdev
cnpdev / font_letter_check.txt
Created May 16, 2018 13:41 — forked from marcospedreiro/font_letter_check.txt
/u/martinus test pattern to check how distingushable characters are for a font
From: https://www.reddit.com/r/programming/comments/8jjq33/11_best_programming_fonts/dz0xxs5/
------
o0O s5S z2Z !|l1Iij {([|})] .,;: ``''""
a@#* vVuUwW <>;^°=-~ öÖüÜäÄßµ \/\/
the quick brown fox jumps over the lazy dog
THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
0123456789 &-+@ for (int i=0; i<j; ++i) { }
@cnpdev
cnpdev / apfs_cli_tools.txt
Created June 12, 2018 21:17 — forked from timsutton/apfs_cli_tools.txt
apfs tools in Sierra
➜ ~ sw_vers
ProductName: Mac OS X
ProductVersion: 10.12.1
BuildVersion: 16B2333a
➜ ~ ls -l /System/Library/Filesystems/apfs.fs/Contents/Resources
total 2088
-rwxr-xr-x 1 root wheel 349760 22 Sep 03:48 apfs.util
-rwxr-xr-x 1 root wheel 352880 22 Sep 03:48 apfs_invert