Skip to content

Instantly share code, notes, and snippets.

View grmartin's full-sized avatar
🐧
9780198811701

Glenn R. Martin grmartin

🐧
9780198811701
View GitHub Profile
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Compile" ToolsVersion="4.0" VisualStudioVersion="12.0">
<PropertyGroup>
<Configuration>Debug</Configuration>
<Platform>AnyCPU</Platform>
<DefineSolutionProperties>false</DefineSolutionProperties>
<!-- General Paths -->
<RootPath>$(MSBuildProjectDirectory)</RootPath>
<SrcPath>$(RootPath)</SrcPath>
<Packages>$(SrcPath)\packages</Packages>
@grmartin
grmartin / get_dev_tools.sh
Created August 25, 2015 13:40
Go Dev Tools
#!/bin/sh
go get github.com/nsf/gocode
go get golang.org/x/tools/cmd/godoc
go get golang.org/x/tools/cmd/vet
go get golang.org/x/tools/cmd/goimports
go get golang.org/x/tools/cmd/gorename
go get golang.org/x/tools/cmd/oracle
go get golang.org/x/tools/cmd/gotype
go get github.com/golang/lint/golint
@grmartin
grmartin / build_enlight.sh
Last active March 27, 2016 23:54
E19 - Debian 8
#!/bin/bash
set -e
# Target directory
PREFIX="/usr/local"
# List of the needed packages
# To adapt to your needs
PROJECTS="efl emotion_generic_players evas_generic_loaders elementary enlightenment"
function Invoke-Batch {
param (
[Parameter(Mandatory=$True)]
[String] $BatName
)
$psi = New-object System.Diagnostics.ProcessStartInfo
$psi.CreateNoWindow = $true
$psi.UseShellExecute = $false
@grmartin
grmartin / keybase.md
Created April 19, 2017 14:50
Keybase GitHub Proof

Keybase proof

I hereby claim:

  • I am grmartin on github.
  • I am grmartin (https://keybase.io/grmartin) on keybase.
  • I have a public key ASCZ8rpwh50defaq1T5Szo_kZ8CMYR1H4w6macbPiMVIsQo

To claim this, I am signing this object:

@grmartin
grmartin / readme.md
Created April 17, 2018 00:27
Basic Rsync sync with Password Entry

Basic Rsync sync with Password Entry

Tested on MacOS against a Linux Mint Server with an rsyncd share.

Server Side

The Configuration for the (Linux server) Daemon once can be found in rsyncd.conf, and requires you create /etc/rsyncd.scrt containing the username and password pairs... The secrets file must not be world readable and only accessible by the daemon that runs rsync.

On Mint, You can start rsync via Systemd using:

@grmartin
grmartin / DontEverDoThis...ItsMonumentallyStupid.js
Created February 14, 2019 23:47
Evaling in Node... on a server...
const express = require('express');
const bodyParser = require('body-parser');
const vm = require('vm');
const app = express();
const port = 3000;
app.use(bodyParser.text({type: 'bloody-insane/javascript'}));
app.post('/unsafe', (req, res) => {
@grmartin
grmartin / First level directory to JSON.quokka.es6
Created February 27, 2019 03:54
Store Directory Data for Mocking
// For Node.js
import fs from 'fs';
import path from 'path';
import vm from 'vm';
const vm_eval = (x)=>{
return vm.runInNewContext(x);
};
const lambda = 'λ';
@grmartin
grmartin / 1-convert-trello.xsl
Last active April 22, 2019 13:06
Convert Trello JSON to Excel Document via XSLT
<?xml version="1.0" encoding="UTF-8"?>
<!-- The output of this XSLT is the MS Excel 2003-2004 XML File Format, simply open in Excel to utilize. -->
<!-- This script was built in Oxygen and was tested on Saxon PE 9.8 -->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:array="http://www.w3.org/2005/xpath-functions/array"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:local="urn:grmartin:locally-scoped-functions:01D92EAAG3HKHKARK5B3E0Z04Z"
@grmartin
grmartin / CMakeLists.txt
Created April 30, 2019 16:34
Setting Debugger Arguments for Subtarget of CMake project in Visual Studio 2019
cmake_minimum_required(VERSION 3.13)
project(CVPlay)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
find_package(OpenCV REQUIRED)
add_executable(CVPlay main.cpp)
add_executable(CVPlayAnnotator annotation/main.cpp)