Skip to content

Instantly share code, notes, and snippets.

View mentos1386's full-sized avatar
🚀
0110100001100101011011000110110001101111

Tine Jozelj mentos1386

🚀
0110100001100101011011000110110001101111
View GitHub Profile
@mentos1386
mentos1386 / EVE Online all regions
Created March 24, 2016 15:57
EVE Online regions names and ids used for CRESR
array (size=100)
0 =>
array (size=2)
'id' => int 11000001
'name' => string 'A-R00001' (length=8)
1 =>
array (size=2)
'id' => int 11000002
'name' => string 'A-R00002' (length=8)
2 =>
@mentos1386
mentos1386 / Async Demo
Last active March 24, 2016 23:15
Demo presentation of new Async
use OpenCrest\OpenCrest;
// --------------
// NEW Async mode
// We will monitor time
$asyncStart = microtime(true);
// Make use of new Async
OpenCrest::$async = True;
@mentos1386
mentos1386 / eve-crest-swagger.yaml
Created September 3, 2016 10:18
Swagger CREST documentation
swagger: '2.0'
info:
title: EVE Online Crest
description: Documentation for EVE Online third-party developers.
version: "0.0.1"
# the domain of the service
host: crest-tq.eveonline.com
securityDefinitions:
@mentos1386
mentos1386 / openvpnClientCreator.sh
Last active January 17, 2017 20:22
Script that is runed by Nginx, it generates certificates and creates .ovpn config file.
#!/bin/bash
# Generate random client name
clientName=$(/bin/cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 12 | head -n 1)
# Build client key
cd /etc/openvpn/easy-rsa/
source vars
/etc/openvpn/easy-rsa/pkitool $clientName
@mentos1386
mentos1386 / bumblebee-nvidia-arch.sh
Created March 5, 2017 13:38
Arch bumblebee nvidia
sudo pacman -S bumblebee nvidia primus mesa lib32-virtualgl lib32-nvidia-utils lib32-primus opencl-nvidia lib32-opencl-nvidia
@mentos1386
mentos1386 / Webstorm-Airbnb-Javascript-codeStyle.xml
Created March 12, 2017 11:03
Airbnb inspired Webstorm Javascript CodeStyle
<code_scheme name="Airbnb">
<option name="RIGHT_MARGIN" value="100" />
<option name="HTML_ATTRIBUTE_WRAP" value="4" />
<option name="HTML_ELEMENTS_TO_INSERT_NEW_LINE_BEFORE" value="" />
<option name="HTML_ENFORCE_QUOTES" value="true" />
<DBN-PSQL>
<case-options enabled="false">
<option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
@mentos1386
mentos1386 / Useful linux cli commands-programs.md
Created March 23, 2017 18:18
Useful linux cli commands/programs

Hardware Detection

dmidecode

Finding Out Hardware Details Without Opening The Computer Case > dmidecode is a tool for dumping a computer's DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description of the system's hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. Thanks to this table, you can retrieve this information without having to probe for the actual hardware.

@mentos1386
mentos1386 / yt-playlist-downloader.sh
Created October 15, 2017 21:38
Download Youtube playlist
#!/bin/bash
# Prameters
PLAYLIST_ID=$1;
TYPE=$2;
# Constants
FOLDER="$HOME/Youtube";
PROGRAM_DATA="$(pwd)/yt-playlist-downloader"
@mentos1386
mentos1386 / index.html
Created November 25, 2017 17:49
SocketIO Debugger
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.4/socket.io.js"></script>
<script>
$(function(){
var iosocket = io.connect('http://localhost:4010');
var room = 'message';
var log = $('#log');
@Controller()
export class SomeController {
constructor(
@Inject('someValue') private someValue: string, // Inject
) {
}