Skip to content

Instantly share code, notes, and snippets.

View onliniak's full-sized avatar

Rafael Pszenny onliniak

View GitHub Profile
@onliniak
onliniak / regex.js
Created November 25, 2020 22:31
Repeated Regex
const str =
`A:
a: 1
c: 3
b: 9
f: 3
B:
a: 3
c: 5
s: 4`
@onliniak
onliniak / new.rb
Created November 11, 2020 15:51
Unecessary refactorization?
class Parser
def initialize
@templates = {}
@definitions = {}
prepare_templates
prepare_methods
delegate
end
@onliniak
onliniak / app.cr
Created October 4, 2020 15:02
Crystal router 2.0
require "./router.cr"
server = HTTP::Server.new(Router.new)
server.bind_tcp "127.0.0.1", 8080
server.listen
@onliniak
onliniak / bash
Created September 30, 2020 16:11
Curl DDOS
for x in {1..100000}; do time curl http://0.0.0.0:8080/ ; done ;
@onliniak
onliniak / greeting.ecr
Last active September 30, 2020 15:50
Simple Crystal router
Greeting, <%= @name %>!
@onliniak
onliniak / shell
Created September 25, 2020 16:27
CodeIgniter localhost to ngrok
php spark serve -host 0.0.0.0 -port 4000
ngrok http 0.0.0.0:4000
Inspired by Passenger Phusion Server
@onliniak
onliniak / index.md
Created September 13, 2020 14:54
Web-languages notes
Language Framework Linter Auto-reloader Server
Ruby Roda Rubocop ? Passenger
Python Sanic ? X ?
PHP Codeigniter PHP-CS-Fixer X
Crystal Kemalcr Ameba Sentry built-in
@onliniak
onliniak / index.cr
Created August 27, 2020 13:32
Parameters
POST
env.params.body["x"]
#"Note that by default (for most web servers) the body of POST requests does not end up in the HTTP logs.
#This is part security and part because POST bodies could be big binary data (e.g. someone uploading a file)."
Zegnat
GET
env.params.query["x"]
@onliniak
onliniak / electro.reg
Created June 6, 2020 13:36
Sims3 Register backup 64bit
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Electronic Arts]
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Electronic Arts\EA Core]
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Electronic Arts\EA Core\Installed Games]
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Electronic Arts\EA Core\Installed Games\sims3_dd]
"lang"="en_US"
@onliniak
onliniak / user.js
Last active May 23, 2020 22:22
Vallheru 1.6 | Ile jeszcze musimy zebrać surowców ?
// ==UserScript==
// @name Astralna Machina
// @namespace Violentmonkey Scripts
// @match http://ojci3c.webd.pl/magan/tribe*
// @exclude http://ojci3c.webd.pl/magan/tribes.php?view=my&step=quit
// @grant none
// @version 0.2.0
// @author Luunube
// @description Ten skrypt pomoże Ci zbudować własne narzędzia pomocne w budowie Astralnej Machiny. W tej chwili wskazuje ile jeszcze musicie zebrać surowców i ziół na stworzenie wszystkich konstrukcji i mikstur.
// @updateURL https://gist.githubusercontent.com/onliniak/95198d8a2bb6f41f6c08f8ded1f07f3e/raw/user.js