Skip to content

Instantly share code, notes, and snippets.

@masbog
masbog / VMware-Player-12.5.2-4638234_Linux-4.9_patch.sh
Created March 10, 2017 07:23
fix too few arguments to function "get_user_pages_remote" on Fedora 25 kernel 4.9.13-200
#!/bin/bash
cp -n /usr/lib/vmware/modules/source/vmmon.tar /usr/lib/vmware/modules/source/vmmon.tar_bak
cp /usr/lib/vmware/modules/source/vmmon.tar .
tar xf vmmon.tar
patch -p0 << "EOF"
--- vmmon-only/linux/hostif.c
+++ vmmon-only/linux/hostif.c
@@ -1162,7 +1162,9 @@
int retval;
@masbog
masbog / gist:64d1ff62cd7f309dc0b6bf1073de7fea
Created January 28, 2017 14:22 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@masbog
masbog / README.md
Created September 11, 2016 16:46 — forked from StefanWallin/README.md
nginx ssl config with multiple SNI vhosts and A+ SSL Labs score as of 2014-11-05

Configuring nginx for SSL SNI vhosts

Gotchas

Remarks

  • My version of konklones SSL config does not have SPDY support(my nginx+openssl does not support it)
  • You need a default ssl server (example.org-default.conf).
  • Some SSL-options have to be unique across your instance, so it's easier to have them in a common file(ssl.conf).
@masbog
masbog / keychain-system-dump.sh
Created July 26, 2016 12:33
Dump system keychain with automation insert username and password
$security dump-keychain -d /Library/Keychains/System.keychain > System-keychain.txt &
$osascript 2>/dev/null <<EOF
set appName to "${username}"
set appPass to "${password}"
tell application "System Events"
repeat while exists (processes where name is "SecurityAgent")
tell process "SecurityAgent"
if exists (text field 1 of window 1) then
set value of text field 1 of window 1 to appName
set value of text field 2 of window 1 to appPass
@masbog
masbog / usefulShit.md
Created July 24, 2016 05:31
collection of interesting projects, websites, documents & articles, most realated to information security
# =====================================================================
## SHADY APPS FROM CHINA HOSTS
## BLOCK LIST v2.2.6 Work in Progress (May 2016)
## By Megaton
#
@masbog
masbog / dc91d04bacb8d0a03d75acfe4130c9a290979ca6.dvtdownloadableindex
Created January 13, 2016 09:39
How to enable iOS 7.0/7.1 Simulator download Xcode Version 7.2 (7C68)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>downloadables</key>
<array>
<dict>
<key>dependencies</key>
<array/>
<key>fileSize</key>
@masbog
masbog / file0.txt
Created December 1, 2015 10:47 — forked from giwa/file0.txt
Install g++/gcc 4.8.2 in CentOS 6.6 ref: http://qiita.com/giwa/items/28c754d8fc2936c0f6d2
$ wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
$ yum install devtoolset-2-gcc devtoolset-2-binutils
$ yum install devtoolset-2-gcc-c++ devtoolset-2-gcc-gfortran
@masbog
masbog / .travis.yml
Created October 29, 2015 09:18 — forked from johanneswuerbach/.travis.yml
Deploy an iOS app to testflight using Travis CI
---
language: objective-c
before_script:
- ./scripts/travis/add-key.sh
after_script:
- ./scripts/travis/remove-key.sh
after_success:
- ./scripts/travis/testflight.sh
env:
global:
@masbog
masbog / mesos-init-wrapper
Last active August 29, 2015 14:28
see the initial commit, and edit it for add extend parameter work_dir and cluster name UBUNTU | /usr/bin/mesos-init-wrapper
#!/bin/bash
# masbog ~ custom ~ mesos ~ script
# command will look like :
# sudo /usr/sbin/mesos-master --zk=zk://master-zookeeper:2181/mesos --port=5050 --log_dir=/var/log/mesos --work_dir=/tmp/mesos-master/work_dir --cluster=MASBOG-ECOSYSTEM --hostname=mesos-master --ip=8.0.6.13 --quorum=1
# step :
# mkdir -p /tmp/mesos-master/work_dir
# echo "/tmp/mesos-master/work_dir" >> /tmp/mesos-master/work_dir
# echo "WORKDIR=`cat /etc/mesos/workdir`" >> /etc/default/mesos-slave
# echo "WORKDIR=`cat /etc/mesos/workdir`" >> /etc/default/mesos-master
# echo "MASBOG-ECOSYSTEM" >> /etc/mesos-master/cluster