Skip to content

Instantly share code, notes, and snippets.

export class Stage extends Entity implements ISystem {
public progressbar;
public progressbar_tick = 0;
public progressbar_maxtick = 330;
public bigword:UIText ;
public bigword_tick = 0;
public smallword:UIText;
Verify Github on Galaxy. gid:pgMpm5e8aCiutkw4qsnxcX
### Keybase proof
I hereby claim:
* I am tensaix2j on github.
* I am tensaix2j (https://keybase.io/tensaix2j) on keybase.
* I have a public key ASAiL2XkwWr9tJbtNuDzAb-A4YeqvZ2eLCV5tbmyo_djgAo
To claim this, I am signing this object:
@tensaix2j
tensaix2j / get_shm.cpp
Last active December 18, 2018 09:11
How to read/write from/to shared memory
#include <stdio.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#define SHKEY 0x11213007
int main() {
int shm_id = shmget( SHKEY , 32, 0666 );
if ( shm_id != -1 ) {
@tensaix2j
tensaix2j / gist:1a87f105f398558dac278f05703ee848
Created October 16, 2017 02:18
How to printf with color on terminal
#include <stdio.h>
#define KGRN "\033[0;32;32m"
#define KCYN "\033[0;36m"
#define KRED "\033[0;32;31m"
#define KYEL "\033[1;33m"
#define KBLU "\033[0;32;34m"
#define KCYN_L "\033[1;36m"
#define KBRN "\033[0;33m"
#include <stdio.h>
#include <sys/select.h>
#include <sys/time.h>
#include <vector>
#include <error.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
require 'rubygems'
require 'socket'
$MAXSIZE = 4096
$config = {
"host" => "localhost",
"port" => "25",
"-to" => "recipient@gmail.com",
@tensaix2j
tensaix2j / boran
Last active October 6, 2015 05:03
def solution(a)
lpeak = []
sqrt_c = ( a.length ** 0.5 ).ceil
fcnt = [0] * ( sqrt_c + 1)
f_pt = 1
(1...a.length-1).each { |i|
if a[i-1] < a[i] && a[i] > a[i+1]
$*.map{|a|(i=a=~/0/)?(v=*?1..?9).fill{|j|v-=[a[j+i-k=i%9],a[
k+j*=9],a[j%26+i-i%3-i%27+k]]}+v.map{|k|$*.<<$`<<k<<$'}:p(a)}