Skip to content

Instantly share code, notes, and snippets.

View humanfactors's full-sized avatar
🏳️‍⚧️

Micah K. Wilson humanfactors

🏳️‍⚧️
View GitHub Profile
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Hippie expand. Groovy vans with tie-dyes.
;; Change the default hippie-expand order and add yasnippet to the front.
(setq hippie-expand-try-functions-list
'(yas/hippie-try-expand
try-expand-dabbrev
try-expand-dabbrev-all-buffers
try-expand-dabbrev-from-kill
try-complete-file-name
@jashmenn
jashmenn / ej-autocomplete.el
Created January 17, 2012 19:12
emacs autocomplete w/ hippie-expand and yasnippets
(require 'popup)
(require 'pos-tip)
(require 'popup-kill-ring)
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories (concat libfiles-dir "/ac-dict"))
(ac-config-default)
(setq ac-use-menu-map t)
(define-key ac-menu-map (kbd "ESC") 'viper-exit-popup-menu)
(define-key ac-complete-mode-map (kbd "ESC") 'viper-exit-popup-menu)
@AWinterman
AWinterman / Datagate.py
Created May 30, 2012 21:01
Script to convert from csv to sqlite3
import csv
import sqlite3 as lite
import subprocess
from itertools import chain
from time import time
import sys
#import logging
#logging.basicConfig(level=logging.DEBUG)
#
@stevenworthington
stevenworthington / ipak.R
Created July 25, 2012 19:44
Install and load multiple R packages at once
# ipak function: install and load multiple R packages.
# check to see if packages are installed. Install them if they are not, then load them into the R session.
ipak <- function(pkg){
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
if (length(new.pkg))
install.packages(new.pkg, dependencies = TRUE)
sapply(pkg, require, character.only = TRUE)
}
@sburns
sburns / hack.py
Created September 20, 2012 16:11
v1 at converting eprime .txt to pandas.DataFrame
import pandas as pd
F = '/fs0/New_Server/RC_LMS/In_Behavioral/028_207757/PassagesV2_ListA-7757-1.txt'
def parse(f):
data = {}
text = open(f).read().decode('utf-16').replace('\r\n', '\r').splitlines()
start_ind = (i for i, _ in enumerate(text) if _ == '\t\t*** LogFrame Start ***')
end_ind = (i for i, _ in enumerate(text) if _ == '\t\t*** LogFrame End ***')
autocmd! bufwritepost .vimrc source ~/.vimrc
set showtabline=2
set guitablabel=%t
set ignorecase smartcase
set smarttab
set wrap
set whichwrap+=l,h
set number
set history=50
set autoread
@RustingSword
RustingSword / SimpleTimeTracker.ahk
Last active January 25, 2024 19:07
A simple time tracker implemented in AutoHotkey, modified from http://www.autohotkey.com/board/topic/37998-tiny-computer-usage-tracker/
; ticker - A Simple Time Tracker
; track your time usage on a daily basis
#InstallKeybdHook
#InstallMouseHook
Menu, Tray, Icon, %A_WinDir%\system32\shell32.dll, 44
Menu, Tray, Tip, ticker - A Simple Time Tracker`nPress right control to see details
SetWorkingDir, C:\Users\%A_UserName%\Documents
SetTimer, CheckTime, 60000 ; updates every 1 minute
@PiiXiieeS
PiiXiieeS / Insert a progress bar to Powerpoint presentation .md
Last active January 17, 2024 13:12
Insert a progress bar to Powerpoint presentation

Intro

To view the progress of a Powerpoint presentation, a progress bar can be displayed at the bottom of the slide show.

How to proceed

Once the slideshow is complete, go to Tools > Macro > Visual Basic Editor.

In the new window, select Insert > Module and copy this text in the blank page:

Sub AddProgressBar()
    On Error Resume Next
@goldsborough
goldsborough / database.py
Created September 3, 2014 10:07
Python Sqlite3 wrapper
###########################################################################
#
## @file database.py
#
###########################################################################
import sqlite3
###########################################################################
#
@kchat001
kchat001 / borderless.ahk
Last active April 25, 2023 02:17
An AutoHotKey Script that allows to toggle the window title and the border chrome of the current window independently (Ctrl+Win+t and Ctrl+Win+b)
; Borderless Window - AutoHotkey Script
; The script toggles the window border and title bar of the current window independently
; The hotkey is Control+Win+t. It applies changes to whatever window has focus.
^#t::
WinGetTitle, currentWindow, A
IfWinExist %currentWindow%
{
WinSet, Style, ^0xC00000 ; toggle title bar
}