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.
View keybase.md

Keybase proof

I hereby claim:

  • I am naphthalene on github.
  • I am sigmat (https://keybase.io/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
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 {
View ssh-agent-forwarding-screen.md

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
naphthalene / random_walk.py
Created Mar 11, 2016
Random Walk Algorithm
View random_walk.py
from random import random
from math import floor
MAP_SIZE = 30
FLOOR_COVERAGE = 35.0 # %
INITIAL_BUFFER = 5.0 # % border
# 0 -> wall
# 1 -> floor
View ybfe.sh
#!/bin/bash
set -f
IFS=$'\n'
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]}'
done
View format_protein.sh
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
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQENBFR/o94BCADH6sNU/yxjfVJb7eHRyFg+++TOTCn9BLrwHmvdl9VBbD1WP7zy
wrf0DiWav9HIeP9PSMr0vswqgW072TDdH/UZ8cNkTu4d3Z8SCyVjhmRpNbiCoaD9
qqjkBJYIxNHM9X/K73PQgM09xAwiZ79TvFO6AXdW3wsAHF9XZvMM86PbLKZSSjoO
DkhmnqA/bwF39mgkJhIN234sdwp1NIppfWtXTlGmJ50VGVL+UgB8T0MR3xDhbOi+
HSRDGQQbEuAuuChiPU5xylqMS6kR0C9kqFAUeOfk7o8jmMTakRd7FXPaXrIHqznZ
J44eplfEbAnqBMN6V+ZLS5A9ynRbFildFg3fABEBAAG0LFBhdmVsIFNhZGlrb3Yg
KHRzaWdzdHkpIDxwYXNoYWxhYkBnbWFpbC5jb20+iQE+BBMBAgAoBQJUf6PeAhsD
View xboxrl.conf
# To use, run `sudo xboxdrv -c xboxrl.conf`
# NOTE:
# 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.