Skip to content

Instantly share code, notes, and snippets.

View mowen's full-sized avatar

Martin Owen mowen

View GitHub Profile
@mowen
mowen / autoexec.cfg
Last active March 31, 2018 13:15
CS:GO Autoexec
m_rawinput "1" // Raw Input on
m_customaccel "0" // Mouse Acceleration off
m_customaccel_exponent "0" // Acceleration Amount
m_mousespeed "0" // Windows mouse acceleration off
m_mouseaccel1 "0" // Windows mouse acceleration initial threshold (2x movement)
m_mouseaccel2 "0" // Windows mouse acceleration secondary threshold (4x movement)
sensitivity "2.2"
zoom_sensitivity_ratio_mouse "1.0"
cl_crosshaircolor "1"
@mowen
mowen / gist:5416352
Last active December 16, 2015 09:58
// ==UserScript==
// @name YouTube Prank
// @namespace http://patnoddle.com/
// @version 0.1
// @description Make changes to YouTube content.
// @match *://*youtube*/*
// @copyright 2013+, Pat Noddle
// @require http://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==
(defun org-pomodoro-refile (refile-heading)
"Move the heading at point to the heading specified."
(let ((match-found nil)
(paste-location (point)))
(save-excursion
(goto-char (point-min))
(if (re-search-forward refile-heading nil t)
(progn
(backward-char)
(setq match-found t
@mowen
mowen / index.html
Created September 3, 2011 22:14
Control a tank in HTML5 Canvas
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Chapter 4 Example 9: Animating an image with rotation</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.0.6/modernizr.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.1.7/underscore-min.js"></script>
<script src="ex9.js"></script>
</head>
<body>
(defvar mo-script-url-alist
'((jquery . "https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js")
(json2 . "http://cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js")
(ocanvas . "http://cdnjs.cloudflare.com/ajax/libs/ocanvas/1.0/ocanvas.min.js")
(processing . "http://cdnjs.cloudflare.com/ajax/libs/processing.js/1.2.1/processing-api.min.js")
(prototype . "https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js")
(sizzle . "http://cdnjs.cloudflare.com/ajax/libs/sizzle/1.4.4/sizzle.min.js")
(underscore . "http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.1.7/underscore-min.js")
(underscore-string . "http://cdnjs.cloudflare.com/ajax/libs/underscore.string/1.1.4/underscore.string.min.js")
(waypoints . "http://cdnjs.cloudflare.com/ajax/libs/waypoints/1.1/waypoints.min.js"))
// Method for converting a Json.NET object into a dynamic CLR object.
// http://groups.google.com/group/mongodb-csharp/browse_thread/thread/ef1308f38bdbde3e
public static class DynamicUtils
{
public static object ConvertJTokenToObject(JToken token)
{
if (token is JValue)
{
return ((JValue)token).Value;
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Experiments
{
public class BadService : IService
{
public string ProvideService()
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>jQuery Prototype</title>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.2.custom.css" rel="stylesheet" />
<script type="text/javascript" language="javascript" src="jquery-ui-1.8.2.custom/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" language="javascript" src="jquery-ui-1.8.2.custom/js/jquery-ui-1.8.2.custom.min.js"></script>
<script type="text/javascript" language="javascript" src="nassi-shneiderman.js"></script>
<style type="text/css">
.block { border: 1px solid #000; text-align: center; }
(ns martin)
(defn evenly-divisible?
"Is N evenly-divisible by all of the numbers in SEQ?"
[n seq]
(loop [s seq]
;; TODO: Find out how to do 'cond' in Clojure
(if (empty? s)
true
(if (not (zero? (mod n (first s))))