Skip to content

Instantly share code, notes, and snippets.

View nogweii's full-sized avatar
🍀

Nogweii nogweii

🍀
View GitHub Profile
@nogweii
nogweii / plugin.rb
Last active August 29, 2015 13:57
steam login plugin for discourse
# name: discourse-steam
# about: VALVE's Steam login support for Discourse
# version: 0.0.1
# authors: Colin Shea
auth_provider :title => 'with Steam',
:authenticator => Auth::OpenIdAuthenticator.new('steam','http://steamcommunity.com/openid', trusted: true),
:message => 'Authenticating with Steam (make sure pop up blockers are not enabled)',
:frame_width => 1000, # the frame size used for the pop up window, overrides default
:frame_height => 800
@nogweii
nogweii / hipchat_hooks.rb
Created March 6, 2014 00:26
A script to set up HipChat hooks on every repository in an organization
#!/usr/bin/ruby
# Script to set up HipChat on every repository in an Organization.
# Is idempotent -- doesn't make a hook if there already is a HipChat
# notification set up.
require 'octokit'
## Settings
# What organization should we set up?
@nogweii
nogweii / README.md
Last active November 10, 2017 00:55
Private cloud, a description

So, a private cloud.

What to include in said cloud?

Well, let's start with another cloud, [Sovereign][]:

  • IMAP over SSL via Dovecot, complete with full text search provided by Solr.
  • POP3 over SSL, also via Dovecot
  • SMTP over SSL via Postfix, including a nice set of DNSBLs to discard spam before it ever hits your filters.
@nogweii
nogweii / ddg_bangs.rb
Created May 23, 2014 23:17
get a list of all of duckduckgo's bangs in a programmatic manner, useful for scripting
require 'nokogiri'
require 'open-uri'
require 'json'
require 'yaml'
f = open('https://duckduckgo.com/bang.html', {"User-Agent" => 'Ruby script parsing the full list of bangs/1.0 ; http://evaryont.me'}).read
n = Nokogiri.parse(f)
class DDGBang < Struct.new(:category, :group, :bang, :aliases, :full_name)
def to_json(*)
@nogweii
nogweii / arizona_life.geojson
Created August 8, 2014 06:37
My life thus far in Arizona. Playing with mapbox tools, like http://geojson.io/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nogweii
nogweii / shellshock_test.sh
Last active August 29, 2015 14:07
Quickie test for shell shock.
#!/bin/bash
# A quick shell script that outputs "VULNERABLE!" if you are vulnerable, nothing
# otherwise. Meant to be used as part of an automated framework.
#
# Based on [bashcheck](https://github.com/hannob/bashcheck).
#
# These tests are *incomplete!* This is missing the tests for CVE-2014-6277 &
# CVE-2014-6278, as updated bashes aren't widely available yet, so they will
# always trigger.
@nogweii
nogweii / draft.md
Last active July 14, 2017 17:08
rough draft for why arch linux doesn't work with Gen2 HyperV machines

3 issues are present immediately when trying to install Archlinux in a Gen2 HyperV VM:

  1. Keyboard doesn't work. See http://www.gossamer-threads.com/lists/linux/kernel/1985855 for more details.
  2. The network doesn't work. See http://www.hurryupandwait.io/blog/running-an-ubuntu-guest-on-hyper-v-assigned-an-ip-via-dhcp-over-a-wifi-connection for more details.
  3. When you do try to do network operations, there are checksum errors. See http://forge.univention.org/bugzilla/show_bug.cgi?id=33160 for more details.

To solve the keyboard, you need to enable the SERIO_I8042 kernel module. Which won't autoload (when it's set to =M in Kconfig) as HyperV gen2 images don't virtualize any PS/2 devices. And due to a missing dependency, hyperv_keyboard.ko can't load without it. (https://bugs.archlinux.org/task/39820 for some more details.)

The network doesn't work at all, as the traffic isn't getting outside of the VM. This is the case with other Linux VMs, and isn't necessarily Arch's fault. Sharing the n

@nogweii
nogweii / play.rb
Last active September 21, 2015 20:46
mumble razzle hatbot play whole function
module Mumble
class Client
def conn
@conn
end
def config
@config
end
end
end
@nogweii
nogweii / index.md
Created September 30, 2015 00:12
configuring Cyrclebot

Configuration

All configuration is done in the config.json file.

{
  "key": "mumble.key",
  "cert": "mumble.cert",
  "serverAddress": "mumble://example.com:64738",
 "youtubeKey": "SERVER_API_KEY_GOES_HERE",
> [email protected] gulp /home/colin/code/CodeParrot
> gulp "javascript_dev"
[16:58:38] Using gulpfile ~/code/CodeParrot/Gulpfile.js
[16:58:38] Starting 'javascript_dev'...
{ [Error: Cannot find module './cryptoRand' from '/home/colin/code/CodeParrot/node_modules/adjective-adjective-animal/dist']
stream:
Labeled {
_readableState: