Skip to content

Instantly share code, notes, and snippets.

View NoTimeForHero's full-sized avatar

NoTimeForHero

View GitHub Profile
@NoTimeForHero
NoTimeForHero / queue.js
Created March 4, 2012 23:14
My simple Queue app with adder and executer
Queue = function(){
this.stopped = false;
this.array = [];
}
Queue.prototype = {
add: function(fn) { this.array.push(fn) },
pause: function() { this.stopped = true },
go: function() { this.stopped = false; this.exec(); },
exec: function() {
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
var xColor = "black";
$(document).ready(function() {
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
#!/bin/bash
DIR="/home/minecraft/mc-$1/"
SCR="mc-$1"
MAX_STOP=10
if [[ "$1" == "s1" ]] ; then
memory=12288
else
memory=8192
fi
#include "stdafx.h"
#include <iostream>
#include <stdlib.h>
#include <time.h>
struct DataType {
int value;
};
struct Vector {
@NoTimeForHero
NoTimeForHero / registry.cpp
Created December 6, 2014 02:15
BCC32 Registry Check
#include <iostream>
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#include <string.h>
#define MAX_KEY_LENGTH 255
#define MAX_VALUE_NAME 16383
bool isNeedMoreThenOne;
@NoTimeForHero
NoTimeForHero / gist:f50524c07f121f47e9fc
Created March 2, 2015 19:38
Get ID from Ammy Admin
#include <iostream>
#include <windows.h>
#include <string>
using namespace std;
BOOL CALLBACK FindAmmy(HWND hwnd, LPARAM lParam);
BOOL CALLBACK FindAmmyChilds(HWND hwnd, LPARAM lParam);
const char* getAmmyData();
const char* AMMY_WIN_NAME = "Ammyy Admin v3.5";
@NoTimeForHero
NoTimeForHero / pastebincom.py
Created July 13, 2015 19:00
Command line pastebin
#!/usr/bin/python
import sys, os
import urllib, urllib2
Highlights = {
'bash' : ['*.sh','*.bash'],
'php' : ['*.php'],
'python' : ['*.python'],
'rails' : ['*.rb'],
'ruby' : ['Gemfile'],
'python' : ['*.py'],
@NoTimeForHero
NoTimeForHero / DBFLib.cpp
Last active February 4, 2016 18:54
Ruby extension based on C++ xBase Library for DBF support
// Include the Ruby headers and goodies
//#include "ruby.h"
#include <xbase64/xbase64.h>
#include "ruby.h"
#include <iostream>
#include <sys/stat.h>
#include <map>
#include <string>
#include <vector>
#include <time.h>
// NetFrameworkChecker.cpp: определяет точку входа для консольного приложения.
//
#include "stdafx.h"
#include "NetFrameworkChecker.h"
wstringstream logger;
bool need_log = true;
bool debug = true;
@NoTimeForHero
NoTimeForHero / postgres.c
Created March 6, 2017 11:11
Harbour PostgreSQL LISTEN
HB_FUNC ( PQ_GET_NOTIFY ) // VAA 07.03.2017
{
const char *clisten = "LISTEN ";
PGconn * conn = hb_PGconn_par( 1 );
const char *source = hb_parcx( 2 );
HB_SIZE size = strlen(source);
char *channel;