Skip to content

Instantly share code, notes, and snippets.

View alexraileanu's full-sized avatar

Alex alexraileanu

View GitHub Profile
package main
import (
"errors"
"fmt"
"os"
"github.com/jedib0t/go-pretty/v6/text"
"github.com/spf13/cobra"
)
@alexraileanu
alexraileanu / htpasswd.py
Created September 25, 2018 14:47 — forked from guerrerocarlos/htpasswd.py
Python script for generating htaccess passwords
#!/usr/bin/python
"""Replacement for htpasswd"""
# Original author: Eli Carter
import os
import sys
import random
from optparse import OptionParser
# We need a crypt module, but Windows doesn't have one by default. Try to find
@alexraileanu
alexraileanu / menu_launcher.py
Created March 7, 2018 15:04 — forked from abishur/menu_launcher.py
A simple menu system using python for the Terminal (Framebufer)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Topmenu and the submenus are based of the example found at this location http://blog.skeltonnetworks.com/2010/03/python-curses-custom-menu/
# The rest of the work was done by Matthew Bennett and he requests you keep these two mentions when you reuse the code :-)
# Basic code refactoring by Andrew Scheller
from time import sleep
import curses, os #curses is the interface for capturing key presses on the menu, os launches the files
screen = curses.initscr() #initializes a new window for capturing key presses
curses.noecho() # Disables automatic echoing of key presses (prevents program from input each key twice)
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5qOiaVIZ9KR6iwSUMIu48Xi4v03xq5rul8hH2Ld3pHph7dzOLxnmjOmMKjuGagcHmqnzkyH9t8kz280uOgQ384wqqlYtZuxT3JX9LbWIXqgITXhe+iEJy74HD+8ablzM+3FLMNIcfjmGgXWs5nERUzjAQEENS5IAfdHZ5OK66K88bTPBHGnRkhG+pehbeTKKLO9UF+eaePBJIwnbAGVzy18vJZiBin/P5LCAdUd8FYCJrOR2i6iJUrDm0WMEXTrRWRJdeL+gJyosRBSImGg4DrUx51b7E6D7i5oatfMSdbYTdA3J28eUwMfInih7TaKNotOTYrsRX91xxtcA2PGQz alex@Philae.local
@alexraileanu
alexraileanu / schminitz.zsh-theme
Last active April 29, 2016 10:43 — forked from schminitz/schminitz.zsh-theme
Another oh-my-zsh theme with background vim recognize
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[cyan]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}✘"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}✔"
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[red]%}➦"
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈"
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦"
@alexraileanu
alexraileanu / gist:4588544
Last active December 11, 2015 10:39
improved guess the number.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" href="style.css">
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
<script>
$(document).ready(function() {
var computerNumber = Math.floor(Math.random() * 10); // Generates a random number between 1 and 10.