Skip to content

Instantly share code, notes, and snippets.

View mrxinu's full-sized avatar

Steve Klassen mrxinu

View GitHub Profile
@amcgregor
amcgregor / irc.py
Created June 17, 2010 10:57
An extensible IRC bot, including logging to MongoDB.
#!/usr/bin/env python
# encoding: utf-8
"""An implementation of a very simple IRC bot using the Protocol wrappers. This is the main script.
Requires: pymongo
"""
import logging
import re
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 21, 2024 01:45
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jasontucker
jasontucker / updateip.php
Created October 26, 2012 19:32
Update single ip address from dyndns into the allowed IP address of InfiniteWP
<?php
// Install this file in the infiniteWP folder, name it something
// obscure then have cron run ever 3 mins to update the db to the latest IP.
// Add the following to cron, this will update the ip address every 3 minutes.
//
// */3 * * * * /usr/local/bin/php /home/username/infinitewp/updateip.php
// What is your dyndns hostname?
@Sharpie
Sharpie / Vagrantfile
Last active September 22, 2022 01:16
A simple Vagrantfile for spinning up a master-agent pair.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This configuration requires Vagrant 1.5 or newer and two plugins:
#
# vagrant plugin install vagrant-hosts ~> 2.1.4
# vagrant plugin install vagrant-auto_network ~> 1.0.0
#
# After installation, the following steps will spin up a master and agent that
# can communicate with each other:
@pascalpoitras
pascalpoitras / config.md
Last active June 6, 2024 13:09
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


Replace yourdomain with your service now URL. User must have the rest_service role.

@avafloww
avafloww / PhpJava.java
Last active June 13, 2024 07:36
This snippet of code is syntactically valid in both PHP and Java, and produces the same output in both.
/*<?php
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s",
//\u000A\u002F\u002A
class PhpJava {
static function main() {
echo(//\u000A\u002A\u002F
"Hello World!");
}}
//\u000A\u002F\u002A
PhpJava::main();
@seanmhanson
seanmhanson / ableismSanityCheck.md
Created April 3, 2017 16:17
Ableist Language in Code: Sanity Check

Ableist Language in Code: Sanity Check

Removing ableist language in code is important; it helps to create and maintain an environment that welcomes all developers of all backgrounds, while emphasizing that we as developers select the most articulate, precise, descriptive language we can rather than relying on metaphors. Quite simply, avoiding ableist language lets us make sure we are inclusive of all developers, while moving toward language that is simultaneously more acccessible to developers whose first language might not be our own.

The phrase sanity check is ableist, and unnecessarily references mental health in our code bases. It denotes that people with mental illnesses are inferior, wrong, or incorrect, and the phrase sanity continues to be used by employers and other individuals to discriminate against these people.

There are a ton of alternatives, and one of the best ways to select one is to ask yourself: What am I actually checking? and select something more descriptive. In everyday c

@jessfraz
jessfraz / boxstarter.ps1
Last active April 11, 2024 16:02
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@mattifestation
mattifestation / GetSecureBootPolicy.ps1
Last active June 21, 2021 13:37
Partially-completed Secure Boot policy parser. I need help with parsing our the BCD element values.
function Get-SecureBootPolicy {
<#
.SYNOPSIS
Parses a Secure Boot policy.
.DESCRIPTION
Get-SecureBootPolicy parses either the default, system Secure Boot policy or a policy passed as a byte array. The byte array must be a raw, unsigned policy.