Skip to content

Instantly share code, notes, and snippets.

View onliniak's full-sized avatar

Rafael Pszenny onliniak

View GitHub Profile
@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
@onliniak
onliniak / .cirrus.yml
Last active April 9, 2020 23:33
[FreeBSD] Build Crystal app with Cirrus CI
# https://cirrus-ci.com/task/4647371069980672
#
# Create static binary on FreeBSD
# Default FreeBSD's openssl = bug, build new version from source
#
# crystal + openssl + pkgconf = dependencies required to build.
# shards = package manager
# gmake = because I don't like standard Makefile
# Warning: When I try make std_spec compiler_spec on virtual machine with 2 threads of Ryzen5 1600 and 4gb ram, it killed my virtual machine.
#
@onliniak
onliniak / lista.md
Created April 7, 2020 13:01
Instalacja dowolnego programu w MyDevil.net

Ct8.pl to prawdopodobnie jedyny darmowy hosting z SSH. Można to wykorzystać do instalacji swojego oprogramowania, np compilatora Crystal.

Jeśli Twój program wymaga zbudowania ze źródeł, dodaj dodatkowy parametr --prefix np:

./configure --prefix=$HOME/katalog

Jeśli jednak wiesz, że paczka jest obecna w systemie ale nie masz roota to podaj: freebsd-version ← żeby odkryć jaką wersję FreeBSD mają zainstalowaną, u mnie było 11.3

@onliniak
onliniak / android.kt
Last active January 14, 2020 20:37
GET HTTP request in Kotlin Android
import java.net.URL
import java.lang.Thread as Thread1
Thread1 {
var a = URL("http://hmkcode-api.appspot.com/rest/api/hello/Android").readText()
runOnUiThread {
textView4.text = a
}
}.start()
@onliniak
onliniak / index.css
Last active December 10, 2019 23:22
Prepare for new calendar
.newEvent{
background-color:blue;
width:20px;
height:20px;
display:block;
position:absolute;
}
#hours{
background-color: rebeccapurple;
@onliniak
onliniak / index.js
Created December 6, 2019 19:43
JavaScript local date/time
new Date() //Date Fri Dec 06 2019 19:37:31 GMT+0000
new Date().toLocaleTimeString() //"19:36:29"
new Date().toLocaleDateString() //"6.12.2019"
new Date().toLocaleTimeString('en-US') //"7:39:12 PM"
new Date().toLocaleTimeString('en-US' ,{hour: '2-digit'}) //"7 PM"
@onliniak
onliniak / check.php
Last active December 6, 2019 19:49
Something like WP-nonce for AJAX authentication.
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/wp-config.php';
global $wpdb;
// Set timezone
date_default_timezone_set('Europe/Warsaw');
$select = file_get_contents('php://input');
$decode = json_decode($select, true);
@onliniak
onliniak / index.js
Created December 5, 2019 21:53
Javascript ES6 create new object
let gist = 'GitHub'
object = new Object();
object.ID = 1
object.name = 'me'
object.gist = gist
//{
// "ID": 1,
// "name": "me",