Skip to content

Instantly share code, notes, and snippets.

View Vaflan's full-sized avatar
🏊‍♂️
fy_pool_day

Ruslans Jermakovics Vaflan

🏊‍♂️
fy_pool_day
View GitHub Profile
class CharacterClass
{
private static $characterClasses = [
["code" => 0, "name" => ["full" => "Dark Wizard", "short" => "DW", "group" => "dw"], "itemClass" => "DarkWizard", "classNumber" => 1],
["code" => 1, "name" => ["full" => "Soul Master", "short" => "SM", "group" => "dw"], "itemClass" => "DarkWizard", "classNumber" => 2],
["code" => 3, "name" => ["full" => "Grand Master", "short" => "GM", "group" => "dw"], "itemClass" => "DarkWizard", "classNumber" => 3],
["code" => 7, "name" => ["full" => "Soul Wizard", "short" => "SW", "group" => "dw"], "itemClass" => "DarkWizard", "classNumber" => 4],
["code" => 16, "name" => ["full" => "Dark Knight", "short" => "DK", "group" => "dk"], "itemClass" => "DarkKnight", "classNumber" => 1],
["code" => 17, "name" => ["full" => "Blade Knight", "short" => "BK", "group" => "dk"], "itemClass" => "DarkKnight", "classNumber" => 2],
@alphamu
alphamu / Android Privacy Policy Template
Created February 9, 2017 03:17
A template for creating your own privacy policy for Android apps. Look for "[" and "<!--" to see where you need to edit this app in order to create your own privacy olicy.
<html>
<body>
<h2>Privacy Policy</h2>
<p>[Individual or Company Name] built the [App Name] app as a [open source | free | freemium | ad-supported | commercial] app. This SERVICE is provided by [Individual or company name] [at no cost] and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding [my|our] policies with the collection, use, and
disclosure of Personal Information if anyone decided to use [my|our] Service.</p>
<p>If you choose to use [my|our] Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that [I|we] collect are used for providing and
improving the Service. [I|We] will not use or share your information with anyone except as described
@dschep
dschep / raspbian-python3.6.rst
Last active November 21, 2024 15:10 — forked from BMeu/raspbian-python3.5.rst
Installing Python 3.6 on Raspbian

Installing Python 3.6 on Raspbian

As of January 2018, Raspbian does not yet include the latest Python release, Python 3.6. This means we will have to build it ourselves, and here is how to do it. There is also an ansible role attached that automates it all for you.

  1. Install the required build-tools (some might already be installed on your system).
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active August 16, 2024 13:39
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
anonymous
anonymous / bench.php
Created March 6, 2014 14:37
PHP benchmark
<?
function simple() {
$a = 0;
for ($i = 0; $i < 1000000; $i++)
$a++;
$thisisanotherlongname = 0;
for ($thisisalongname = 0; $thisisalongname < 1000000; $thisisalongname++)
$thisisanotherlongname++;
}
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 10, 2025 09:21
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@reu
reu / pub-sub.js
Created April 9, 2013 01:51
node.js redis pub-sub example
var redis = require("redis")
, subscriber = redis.createClient()
, publisher = redis.createClient();
subscriber.on("message", function(channel, message) {
console.log("Message '" + message + "' on channel '" + channel + "' arrived!")
});
subscriber.subscribe("test");