Skip to content

Instantly share code, notes, and snippets.

@masbog
masbog / fixXcode6OnElCapitan.sh
Last active August 30, 2023 06:47 — forked from DaveWoodCom/fixXcode6OnElCapitan.sh
Script to fix Xcode 6.x so that it will run on El Capitan
#!/bin/bash
## Copyright (C) 2015 Cerebral Gardens http://www.cerebralgardens.com/
##
## Permission is hereby granted, free of charge, to any person obtaining a copy of this
## software and associated documentation files (the "Software"), to deal in the Software
## without restriction, including without limitation the rights to use, copy, modify,
## merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
## permit persons to whom the Software is furnished to do so, subject to the following
## conditions:
@masbog
masbog / LoadImage.h
Last active August 29, 2015 14:17 — forked from iamamused/LoadImage.h
//
// LoadImage.h
// AssetsFromPDF
//
// Created by Jeffrey Sambells on 2012-03-02.
//
#import <Foundation/Foundation.h>
@interface LoadImage : NSObject
@masbog
masbog / oracle_JDK.sh
Last active August 29, 2015 14:16
Ya coba2, sapa tau berguna buat install Oracle JDK pake RPM -_____-"
#!/bin/bash
# bisa pake kek gini juga kalo mau versi lain nya: /bin/sh oracle_JDK.sh <V> <rpm|tar>
# V: default 8
# rpm
V="8"
EXT="rpm"
if [ -n "$1" ]; then
@masbog
masbog / pgbackup.sh
Created February 11, 2015 04:05
postgre daily backup to file with shell script and can use in cronjobs
#!/bin/bash
PGHOST="8.0.6.13"
PGUSER="masbog"
PGDB="masdb"
PGVERSION="9.4"
FILENAME="/tmp/dbdump/$(date '+%A-%M-%m-%Y-%T.dump')"
STARTTIME="START AT $(date '+%A-%M-%m-%Y-%T')"
echo "removing old data rm -f /tmp/dbdump/*"
rm -f /tmp/dbdump/*
#!/bin/bash
### VARIABLES ###
PRE_PACK="openssl-devel pcre-devel make gcc"
VER="1.5.1"
# Setup Colours
black='\E[30;40m'
red='\E[31;40m'
@masbog
masbog / disable_ipv6.sh
Created November 27, 2014 10:00
Simple Disable IPV6 on CentOS
#!/bin/sh
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6" = 1 >> /etc/sysctl.conf
echo "IPV6INIT=no" >> /etc/sysconfig/network
service ip6tables stop
chkconfig ip6tables off
echo "install ipv6 /bin/true" > /etc/modprobe.d/ipv6_disabled.conf
echo "PLEASE REBOOT."
@masbog
masbog / nginx
Created November 4, 2014 10:31
NGINX init.d
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /opt/nginx/conf/nginx.conf
# config: /etc/sysconfig/nginx
@masbog
masbog / nginx_with_http_secure_link_and_lua_module.sh
Last active August 29, 2015 14:08
nginx_with_http_secure_link_and_lua_module
@masbog
masbog / cydia.sh
Created October 26, 2014 19:09
Installing Cydia at iOS 8.x after jailbreak iDevice with Pangu from mac or linux
#!/bin/sh
echo "Input your iDevice ip address :"
read ipaddress
echo "create temporary directory at your desktop"
mkdir -p ~/Desktop/CydiaFileInstalls
echo "downloading Cydia"
cd ~/Desktop/CydiaFileInstalls && { curl -O http://cache.saurik.com/debs/cydia_1.1.13_iphoneos-arm.deb ; cd -; }
cd ~/Desktop/CydiaFileInstalls && { curl -O http://apt.saurik.com/debs/cydia-lproj_1.1.12_iphoneos-arm.deb ; cd -; }
ls -la ~/Desktop/CydiaFileInstalls
echo "default ssh password at your iphone is 'alpine' without quote"
@masbog
masbog / bucard.sh
Created October 21, 2014 03:02
bucardo how to initialize 2 postgresql database server
#!/bin/bash
# slave ip server is 10.10.10.10
bucardo install --piddir=/tmp
bucardo add database db_master dbname=database_test
bucardo del database db_master
bucardo add database db_master dbname=database_test addalltables addallsequences
bucardo add database db_slave dbname=database_test host=10.10.10.10 addalltables addallsequences
bucardo add all table --herd=db_master_to_db_slave db=db_master
bucardo add all sequence --herd=db_master_to_db_slave db=db_master
bucardo add all table --herd=db_slave_to_db_master db=db_slave