View uru_pathmunge.go
package main | |
import ( | |
"errors" | |
"fmt" | |
"os" | |
"runtime" | |
"strings" | |
) |
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 |
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 |
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 |
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 |
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 |
View uru_dirwalkup.go
package main | |
import ( | |
"fmt" | |
"os" | |
"path/filepath" | |
"runtime" | |
"strings" | |
) |
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 |
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: |
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 |
NewerOlder