Skip to content

Instantly share code, notes, and snippets.

View geneotech's full-sized avatar

Patryk Czachurski geneotech

View GitHub Profile
@AndrewRadev
AndrewRadev / qf.vim
Created December 2, 2011 20:14
Delete lines from the quickfix window (with undo)
" Place in ftplugin/qf.vim
xnoremap <buffer> d :DeleteLines<cr>
nnoremap <buffer> dd :DeleteLines<cr>
nnoremap <buffer> u :UndoDelete<cr>
if !exists(':DeleteLines')
let b:deletion_stack = []
" Delete by a pattern (with undo placing them all on top):
@take-cheeze
take-cheeze / libsndfile_test.cxx
Created December 7, 2012 13:09
libsndfile and OpenAL test
/*
TO compile:
ccache g++ -Wall -Wextra -pipe -lsndfile -lopenal -lboost_chrono -lboost_system -lboost_thread libsndfile_test.cxx
TO run:
./a.out $AUDIO_FILE
*/
#include <sndfile.h>
@bkuri
bkuri / __init__.py
Created October 13, 2013 19:59
My kivy gauge widget
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
__all__ = ('Gauge',)
__title__ = 'bkuri.gauge'
__version__ = '0.1'
__author__ = 'gauge@bkuri.com'
import kivy
kivy.require('1.7.1')
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <X11/Xlib.h>
#include <X11/Xlib-xcb.h>
#include <xcb/xcb.h>
@irbull
irbull / OpenSSLExample.cpp
Created August 11, 2016 18:32
Code signing and verification with OpenSSL
#include <iostream>
#include <openssl/aes.h>
#include <openssl/evp.h>
#include <openssl/rsa.h>
#include <openssl/pem.h>
#include <openssl/ssl.h>
#include <openssl/bio.h>
#include <openssl/err.h>
#include <assert.h>
@Zorono
Zorono / README.md
Created March 2, 2021 20:44
Associating an in-game playerid with a Discord account

Associating an in-game player with a Discord account

Why

  • Want to have a Discord user be able to enter commands to a bot and have actions impact their account in-game or not.
  • Want an in-game user to be able to enter commands and have a bot "carry those over" to Discord
  • Want to have the bot be able to access players' information

Examples:

  1. Discord user enters /mystats and bot replies with info about their money, score, etc, and whether they're currently connected or not.
  2. Player "John12" enters command '!dsay hello discord' and bot sends that message on a discord channel