This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; init.el --- Sean Dewar's GNU Emacs 24.3+ configuration | |
;;; Commentary: | |
;; Sean Dewar's (seandewar @ github) init.el configuration. | |
;; | |
;; Feel free to use whatever you want from this configuration file. | |
;; Always a work in progress! | |
;;; Code: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::{io, option, vec, cmp}; | |
macro_rules! print_err { | |
($($arg:tt)*) => ( | |
{ | |
use std::io::Write; | |
writeln!(&mut ::std::io::stderr(), $($arg)*).ok(); | |
} | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2, json, datetime, operator | |
def sp_to_ha(sp): | |
return int(0.6 * sp) # effectively an int floor if +ve (which it should be) | |
def fetch_item_price(id): | |
response = urllib2.urlopen('http://api.rsbuddy.com/grandExchange?a=guidePrice&i=%d' % id) | |
return json.loads(response.read()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem Windows Batch file for converting supported video files to MP4 quickly | |
rem using ffmpeg (without re-encoding). Useful for converting OBS FLV to MP4 | |
rem | |
rem Recommended directory structure for OBS recordings: | |
rem | |
rem OBS Recordings | |
rem |-- unconverted | |
rem `-- (Configure OBS to save FLVs to this folder) | |
rem |-- converted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// max number of iterations to use for computing mandelbrot | |
const uint maxIterations = 20u; | |
// sampling level for regular grid multisample anti-aliasing; 1 disables. the | |
// number of samples used is the square of this number (e.g: 4u is MSAA 16x) | |
const uint msaaLevel = 2u; | |
vec3 mandelbrot(const vec2 c) | |
{ | |
vec2 z = vec2(0.); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This script temporarily hides the 'cursorline' (and cursor if 'tgc' is set) if the cursor | |
-- would be scrolled outside of the window viewport when using the mouse wheel. | |
-- | |
-- Written for @deagle.50:matrix.org for use with Neovide's smooth scrolling feature. :) | |
-- Tested using Neovim v0.8. | |
-- | |
-- TODO: if the window is split before restoring, the hidden 'cul' state will leak into the new | |
-- window. Can probably be fixed with some autocmd hackery. | |
local api, fn, keymap = vim.api, vim.fn, vim.keymap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Use Neovim as a scrollback pager for Kitty, allowing the | |
-- buffer to be manipulated as you wish. Configure as: | |
-- | |
-- scrollback_pager nvim +'source <path to this script>.lua' | |
local api = vim.api | |
local orig_buf = api.nvim_get_current_buf() | |
local term_buf = api.nvim_create_buf(false, true) | |
api.nvim_set_current_buf(term_buf) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local api = vim.api | |
local is_on = false | |
local emoji_width = api.nvim_strwidth "😂" | |
local ns = api.nvim_create_namespace "emojimode" | |
api.nvim_create_user_command("Emojimode", function() | |
is_on = not is_on | |
api.nvim_set_decoration_provider(ns, { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Quick 'n dirty Vim script for Neovim that removes all statuslines and creates | |
" a global statusline acting as a fake window separator. | |
" Also sets 'cmdheight' to 0. | |
hi! link StatusLine WinSeparator | |
hi! link StatusLineNC WinSeparator | |
func! Stl() abort | |
let hc = &ambw == 'single' ? '─' : '-' | |
let uc = &ambw == 'single' ? '┴' : '-' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local 🏷️ 🪐 = vim.api.nvim_create_namespace('depreCATE') | |
vim.deprecate = function(name, alternative, version, plugin, backtrace) | |
local lines = { | |
"", | |
"🚨 🐧📣 W A R N I N G ! ! ! ! 🚨", | |
"", | |
"", | |
"😱 " .. name .. " IS DEPRECATED!!!! 😱", | |
"", |