Skip to content

Instantly share code, notes, and snippets.

@n-st
n-st / colortrans.py
Last active May 28, 2019 15:01 — forked from MicahElliott/colortrans.py
Convert values between RGB hex codes and xterm-256 color codes.
#! /usr/bin/env python2
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code
@n-st
n-st / bash-history-to-zsh-history.py
Created May 31, 2017 18:01 — forked from op/bash-history-to-zsh-history.py
Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | bash-history-to-zsh-history >> ~/.zsh_history
import sys
def main():
@n-st
n-st / mac.py
Created May 21, 2017 01:08 — forked from anonymous/mac.py
#!/usr/bin/env python
# don't fuck too hard with it n-st :P
from twisted.words.protocols import irc
from twisted.internet import protocol
from twisted.internet import reactor
from twisted.internet import task
from twisted.python import log
import cfscrape
import validators
import duckduckgo