Skip to content

Instantly share code, notes, and snippets.

Pavel Peganov D-side

Block or report user

Report or block D-side

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
@D-side
D-side / build_translations.js
Created Feb 3, 2019
Subnautica translation builder (for the browser console; sample values set for Russian)
View build_translations.js
// You need to be logged in on translate.unknownworlds.com in order to use this script
// "https://translate.unknownworlds.com/api/base-strings?project_id=9"
// "https://translate.unknownworlds.com/api/strings?project_id=9&language_id=5"
let filename = "Russian.json";
let project_id = 9;
let language_id = 5;
responses = Promise.all([
fetch(`/api/base-strings?project_id=${project_id}`).then(r => r.json()),
View keybase.md

Keybase proof

I hereby claim:

  • I am d-side on github.
  • I am d_side (https://keybase.io/d_side) on keybase.
  • I have a public key ASD3_KTP6fQOBLEiJYBa6l_nt9HCC5YYCWtaD3z1lhOHOgo

To claim this, I am signing this object:

View a.yml
Reference:
$ref: "#/RefObject"
OneOfReference:
oneOf:
- $ref: "#/RefObject"
RefObject:
title: "RefObject A"
type: integer
enum: 42
example: 42
@D-side
D-side / 100s
Created Dec 4, 2015
A list of words that sum to a hundred from 1-indexed positions of their letters
View 100s
abactinally
abatements
abettors
abrogative
absconders
absorbancy
abusions
accelerandos
acceptors
acclimation
View httpr.rb
#!/usr/bin/env ruby
# A dirty utility that exposes a folder from a VM over HTTP
# Useful for exposing generated docs or reports to the outside world.
# Developed on Linux. Provided as-is with no guarantees, blah-blah.
# DO NOT USE THIS without prior testing!
# DO NOT USE THIS for exposing the folder to the public!
# Pretty similar to serve utility from the corresponding gem, but always picks a free port.
# TODO: make it more autonomous and/or modular. Ideas:
# Make a port finder a separate utility? Find existing ones? Maybe accept a port from stdin?
@D-side
D-side / dsu.rb
Created Jul 9, 2014
Primitive Ruby Disjoint-Set
View dsu.rb
class DSU
def initialize(x)
@array = Array.new(x) {|i| i }
end
def find(x)
return x if @array[x] == x
@array[x] = find(@array[x])
end
View _syntax.sass
// Jekyll Pygments syntax highlighter styles
// Color scheme
$base03: #002B36
$base02: #073642
$base01: #586E75
$base00: #657B83
$base0: #839496
$base1: #93A1A1
$base2: #EEE8D5
You can’t perform that action at this time.