https://alvinsmith.gitbook.io/progressive-oscp/untitled/vulnversity-privilege-escalation
[Unit]
Description=roooooooooot
[Service]
Type=simple
def write_json(): | |
result = {} #some random json | |
with open('data.json', 'w', encoding='utf-8') as f: | |
json.dump(result, f, ensure_ascii=False, indent=4) |
<?php | |
$active_group = 'default'; | |
$query_builder = TRUE; | |
$db['default'] = array( | |
'dsn' => '', | |
'hostname' => '127.0.0.1', // better than localhost if mysqli.default_socket points to a unknown path | |
'username' => 'db_user', // As of MySQL v5.7, you can't use 'root' without sudo - you must use a different username and password - https://askubuntu.com/questions/763336/cannot-enter-phpmyadmin-as-root-mysql-5-7 | |
'password' => 'password', | |
'database' => 'dbname', |
https://alvinsmith.gitbook.io/progressive-oscp/untitled/vulnversity-privilege-escalation
[Unit]
Description=roooooooooot
[Service]
Type=simple
cd ~ | |
mv .zsh_history .zsh_history_bad | |
strings -eS .zsh_history_bad > .zsh_history | |
fc -R .zsh_history |
<?php | |
require_once("PHPExcel/PHPExcel.php"); | |
$phpExcel = new PHPExcel(); | |
$styleArray = array( | |
'font' => array( | |
'bold' => true, | |
) | |
); |
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
<?php | |
function hexToStr($hex){ | |
$string=''; | |
for ($i=0; $i < strlen($hex)-1; $i+=2){ | |
$string .= chr(hexdec($hex[$i].$hex[$i+1])); | |
} | |
return $string; | |
} | |
function getCoinId($parent_coin_info,$puzzle_hash,$amount){ |
""" | |
Checking for put-call parity mispricings in facebook. | |
fb is American, so put call parity doesn't actually apply, but | |
this is a short term option, with no dividends between now and the | |
expiration (apr 17, 1 week option), in a low interest rate environment | |
so you can expect the trees to act almost european. | |
easier to find this data on yahoo than actual european data and | |
everyone knows what facebook is so i went with it. |
1. Generate keys for github accounts | |
eg. | |
ssh-keygen -t ed25519 -C "[email protected]" | |
ssh-keygen -t ed25519 -C "[email protected]" | |
2. Start ssh-agent in background and add keys |
docker exec -i mysql_container mysqldump -uroot -proot --databases database_name --skip-comments > /path/to/my/dump.sql
dump.sql
file in your host machine. Awesome, eh?--compact
on your dump. This will make MySQL check your constraints which will cause troubles when reading your file (damm you MySQL). And don't use --force
to fix this scenario: recreate your dump without --compact
¯_(ツ)_/¯