Skip to content

Instantly share code, notes, and snippets.

View omicronns's full-sized avatar

Konrad Adasiewicz omicronns

  • Poland
View GitHub Profile
@omicronns
omicronns / trading_stats.json
Last active April 18, 2020 10:05
Trading data plot api
{
"plot": {
"timestamps": [1234564897, 1234564897],
"datasets": [
{
"label": "Quote funds",
"data": [0.123, 0.2],
"yAxisID": "y_quote"
},
{
rm -rf /etc/pacman.d/gnupg/
rm -rf /root/.gnupg/
gpg --refresh-keys
# sudo pacman-key --init && pacman-key --populate archlinux manjaro
# sudo pacman-key --init && pacman-key --populate archlinux antergos
sudo pacman-key --init && pacman-key --populate archlinux
sudo pacman-key --refresh-keys
@omicronns
omicronns / id-software-principles.md
Created March 8, 2019 18:22 — forked from guidoschmidt/id-software-principles.md
id Software Coding Principles

(1) No prototypes. Just make the game. polish as you go. Don't depend on polish happening later. Always maintain constantly shippable code.

(2) It is incredibly important that your game can always be run by your team. Bulletproof your engine by providing defaults upon load failure.

(3) Keep your code absolutely simple. Keep looking at your functions and figure out how you can simplify further.

(4) Great tools help make great games. Spend as much time on tools as possible.

(5) We are our own best testing team and should never allow anyone else to experience bugs or see the game crash. Don't waste others' time. Test thoroughly before checking in your code.

do like that : http://steamcommunity.com/app/321040/discussions/0/611702631213922506/?l=french
C:\Program Files (x86)\Steam\steamapps\common\DiRT 3 Complete Edition\actionmap
Copy te file "tm_lg_g27.xml" to "tm_lg_g920.xml"
edit tm_lg_g920.xml, with notepad, replace
<ActionMap priority="3" deviceName="Logitech G27 Racing Wheel USB" actionMapName="lg_g27">
with
<ActionMap priority="3" deviceName="Logitech G920 Driving Force Racing Wheel USB" actionMapName="lg_g920">
#include <utility>
#include <array>
using std::array, std::size_t, std::index_sequence, std::make_index_sequence;
template<typename T, size_t N, size_t... I>
constexpr array<T, N + 1> append_impl(array<T, N> prev, T const &val, index_sequence<I...>)
{
return { prev[I]..., val };
}
@omicronns
omicronns / pkgm
Last active February 22, 2019 23:39
#!/bin/env python3
import imp
import sys
import click
import colorama
import requests
PKGM_VERSION = "1"
// ==UserScript==
// @name ogame_queue
// @author omicronns
// @namespace omicronns_at_gmail.com
// @description OGame helper script
// @version 0.1
// @include https://*.ogame.gameforge.com/game/*
// ==/UserScript==
import requests
import re
import sys
def askshutter(id):
resp = requests.get("https://www.shutterstock.com/search?search_source=base_landing_page&language=en&searchterm={}&image_type=all".format(id))
try:
author = re.search(r"\"author\":{\"@type\":\".*?\",\"name\":\"(.*?)\"}", resp.text).group(1)
except AttributeError:
return None
@omicronns
omicronns / http_server.rs
Created July 18, 2018 19:32 — forked from mjohnsullivan/http_server.rs
Simple HTTP server example for Rust
// Updated example from http://rosettacode.org/wiki/Hello_world/Web_server#Rust
// to work with Rust 1.0 beta
use std::net::{TcpStream, TcpListener};
use std::io::{Read, Write};
use std::thread;
fn handle_read(mut stream: &TcpStream) {
let mut buf = [0u8 ;4096];
extern crate clipboard;
use clipboard::{ClipboardProvider, ClipboardContext};
extern crate iban;
use iban::Iban;
extern crate regex;
fn main() {
let mut clip: ClipboardContext = ClipboardProvider::new().unwrap();
loop {