Skip to content

Instantly share code, notes, and snippets.

View echelon's full-sized avatar
💭
🤖

Brandon Thomas echelon

💭
🤖
View GitHub Profile
@p3jitnath
p3jitnath / install-docker.sh
Last active June 22, 2024 11:56
Docker and Nvidia Docker installation in Ubuntu 20.04 LTS
# WARNING : This gist in the current form is a collection of command examples. Please exercise caution where mentioned.
# Docker
sudo apt-get update
sudo apt-get remove docker docker-engine docker.io
sudo apt install docker.io
sudo systemctl start docker
sudo systemctl enable docker
docker --version
@roycewilliams
roycewilliams / pwnedpasswords-v2-top20k.txt
Last active May 29, 2024 07:42
pwnedpasswords-v2-top20k.txt
#------------------------------------------------------------------------------
# Top 20K hashes from the Troy Hunt / haveibeenpwned Pwned Passwords list v2 (2018-02-21)
# with frequency count and cracked plaintext passwords
#
# The latest version of this file can be found here:
# https://gist.github.com/roycewilliams/281ce539915a947a23db17137d91aeb7
#
# NOTE: THIS FILE IS DEPRECATED.
# The equivalent of this file, but based on v6 of the Pwned Passwords, is here:
# https://gist.github.com/roycewilliams/226886fd01572964e1431ac8afc999ce
@echelon
echelon / random_color.sh
Last active February 16, 2017 00:17
Random terminal color for grep, silver searcher, etc.
#!/bin/bash
# Select a random color for search utilities such as 'grep' or 'ag'.
# Create an alias: alias ag='ag --color-match="$(random_color)"'
# Or, alias grep='GREP_COLOR="$(random_color)" grep'
random_color() {
# List of highlight colors to iterate between
# Legacy Terminal color codes,
# 01;33 - light yellow text
# 01;34 - dark blue text

How to add an image to a gist

  1. Create a gist if you haven't already.
  2. Clone your gist:
    # make sure to replace `<hash>` with your gist's hash
    git clone https://gist.github.com/<hash>.git # with https
    git clone git@gist.github.com:<hash>.git     # or with ssh
@Ashwinning
Ashwinning / OpenCVTextureinOpenGL.md
Last active May 21, 2023 11:54
Using webcam video as texture in OpenGL

OpenCV Texture in OpenGL.

The following code was found at http://www.alecjacobson.com/weblog/?p=1875

The page suffered from bad formatting so the contents have been pasted here for easier readibility.

// Modified from "Video Texture" code
// Copyright (C) 2009  Arsalan Malik (arsalank2@hotmail.com)
//                                                                            
#!/usr/bin/perl
# By Michael Chaney, Michael Chaney Consulting Corporation
# Copyright 2006, Michael Chaney Consulting Corporation, all rights reserved
# read wav chunks, see what each chunk is
use strict;
use POSIX qw(strftime);
@niw
niw / Molokai.icls
Last active November 19, 2019 18:56
Molokai color scheme for IntelliJ IDEA. Put this file into ~/Library/Preferences/<Path to each IntelliJ Platforms>/colors.
<scheme name="Molokai" version="142" parent_scheme="Default">
<option name="LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_SIZE" value="14" />
<option name="EDITOR_FONT_NAME" value="Menlo" />
<colors>
<option name="ADDED_LINES_COLOR" value="a6e22e" />
<option name="ANNOTATIONS_COLOR" value="66d9ef" />
<option name="ANNOTATIONS_MERGED_COLOR" value="a6e22e" />
<option name="CARET_COLOR" value="f8f8f2" />
<option name="CARET_ROW_COLOR" value="232526" />
@caseyohara
caseyohara / reserved_usernames.rb
Created December 9, 2011 22:58
A list of reserved usernames to avoid vanity URL collision with resource paths
# A list of possible usernames to reserve to avoid
# vanity URL collision with resource paths
# It is a merged list of the recommendations from this Quora discussion:
# http://www.quora.com/How-do-sites-prevent-vanity-URLs-from-colliding-with-future-features
# Country TLDs found here:
# http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
# Languages found here:
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Update 7 Oct 2010:
# - This example does *not* appear to work with Chrome >=6.0. Apparently,
# the WebSocket protocol implementation in the cramp gem does not work
# well with Chrome's (newer) WebSocket implementation.
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
@tessro
tessro / redis-server
Created December 16, 2009 14:20
A CentOS initscript for Redis
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid