Skip to content

Instantly share code, notes, and snippets.

View platinumthinker's full-sized avatar
🌐
Waiting

PlatinumThinker platinumthinker

🌐
Waiting
View GitHub Profile
@platinumthinker
platinumthinker / compact.cpp
Created December 30, 2015 10:16 — forked from Wunkolo/compact.cpp
Ascii Raymarcher
#include <math.h>
#include <algorithm>
#include <string>
#include <pmmintrin.h>
using namespace std;typedef float R;
#define _W 79
#define _H 39
#define EP 0.01f
#define OP operator
#define C const
@platinumthinker
platinumthinker / sh
Created July 15, 2016 08:43
sed magic delimiter
magic_sed() {
local INPUT_FILE=$1
local REGEXP=$3
local REPLACE=$4
sed -e 's'$'\001'"$REGEXP"$'\001'"$REPLACE"$'\001''g' $INPUT_FILE
}
mvn compile
mvn package
nohup java -jar $JAR_FILE
1) проброс с текущего компа с порта 8888 на порт 192.168.23.30:8889 :
ssh -N -R 127.0.0.1:8889:0.0.0.0:8888 mixo@192.168.23.30
{module, aa}. %% version = 0
{exports, [{aa,1},
{bb,1},
{get1,2},
{get2,2},
{module_info,0},
{module_info,1},
{new1,0},
{new2,0}]}.
@platinumthinker
platinumthinker / sh
Last active February 9, 2017 17:56
hight load tools
apt-get install sysstat
while true; do
mpstat -u -I SUM,SCPU -P ON
echo '---------------------------------------------------------------------------------'
echo
vmstat -w
echo '---------------------------------------------------------------------------------'
echo
vmstat -wd
echo '---------------------------------------------------------------------------------'
@platinumthinker
platinumthinker / LTTng+erlang:trace
Last active June 21, 2017 08:35 — forked from bokner/LTTng+erlang:trace
LTTng+erlang:trace for tracing function calls/returns
1> l(dyntrace).
{module,dyntrace}
2> erlang:trace_pattern({'_','_','_'}, [{'_', [], [{return_trace}]}], [local]). %% For function_call info
3> erlang:trace_pattern({'_','_','_'}, [{'_', [], [{exception_trace}]}], [local]). %% For exception info
4> erlang:trace(all, true, [call,'receive', send, {tracer,dyntrace,[]}]). %% Trace function calls with dyntrace (i.e. LTTng) and messaging
26
5> erlang:now(). %% Or whatever function call you want to trace. See the traces coming in LTTng log.

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
process_flag(sensitive, true) - Stack back-traces cannot be displayed for the process. In crash dumps, the stack, messages, and the process dictionary are omitted.
process_flag(error_handler, Module) - set new error handler
process_flag(message_queue_data, MQD) - +hmqd off_heap|on_heap (default on_heap)
@platinumthinker
platinumthinker / sip1.md
Last active October 25, 2024 20:26
sip tools

Include in kali-linux-voip:

SIP:

* inviteflood

homepage kali

A tool to perform SIP/SDP INVITE message flooding over UDP/IP.