Skip to content

Instantly share code, notes, and snippets.

@chrispetrou
chrispetrou / previews.sh
Last active September 12, 2024 23:09
bash script to generate previews with different themes from asciinema url
#!/bin/bash
# This is a small bash script that takes as input
# an asciinema public-video's id and produces all possible
# svgs using iterm2 themes using svg-term...
asciinema_id=$1
declare -a themes=("DimmedMonokai" "Pro" "Spiderman" "Twilight" "Hardcore" "Atom" "Hurtado" "SoftServer" "N0tch2k" "Borland" "Tomorrow Night" "Blazer" "Afterglow" "Lavandula" "Floraverse" "Spring" "LiquidCarbonTransparentInverse" "ENCOM" "Mathias" "MonaLisa" "Jellybeans" "Shaman" "Belafonte Day" "C64" "WarmNeon" "CLRS" "Rippedcasts" "Royal" "Tomorrow Night Bright" "Espresso" "Harper" "Later This Evening" "Broadcast" "Smyck" "DotGov" "3024 Night" "IC_Orange_PPL" "Kibble" "WildCherry" "Darkside" "Hybrid" "Parasio Dark" "Espresso Libre" "Terminal Basic" "SpaceGray Eighties" "Solarized Darcula" "Thayer Bright" "Galaxy" "BirdsOfParadise" "Seafoam Pastel" "ToyChest" "Dark Pastel" "Grape" "Flat" "Belafonte Night" "Teerb" "LiquidCarbon" "NightLion v1" "PaulMillr" "Github" "OceanicMaterial" "IC_Green_PPL" "MaterialDark" "Argonaut" "Dracu
@sminez
sminez / get_ippsec_details.py
Last active June 5, 2024 12:10
Find examples of pen testing methods and tools in videos by Ippsec (as of 22nd January 2020)
#!/usr/bin/env python3
"""
Script used to pull down the current video descriptions from ippsec's youtube channel.
The raw output still has a few HTML tags that need to be manually removed and there
also seem to be multiple duplicates of videos that have been removed in the output
saved as ippsec-details.txt
"""
import re
import sys
@mdang
mdang / RAILS_CHEATSHEET.md
Last active March 31, 2025 22:13
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before

@goyalankit
goyalankit / bash_to_zsh_history.rb
Last active October 28, 2023 05:07
Import bash history to zsh history.
#################################################################
# = This script transfers bash history to zsh history
# = Change bash and zsh history files, if you don't use defaults
#
# = Usage: ruby bash_to_zsh_history.rb
#
# = Author: Ankit Goyal
#################################################################
# change if you don't use default values
@rxaviers
rxaviers / gist:7360908
Last active April 28, 2025 14:05
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@7h3rAm
7h3rAm / hexdump.py
Last active April 26, 2021 20:49
hexdump implementation in Python
#!/usr/bin/env python3
def hexdump(src, length=16, sep='.'):
"""
>>> print(hexdump('\x01\x02\x03\x04AAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBB'))
00000000: 01 02 03 04 41 41 41 41 41 41 41 41 41 41 41 41 |....AAAAAAAAAAAA|
00000010: 41 41 41 41 41 41 41 41 41 41 41 41 41 41 42 42 |AAAAAAAAAAAAAABB|
00000020: 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 |BBBBBBBBBBBBBBBB|
00000030: 42 42 42 42 42 42 42 42 |BBBBBBBB|
>>>
@sbz
sbz / hexdump.py
Created July 13, 2011 13:04
hexdump implementation in Python
def hexdump(src, length=16):
FILTER = ''.join([(len(repr(chr(x))) == 3) and chr(x) or '.' for x in range(256)])
lines = []
for c in xrange(0, len(src), length):
chars = src[c:c+length]
hex = ' '.join(["%02x" % ord(x) for x in chars])
printable = ''.join(["%s" % ((ord(x) <= 127 and FILTER[ord(x)]) or '.') for x in chars])
lines.append("%04x %-*s %s\n" % (c, length*3, hex, printable))
return ''.join(lines)