Skip to content

Instantly share code, notes, and snippets.

View josix's full-sized avatar
🐍

Josix josix

🐍
View GitHub Profile
@josix
josix / nub.hs
Last active April 25, 2018 07:24
Implement nub function in Haskell
nub1 :: [Int] -> [Int]
nub1 xs = foldr isntElement [] xs
where isntElement x xs | length [y | y <- xs, y == x] == 0 = x:xs
| otherwise = xs
nub2 :: [Int] -> [Int]
nub2 [] = []
nub2 (x:xs) | length [y | y <- nub2 xs , y == x] /= 0 = nub2 xs
| otherwise = x : nub2 xs
@josix
josix / pep8_cheatsheet.py
Created April 18, 2018 17:43 — forked from RichardBronosky/pep8_cheatsheet.py
PEP-8 cheatsheet
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""This module's docstring summary line.
This is a multi-line docstring. Paragraphs are separated with blank lines.
Lines conform to 79-column limit.
Module and packages names should be short, lower_case_with_underscores.
Notice that this in not PEP8-cheatsheet.py
@josix
josix / tmux_cheatsheet.markdown
Last active November 29, 2017 12:03 — forked from henrik/tmux_cheatsheet.markdown
tmux cheatsheet

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@josix
josix / vimrc
Last active March 14, 2017 03:31
"========================================Setting Plugin======================================================
" Setting the plugin management pathogen to automatically execute plugins installed
" Setting to automaticlly dective and use plugins, then set indentation with different file types
execute pathogen#infect()
"Filetype plugin indent on
set nocompatible " not compatible with the old-fashion vi mode
filetype off " required!
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle