Skip to content

Instantly share code, notes, and snippets.

View Cycatz's full-sized avatar
😇
Focusing

Cycatz Cycatz

😇
Focusing
  • /dev/urandom
View GitHub Profile
@MZachmann
MZachmann / BitmapFontHelpers.py
Last active February 6, 2022 23:48
Python Code For Bitmap Font Translation
# this is a set of functions to convert from a bitmap image and fnt to
# C++ compatible data streams for use by LargeFont
import png
# This requires a variable named font, which is the font name font='Arial11'
Basepath = '/users/mark/my documents/'
font = 'Arial11'
ClipPng(font)
FntToInfo(font)
# -------------------------------------------------------
@hackerb9
hackerb9 / sixcat
Created June 3, 2017 03:36
sixcat: Like 'cat' but show images directly in the terminal using SIXEL graphics
#!/bin/bash
# sixcat: Use sixel graphics to show an image inside a terminal.
# sixgif: Use sixel graphics to play an animation inside a terminal.
# Version 1.0
# hackerb9, June 2017
# Sixel graphics are supported by terminals such as the DEC VT340 and
# emulators, such as 'xterm -ti vt340'.
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active July 13, 2026 23:37
Hyperlinks in Terminal Emulators
@derofim
derofim / codestyle.md
Last active April 7, 2026 14:47
C++ code style sample
@bmhatfield
bmhatfield / .profile
Last active August 9, 2025 20:28
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@miseqs
miseqs / learning-computer-security.md
Last active February 19, 2026 09:37
Learning Computer Security

Learning Computer Security

About This Guide

This is an opinionated guide to learning about computer security (independently of a university or training program), starting with the absolute basics (suitable for someone without any exposure to or knowledge of computer security) and moving into progressively more difficult subject matter.

It seems that most people don't realize how much information is actually available on the internet. People love to share (especially geeks) and everything you need to become well versed in computer security is already available to you (and mostly for free). However, sometimes knowing where to start is the hardest part - which is the problem that this guide is intended to address. Therefore, this guide can accuratley be described as a 'guide to guides', with additional recommendations on effective learning and execises, based on my own experiences.

Many of the free resources are the best resources and this guide focuses on them. It is intended to provided a comprehensive

@soheilhy
soheilhy / nginxproxy.md
Last active May 27, 2026 15:45
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@m-ou-se
m-ou-se / 0 utf.hpp
Last active April 27, 2023 22:24
Utf-8/16 characters in C++
#include <array>
#include <iostream>
#include <stdexcept>
#include <string>
#include <cstdint>
/// An UTF-8 encoded character.
class utf8_char {
private:
@amitsaha
amitsaha / ls.rst
Last active January 24, 2026 02:00
How does `ls` work?

How does ls work?

I wanted to be really able to explain to a fair amount of detail how does the program :command:`ls` actually work right from the moment you type the command name and hit ENTER. What goes on in user space and and in kernel space? This is my attempt and what I have learned so far on Linux (Fedora 19, 3.x kernel).

How does the shell find the location of 'ls' ?

#include <algorithm>
#include <iostream>
#include <map>
#include <unordered_map>
// MapTraits<MapType, KeyType1, KeyType2, KeyType3...>
// ---------------------------------------------------
// 连续使用 KeyType1, KeyType2, KeyType3... 对 MapType 进行取 Value 操作后的信息
template <typename MapType, typename KeyType, typename... KeyTypes>