Skip to content

Instantly share code, notes, and snippets.

View stelcheck's full-sized avatar

Marc Trudel stelcheck

View GitHub Profile
@stelcheck
stelcheck / hbase.rest.scanner.filters.md
Created October 30, 2012 10:00
HBase Stargate REST API Scanner Filter Examples

Stargate Scanner Filter Examples

Introduction

So yeah... no documentation for the HBase REST API in regards to what should a filter look like...

So I installed Eclipse, got the library, and took some time to find some of the (seemingly) most useful filters you could use. I'm very green at anything regarding HBase, and I hope this will help anyone trying to get started with it.

What I discovered is that basically, attributes of the filter object follow the same naming than in the documentation. For this reason, I have made the link clickable and direct them to the HBase Class documentation attached to it; check for the instantiation argument names, and you will have your attribute list (more or less).

@stelcheck
stelcheck / 01-runner.js
Last active April 18, 2021 03:54
REPL example for electron
'use strict'
const net = require('net')
const chalk = require('chalk')
const path = require('path')
const cp = require('child_process')
const rimraf = require('rimraf')
function getPath() {
@stelcheck
stelcheck / render.js
Last active May 8, 2018 01:38
Sample code, redux
const framesPerSecond = 30;
const frameTimer = 1000 / framesPerSecond;
const now = () => Date.now();
let timer = null;
function render(previousDelta) {
const start = now();
move(previousDelta);
# rubocop:disable Style/CaseEquality
# rubocop:disable Style/MultilineTernaryOperator
# rubocop:disable Style/NestedTernaryOperator
module Fastlane
module Actions
class MattermostAction < Action
def self.is_supported?(platform)
true
end
@stelcheck
stelcheck / test-index.js
Created September 1, 2017 04:46
MAGE 1.3: Dynamic configuration
// Pre-load your MAGE app's configuration
const config = require('mage/lib/config');
// Disable MMRP and service discovery during tests
config.set('server.serviceDiscovery', false)
config.set('server.mmrp', false)
// Load your MAGE app
const game = require('../lib');
@stelcheck
stelcheck / package.json
Created September 1, 2017 04:34
MAGE 1.3: convert "-" to ":"
{
"scripts": {
"show:config": "echo 'Show the compiled MAGE configuration' && mage show:config",
"archivist:create": "echo 'Create archivist vaults' && mage archivist:create",
"archivist:migrate": "echo 'Migrate archivist vaults' && mage archivist:migrate",
"archivist:drop": "echo 'Drop the archivist vaults' && mage archivist:drop"
}
}
@stelcheck
stelcheck / index.js
Last active June 15, 2017 06:03
net: EADDRINUSE is an uncatchable error
const net = require('net')
try {
net.createServer((args) => console.log(...args)).listen('hello', (error) => console.error('listen error', error))
} catch (error) {
console.error('Uncaught listen error', error)
}
@stelcheck
stelcheck / test-listen.sh
Last active June 14, 2017 04:18
Socket files in Node.js
#!/usr/bin/env bash
function printResult() {
echo ""
echo "=============================="
[[ ${1} == 0 ]] && echo "success" || echo "failed"
echo "=============================="
}
# With this path, the file will be truncated to 'file.s'
#!/usr/bin/env bash
function printResult() {
echo ""
echo "=============================="
[[ ${1} == 0 ]] && echo "success" || echo "failed"
echo "=============================="
}
@stelcheck
stelcheck / GameState.ts
Created June 8, 2017 19:56
mage-parser: networked objects (concept)
// module:
// createGame: create a game instance
// findGames: find all game instances across all game servers
// user commands:
// join: adds actor id to list, returns global game state
// quit: removes actor id
// makeMove: send data
import * as mage from 'mage'
import { networked, rpc, stream } from 'mage-parser'