Skip to content

Instantly share code, notes, and snippets.

View rafalcieslak's full-sized avatar

Rafał Cieślak rafalcieslak

View GitHub Profile
@rafalcieslak
rafalcieslak / patch_camera.py
Last active March 22, 2020 15:54
ReVolt stiff distant hood camera
import re
import os
import glob
CAMDATA = """
;====================
; Custom Camera
;====================
CAMATTACHED {
@rafalcieslak
rafalcieslak / keybase.md
Created January 25, 2019 16:57
keybase.md

Keybase proof

I hereby claim:

  • I am rafalcieslak on github.
  • I am rafalcieslak (https://keybase.io/rafalcieslak) on keybase.
  • I have a public key ASBr_0gqY5OCZQecjJcKB2tMn2jRPNO-62QyKEOCQNg95go

To claim this, I am signing this object:

@rafalcieslak
rafalcieslak / cities.txt
Created June 9, 2018 21:33
Plaintext major city names. Data source: geonames.com, CC-BY 4.0
Aalst
Aalter
Aarschot
Abaetetuba
Abomey
Abomey-Calavi
Abovyan
Abreu e Lima
Abu Dhabi
Acaraú
@rafalcieslak
rafalcieslak / portable-zip-pathnames.ps1
Created October 8, 2017 13:44 — forked from lantrix/portable-zip-pathnames.ps1
PowerShell encoding Zip paths to use forward slash (Zip Spec) instead of backslash (Windows Style); for portable zip files - thanks to @sethjackson
# When using System.IO.Compression.ZipFile.CreateFromDirectory in PowerShell, it still uses backslashes in the zip paths
# despite this https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/mitigation-ziparchiveentry-fullname-path-separator
# Based upon post by Seth Jackson https://sethjackson.github.io/2016/12/17/path-separators/
#
# PowerShell 5 (WMF5) & 6
# Using class Keyword https://msdn.microsoft.com/powershell/reference/5.1/Microsoft.PowerShell.Core/about/about_Classes
#
@rafalcieslak
rafalcieslak / aws.py
Created August 3, 2017 21:02
AWS service names generator
#!/usr/bin/env python3
import random
A = ['elastic', 'elastic', 'elastic', 'elasti', 'reliable', 'managed', 'simple', 'virtual', 'amazon', 'redundant']
B = ['database', 'server', 'compute', 'storage', 'load', 'network', 'email', 'queue', 'notification', 'data']
C = ['service', 'service', 'service', 'storage', 'cloud', 'processing', 'adapter', 'balancing', 'system', 'pipeline', 'workflow']
a,b,c = random.choice(A),random.choice(B),random.choice(C)
a,b,c = (x.capitalize() for x in [a,b,c])
q = a[0] + b[0] + c[0]
@rafalcieslak
rafalcieslak / quine.cpp
Created May 11, 2017 14:33
C++ Quine 2
const char* code = R"(
#include <iostream>
int main() {
std::cout << "const char* code = R\"(" << code << ")\";" << code;
}
)";
#include <iostream>
int main() {
std::cout << "const char* code = R\"(" << code << ")\";" << code;
}
@rafalcieslak
rafalcieslak / quine.cpp
Last active July 15, 2018 02:55
C++ Quine
#include <iostream>
int main() {
std::string code1 = R"(
#include <iostream>
int main() {
)";
std::string code2 = R"(
std::cout << code1
<< " std::string code1 = R\"(" << code1 << ")\";\n"
typedef struct
{
float x;
float y;
} SDL_FPoint;
typedef struct
{
float x;
float y;