Skip to content

Instantly share code, notes, and snippets.

View SkyzohKey's full-sized avatar

SkyzohKey SkyzohKey

View GitHub Profile
@SkyzohKey
SkyzohKey / main.rs
Last active August 29, 2015 14:23
HF Bot - DON'T SUICIDE WHEN READING THIS PIECE OF BULLSHIT PLZZZZ !
#![allow(unused_variables)]
extern crate rstox;
use rstox::core::*;
use std::path::Path;
use std::fs::File;
use std::io::prelude::*;
// Static options.
static BOOTSTRAP_IP: &'static str = "195.154.119.113";
fn init_tox() -> Tox
{
// load Tox Profile
let mut xp: Vec<u8> = Vec::new();
let mut tox = match Tox::new(ToxOptions::new(), match File::open(Path::new(HFB_PROFILE))
{
Ok(mut data) =>
{
data.read_to_end(&mut xp).ok().expect("[ERROR] Impossible de lire le profil.");
@SkyzohKey
SkyzohKey / README.md
Last active March 24, 2016 00:36
PandaLogger - A simple PandaJS plugin that brings basic logger features into the game scope.

PandaLogger

PandaLogger is a plugin for Panda.js that brings basic logger features into the game scope. To learn more about this plugin, read the following samples.

Installation

In order to install PandaLogger, simply copy this file into your <project_root>/src/plugins folder. That's all ! You'll then have to require it whenever you want to use it in your code. (see samples)

Mini-doc

LogType's allowed with PandaLogger

/**
* COPYRIGHT (c) 2016 SkyzohKey & Benwaffle
*
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
@SkyzohKey
SkyzohKey / accel.vala
Last active June 14, 2016 04:08
This sample code permits to make application-wide keyboard shortcuts using AccelGroup and Action Signals in Vala.
[Signal (action = true)]
private signal void change_chat_up ();
[Signal (action = true)]
private signal void change_chat_down ();
public MainWindow () {
this.init_keyboard_shortcuts ();
}
private void init_keyboard_shortcuts () {
/**
* valac -o bandcamp-downloader --pkg libsoup-2.4 --pkg json-glib-1.0 --pkg posix main.vala
* ./bandcamp-downloader --band=bash38 --album=summer-time -o ~/Music/bash-summer-time
**/
private static string band_name = null;
private static string album_name = null;
private static string save_path = null;
private const GLib.OptionEntry[] options = {
@SkyzohKey
SkyzohKey / PKGBUILD
Created May 10, 2016 15:15
Ricin new pkgbuild with waf
# Maintainer: Yuexuan Gu <lastavengers@outlook.com>
pkgname=ricin-git
_pkgname=Ricin
_submodule=tox-vapi
pkgver=0.652.786de97
pkgrel=1
pkgdesc="A dead-simple but powerful Tox client."
url="https://github.com/RicinApp/Ricin"
arch=('i686' 'x86_64')
@SkyzohKey
SkyzohKey / rename.sh
Created June 10, 2016 08:23
Rename a git branch locally and remotly (don't do this for branch that have pull-request or that are worked on by multiple peoples)
git branch -m old-branch new-branch # Delete and recreate with the new name.
git push origin :old-branch # Delete the branch on origin remote.
git push origin new-branch # Push the renamed branch on origin remote.
@SkyzohKey
SkyzohKey / jfreegman-is-a-kid.log
Last active June 22, 2016 16:38
Here is the reason of why i decided to stop working on Tox related softwares, cuz some members are toxics for the project. Especially Jfreegman who is a fucking cancer.
<SkyzohKey> >toxcore is dead, it hasn't had any serious changes in the past two years
<SkyzohKey> +
<SkyzohKey> +1*
<Jfreegman> SkyzohKey: you haven't even been around for 2 years broseph
<SkyzohKey> lel
<Jfreegman> tox got a brand new API a little over a year ago
<Jfreegman> followed by a new AV API
<SkyzohKey> I was here, not on irc ofc, but i was already using tox
<SkyzohKey> and the nex av api was crap
<SkyzohKey> new*
@SkyzohKey
SkyzohKey / gtk+3-reset.css
Created July 5, 2016 10:18
@import this colorsheet to get the default values for every property on a Gtk+3 Widget.
/* @import this colorsheet to get the default values for every property.
* This is useful when writing special CSS tests that should not be
* inluenced by themes - not even the default ones.
* Keep in mind that the output will be very ugly and not look like
* anything GTK.
* Also, when adding new style properties, please add them here.
*/
* {
color: inherit;