Skip to content

Instantly share code, notes, and snippets.

Jon jonforums

Block or report user

Report or block jonforums

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jonforums
jonforums / uru_pathmunge.go
Last active Dec 19, 2015
new uru PATH handling
View uru_pathmunge.go
package main
import (
"errors"
"fmt"
"os"
"runtime"
"strings"
)
@jonforums
jonforums / ubuntu-nginx-cgit
Last active May 31, 2019
ubuntu server, nginx, and cgit via fcgiwrap+spawn-fcgi
View ubuntu-nginx-cgit
# install nginx via your favorite method
...
# ensure primary nginx config file `/etc/nginx/nginx.conf` contains the following within
# the `http` block so that symlinked config from /etc/nginx/sites-available/* are included
include /etc/nginx/sites-enabled/*;
# install deps and build fcgiwrap
sudo aptitude install spawn-fcgi libfcgi-dev
curl -L -o fcgiwrap-1.1.0.tar.gz http://github.com/gnosek/fcgiwrap/archive/1.1.0.tar.gz
@jonforums
jonforums / chroot_sftp
Last active Aug 29, 2015
Chrooted SFTP users setup
View chroot_sftp
# New SFTP users are chrooted by OpenSSH in their homes rooted at /srv/sdrop.
# Home directories are owned by root and not writeable by any other user. To
# allow SFTP users to upload files, an `uploads` subdir owned by the SFTP user
# is created in each user's home dir. Ensure /usr/sbin/nologin is listed in
# /etc/shells
sudo addgroup sftp
sudo useradd -s /usr/sbin/nologin -d /srv/sdrop/xfer -G sftp -M xfer
sudo passwd xfer
@jonforums
jonforums / arch.txt
Last active Aug 29, 2015
Arch and Ubuntu Server client VM increased console size
View arch.txt
sudo vim /etc/default/grub
GRUB_GFXMODE=1024x768x24
sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo vim /etc/vconsole.conf
KEYMAP='us'
FONT='Lat15-TerminusBold24x12'
# ensure Lat15-TerminusBold24x12 is in /usr/share/kbd/consolefonts
@jonforums
jonforums / Rakefile
Created Jan 16, 2014
rake cmd line task name alchemy
View Rakefile
# Safe little monkey patch to Rake...until it isn't ;)
module Rake
class Application
def top_level_tasks=(tasks)
@top_level_tasks = tasks
end
end
end
puts 'Original top level tasks: %s' % Rake.application.top_level_tasks.inspect
@jonforums
jonforums / buildall.ps1
Last active Dec 21, 2015
Build Go from source using PowerShell
View buildall.ps1
# Author: Jon Maken, All Rights Reserved
# License: 3-clause BSD
# Revision: 2014-04-05 17:44:19 -0600
$toolkit = 'C:\Apps\DevTools\msys32\mingw64\bin'
$targets = 'windows:amd64:1', 'windows:386:0',
'linux:amd64:0', 'linux:386:0',
'darwin:amd64:0', 'darwin:386:0'
$orig_path = $env:PATH
@jonforums
jonforums / uru_dirwalkup.go
Last active Dec 17, 2015
toying with uru's .ruby-version searching impl
View uru_dirwalkup.go
package main
import (
"fmt"
"os"
"path/filepath"
"runtime"
"strings"
)
@jonforums
jonforums / cl-winsdk-results
Last active Dec 17, 2015
mingw.org, mingw-w64, and winsdk handling of NET_LUID struct
View cl-winsdk-results
C:\Users\Jon\Documents\CDev\sandbox>cl -W3 -Fenetluid.exe net_luid_test.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
net_luid_test.c
net_luid_test.c(22) : warning C4101: 'luid' : unreferenced local variable
Microsoft (R) Incremental Linker Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
/out:netluid.exe
@jonforums
jonforums / caca_de_jekyll.txt
Last active Dec 16, 2015
jekyll's wasting my time
View caca_de_jekyll.txt
I run a patched 0.11.2 jekyll environment (patched posix-spawn) on my local win7 box because of
breaking changes the devs made in the past that impact windows users. Hard to tell if they even
tested on windows boxes before pushing. Perhaps things are different with the recent commit activity.
And no time to confirm whether they're doing the right things for jekyll-on-windows users, or just
hoping all the recent commits for all the dependencies Just Work.
After a long hiatus, I just pushed a post (worked on my local 0.11.2 jekyll setup) about Go's
fantastic cross-build capabilities and was rewarded with this exciting email from GH:
@jonforums
jonforums / build_minised.ps1
Last active Dec 14, 2015
Automate building minised on Windows with mingw/mingw-w64
View build_minised.ps1
#requires -version 2.0
# Author: Jon Maken
# License: 3-clause BSD
# Revision: 2013-03-14 23:17:01 -0600
#
# TODO:
# - extract generics into a downloadable utils helper module
# - add proper try-catch-finally error handling
You can’t perform that action at this time.