Skip to content

Instantly share code, notes, and snippets.

Pavel Sadikov naphthalene

Block or report user

Report or block naphthalene

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View some_file.txt
This software is provided without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

Keybase proof

I hereby claim:

  • I am naphthalene on github.
  • I am sigmat ( on keybase.
  • I have a public key whose fingerprint is 5774 C208 27EA 58D8 67BA 8AC1 EEB5 4425 64F7 63B1

To claim this, I am signing this object:

View madcatz
[Mad Catz Wired Xbox 360 Controller]
plugged = True
plugin = 2
mouse = False
AnalogDeadzone = "4096,4096"
AnalogPeak = "32768,32768"
DPad R = "hat(0 Right)"
DPad L = "hat(0 Left)"
DPad D = "hat(0 Down)"
naphthalene / jkpl.css
Created Jun 9, 2016 — forked from PercussiveRepair/jkpl.css
jenkins pipeline css
View jkpl.css
#build-pipeline-plugin-content {
background-color: none;
border-radius: 0;
#build-pipeline-plugin-content h1 {
display: none;
tbody.pipelineGroup {

SSH agent forwarding and screen

When connecting to a remote server via SSH it is often convenient to use SSH agent forwarding so that you don't need a separate keypair on that server for connecting to further servers.

This is enabled by adding the

ForwardAgent yes

option to any of your Host entries in ~/.ssh/config (or alternatively with the -A option). Don't set this option in a wildcard Host * section since any user on the remote server that can bypass file permissions can now als use keys loaded in your SSH agent. So only use this with hosts you trust.

naphthalene /
Created Mar 11, 2016
Random Walk Algorithm
from random import random
from math import floor
INITIAL_BUFFER = 5.0 # % border
# 0 -> wall
# 1 -> floor
set -f
esearch -db protein -query "ybfE" |\
efetch -format gpc -mode xml |\
xtract -insd complete CDS coded_by > query_results.txt
for i in $(cat query_results.txt);
do echo "$i" | awk '{match($0,"([A-Z0-9\\.]+)\\s+(complement\\()?([A-Z0-9\\.]+):([0-9]+)\\.\\.([0-9]+)(\\))?",a)}END{print a[1], a[3], a[4], a[5]}'
efetch -db protein "ybfE" -format gpc -mode xml | xtract -insd complete CDS coded_by | awk '{match($0,"([A-Z0-9\\.]+)\\t([A-Z0-9\\.]+):([0-9]+)\\.\\.([0-9]+)",a)}END{print a[1], a[2], a[3], a[4]}' | tee output.txt
View pavel_sadikov.gpg.armor
Version: GnuPG v1
View xboxrl.conf
# To use, run `sudo xboxdrv -c xboxrl.conf`
# I've customized some keyboard bindings in Rocket League to make this work better:
# Drive forwards: U
# Drive backwards: J
# Barrel Roll: LeftShift
# Jump: Space
# Boost: Enter
# Toggle Camera: q
You can’t perform that action at this time.