Skip to content

Instantly share code, notes, and snippets.

View jimnanney's full-sized avatar

Jim Nanney jimnanney

View GitHub Profile
#s=1781773465
#(1..100).map do |i|
# srand(s) if (i%15)==1
# puts [i,'fizz','buzz','fizzbuzz'].sample
#end
v=810092048;(1..100).map{|i|p [i,'fizz','buzz','fizzbuzz'][(v>>(((i-1)%15)*2))&~0xFFFFFFFC]}
-- Set \ as the leader key
-- See `:help mapleader`
-- NOTE: Must happen before plugins are required (otherwise wrong leader will be used)
vim.g.mapleader = '\\'
vim.g.maplocalleader = '\\'
vim.g.have_nerd_font = true
-- Install package manager
-- https://github.com/folke/lazy.nvim
-- `:help lazy.nvim.txt` for more info
local cmd = vim.cmd
local function nvim_create_augroups(definitions)
for group_name, definition in pairs(definitions) do
-- api.nvim_command('augroup '..group_name)
-- api.nvim_command('autocmd!')
for _, def in ipairs(definition) do
local command = table.concat(vim.tbl_flatten{'autocmd', def}, ' ')
print(command)
-- api.nvim_command(command)
end
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc
call plug#begin(stdpath('config') . '/plugged')
Plug 'nvim-treesitter/nvim-treesitter', {'do': 'TSUpdate'}
Plug 'nvim-treesitter/playground'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'neovim/nvim-lspconfig'
Plug 'kyazdani42/nvim-web-devicons'
@jimnanney
jimnanney / refactors.rb
Created November 17, 2021 03:03
Neovim Plugin using ruby
# frozen_string_literal: true
require 'neovim'
require 'ripper'
class Refactors
attr_reader :nvim
def initialize(nvim)
@nvim = nvim
@jimnanney
jimnanney / game_loop.rb
Created December 31, 2015 01:02
Sonic pi game loop
use_debug false
notes = (scale :b2, :minor_pentatonic, num_octaves: 3).shuffle
live_loop :drums do
sample :bd_haus, amp: 3
sleep 0.25
sample :drum_snare_hard
sleep 0.25
end
@jimnanney
jimnanney / blue_monday.rb
Created November 23, 2015 02:09
Sonic Pi - Blue Monday
define :mydrums do
2.times do
sample :drum_heavy_kick
sleep 0.5
end
8.times do
sample :drum_heavy_kick
sleep 0.125
end
@jimnanney
jimnanney / index.html
Created November 9, 2014 17:26
Ember SC Explorer Ember Starter Kit // source http://emberjs.jsbin.com/yadol
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ember SC Explorer</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css" />
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootswatch/3.3.0/flatly/bootstrap.min.css" />
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" />
@jimnanney
jimnanney / index.html
Last active August 29, 2015 14:08 — forked from anonymous/index.html
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Ember-Table Starter Kit" />
<meta charset="utf-8">
<title>Ember Table Starter Kit</title>
<!-- Note that you need antiscroll CSS to support ember-table -->
<link rel="stylesheet" href="http://rawgit.com/LearnBoost/antiscroll/master/antiscroll.css">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css">
@jimnanney
jimnanney / AnyMock.java
Created August 18, 2014 22:01
Beginning of a mock framework for java 1.4.2
package unittest.fixture;
public interface AnyMock {
public String getName();
public void setName(String value);
public String printName();
}