Skip to content

Instantly share code, notes, and snippets.

View smartmic's full-sized avatar

smartmic

  • Germany
View GitHub Profile
@exocomet
exocomet / calendar.sql
Last active April 29, 2024 17:00
sqlite calendar table
-- sqlite
CREATE TABLE IF NOT EXISTS calendar (
d date UNIQUE NOT NULL,
dayofweek INT NOT NULL,
weekday TEXT NOT NULL,
quarter INT NOT NULL,
year INT NOT NULL,
month INT NOT NULL,
day INT NOT NULL
);
@smartmic
smartmic / teck.xmodmap
Created June 29, 2015 22:08
Neo2 Layout (German) for Truly Ergonomic Keyboard (207) in Linux
! Modifikations- .xmodmap, um das Truly Ergonomic Keyboard (207) an die
! Linux Implementierung von Neo2 anzupassen
!
! von Martin Michel, Januar 2014
!
!
! Folgendes Layout wird zur Verfügung gestellt:
!
! ┌───┐ ┌───┐
@abtrout
abtrout / pass.md
Created July 8, 2014 14:51
Using password-store with git repository synching

Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store. For more information about GPG, consult the GNU Privacy Handbook.

Getting started

To get started, install pass and generate a keypair.

$ brew install pass
$ gpg --gen-key
$ gpg --list-keys
@ojarjur
ojarjur / scmfmt.scm
Created October 10, 2013 19:22
Code formatter for Scheme using Guile's pretty-print method. This reads from stdin and writes to stdout.
(use-modules (ice-9 pretty-print))
;; Helper methods for maintaining comments and whitespace.
(define (copy-line-comment)
(let ((char (read-char)))
(if (not (eof-object? char))
(if (eq? char #\newline)
(newline)
(begin (write-char char) (copy-line-comment))))))
(define (maintain-empty-lines)
@willurd
willurd / web-servers.md
Last active November 9, 2024 21:16
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@powerlim2
powerlim2 / SKhelper.py
Last active January 11, 2021 18:35
This module is to ease your analysis with Scikit_Learn in Python. It gives a few functionalities that the current Scikit_Learn library does not offer. Please free to download and use it.
# coding=UTF8
#########################################################################
# This class is to help sklearn to handle statistical process #
# Author: Joon Lim from Master of Science in Analytics at Northwestern #
# Date: 04.23.2013 #
#########################################################################
''' this Module is built on top of numpy and sklearn. '''