Skip to content

Instantly share code, notes, and snippets.

View unixfox's full-sized avatar

Émilien (perso) unixfox

View GitHub Profile
@unixfox
unixfox / map.xml
Created July 10, 2015 21:08
Nextgen TE XML correction
<?xml version="1.0"?>
<map proto="1.3.5">
<autorespawn/>
<time result="objectives">45m</time>
<name>NextGen TE</name>
<version>2.1</version>
<objective>Take the enemy's wool located to either side of the enemy's base and place it in your victory monument.</objective>
<authors>
<author uuid="dad8b95c-cf6a-44df-982e-8c8dd70201e0" contribution="reinventing the map"/> <!-- ElectroidFilms -->
</authors>
@unixfox
unixfox / map.xml
Last active August 29, 2015 14:24
XML of Valarius map
<map proto="1.4.0">
<name>Valarius</name>
<version>1.2</version>
<objective>Destroy the other team's endstone monuments and leak lava from their core.</objective>
<authors>
<author uuid="748b36ae-01c5-43b3-914c-e3b4cdfb98db"/> <!-- hugbatnat -->
<author uuid="a14067eb-fee6-47b7-9dc5-970f0f0d5a01"/> <!-- Toady -->
</authors>
<contributors>
<contributor contribution="XML" uuid="65d3ae85-7a2e-40ad-a19e-1c2a429d515b"/> <!-- SrChains -->
@unixfox
unixfox / fix-class-not-registered-chromium.bat
Last active August 26, 2015 22:42
FIX Class not registered for Chromium
REG DELETE HKEY_CLASSES_ROOT\Chromium
REG DELETE HKEY_LOCAL_MACHINE\Software\Classes\Chromium
REG DELETE HKEY_CURRENT_USER\Software\Classes\Chromium
REG DELETE HKEY_LOCAL_MACHINE\Software\Classes\ChromiumHTM\open\command\DelegateExecute
REG DELETE HKEY_CURRENT_USER\Software\Classes\ChromiumHTM\open\command\DelegateExecute

Keybase proof

I hereby claim:

  • I am unixfox on github.
  • I am unixfox (https://keybase.io/unixfox) on keybase.
  • I have a public key whose fingerprint is 0E21 9217 9AE9 E47A BAE2 3DFF 7FEE 7ADE 2CA7 25CF

To claim this, I am signing this object:

@unixfox
unixfox / lowcost-vps-hosting.md
Created November 17, 2016 17:40
Low cost VPS hosting
  • Pulseheberg
  • Cathost
  • VPSZ
  • OVH
  • SHPV France
@unixfox
unixfox / asciinema.py
Created December 8, 2016 10:41
Export session from Cowrie/Kippo/Honssh to asciinema
#!/usr/bin/env python2
import getopt
import json
import os
import sys
import struct
OP_OPEN, OP_CLOSE, OP_WRITE, OP_EXEC = 1, 2, 3, 4
TYPE_INPUT, TYPE_OUTPUT, TYPE_INTERACT = 1, 2, 3
@unixfox
unixfox / asciinema-upload.sh
Created December 8, 2016 10:42
Automaticaly upload asciinema json file to the official website (related to honssh)
#!/bin/bash
DATE="$(date +%s)"
file=$3
minimumsize=5
actualsize=$(du -k "$file" | cut -f 1)
if [ $actualsize -ge $minimumsize ]; then
/usr/share/.configuration/honssh/utils/asciinema.py -t "$3" "$3" > asciinema-upload/asciinema-upload-"$DATE".json
/usr/bin/asciinema upload asciinema-upload/asciinema-upload-"$DATE".json || exit 1
rm asciinema-upload/asciinema-upload-"$DATE".json
else
@unixfox
unixfox / migrate-gitlab-omnibus-to-source.md
Created January 17, 2017 19:48
Migrate Gitlab omnibus to Gitlab source (archlinux)
cd /var/lib/gitlab/backups
wget http://url.com/1484678383_2017_01_17_gitlab_backup.tar
chown gitlab:gitlab 1484678383_2017_01_17_gitlab_backup.tar
systemctl stop gitlab.target
systemctl stop gitlab-sidekiq
systemctl stop gitlab-unicorn
systemctl stop gitlab-workhorse.service
sudo -u gitlab -H bash
cd /usr/share/webapps/gitlab
@unixfox
unixfox / downloadmultiple.bash
Created October 31, 2017 22:03
Download a file using the current connection and a proxy at the same time
#!/bin/bash
# Variables
regex='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]'
percentDownloadedFromSecondProxy=35
filename=$(basename "$1")
filesize=$(curl -sI $1 | tr -d '\r' | sed -En 's/^Content-Length: (.*)/\1/p')
onepart=$(echo $[ $filesize * 35 /100 ])
secondpart=$(echo $[ $onepart + 1 ])
proxyurl="socks5://192.168.100.89:1080"