This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ffi = require('ffi'), | |
ref = require('ref'); | |
//ArrayType = require('ref-array'); | |
//var StringArray = ArrayType('string'); | |
var dll = ffi.Library('judit1.dll', { | |
//'main': [ 'int', [ 'int', StringArray ] ], | |
'calculator': [ 'float' , [ ref.refType(ref.types.char), 'bool', | |
'long', 'long', 'long', 'long', 'double', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal ENABLEDELAYEDEXPANSION | |
set dir=%cd:\=/% | |
set dir=%dir::=% | |
sh -login -c "cd /%dir% && sort -t $'\t' -k 17 -g tajkep_.txt -o tajkep_sorted.txt" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// g++ -O3 -pie -shared t1.cpp -o t1.dll | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdio.h> | |
extern "C" { | |
__declspec(dllexport) | |
void callme(char ***out, char *out2) { | |
char s[2][3][6] = {{"one", "two", "three"}, {"four", "five", "six"}}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# System-wide crontab file and cron job directory. Change these for your system. | |
CRONTAB='/etc/crontab' | |
CRONDIR='/etc/cron.d' | |
# Single tab character. Annoyingly necessary. | |
tab=$(echo -en "\t") | |
# Given a stream of crontab lines, exclude non-cron job lines, replace |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias b='unset HISTFILE' | |
alias c='sudo apt-get autoremove && sudo apt-get autoclean' | |
alias i='sudo apt-get install' | |
alias u='sudo apt-get purge' | |
alias ..='cd ..' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Random Map</title> | |
</head> | |
<body> | |
<canvas id="map" style="border: solid 1px black;"></canvas> | |
<script> | |
var canvas = document.getElementById('map'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Extension project for: https://github.com/joshaven/string_score/ | |
// See: https://github.com/joshaven/string_score/issues/28 | |
/** | |
* Gives back an array of indexes of the unique closest matches, | |
* on a string array to a string. | |
* 'Hello World'.closest(['el', 'll', 'o', 'll']); //=> [ 0, 1 ] | |
*/ | |
String.prototype.closest = function(words, fuzziness, one2many) { | |
'use strict'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//NAND logic gate (and others) with only exponentiation. | |
/* | |
Exponentiation: 13 | |
0^0 1 | |
0^1 0 | |
1^0 1 | |
1^1 1 | |
NAND: 7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace ProgressViewer { | |
partial class Form1 { | |
/// <summary> | |
/// Required designer variable. | |
/// </summary> | |
private System.ComponentModel.IContainer components = null; | |
/// <summary> | |
/// Clean up any resources being used. | |
/// </summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ennek a fájlnak a letöltési linkje: | |
// https://gist.github.com/hdf/2a4f01f24c1f74bd48252ee297ed53b2 | |
// Felfedezendő terület vizuális paraméter generáló: https://gist.github.com/hdf/63f5f088d11039972778 | |
// Linux alatti építés és futtatás (ha nincs fönt g++: "sudo apt-get install g++"): | |
// g++ -O3 -fopenmp RKF7_4D_heterokl_Dll.cpp -o judit1 | |
// chmod +x ./judit1 | |
// ./judit1 -MMM 10 -t 1300 -o eredmeny.txt | |
// less ./eredmeny.txt | |
// (less -ből való kilépéshez nyomd meg a q billentyűt.) |