Skip to content

Instantly share code, notes, and snippets.

@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
import json
import csv
import sys
import datetime
import os
def make_reader(in_json):
# Open location history data
@casperghst42
casperghst42 / create-cloud-init.sh
Last active April 24, 2024 16:21
Create a cloud-init Debian 12 image on proxmox
#!/bin/bash
# Author: Casper Pedersen (github.com/casperghst42)
# License: GPL2
wget https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2
virt-customize -a debian-12-generic-amd64.qcow2 --install qemu-guest-agent --install resolvconf --install systemd-resolved --update --run-command 'mkdir -p /etc/network/interfaces.d' --run-command 'echo "auto ens18" >> /etc/network/interfaces.d/ens18' --run-command 'echo "iface ens18 inet manual" >> /etc/network/interfaces.d/ens18'
qm create 100000 --name "debian12-cloudinit-template" --memory 2048 --net0 virtio,bridge=vmbr0
qm importdisk 100000 debian-12-generic-amd64.qcow2 local-lvm -format qcow2
@leommoore
leommoore / file_magic_numbers.md
Last active April 24, 2024 16:21
File Magic Numbers

File Magic Numbers

Magic numbers are the first bits of a file which uniquely identify the type of file. This makes programming easier because complicated file structures need not be searched in order to identify the file type.

For example, a jpeg file starts with ffd8 ffe0 0010 4a46 4946 0001 0101 0047 ......JFIF.....G ffd8 shows that it's a JPEG file, and ffe0 identify a JFIF type structure. There is an ascii encoding of "JFIF" which comes after a length code, but that is not necessary in order to identify the file. The first 4 bytes do that uniquely.

This gives an ongoing list of file-type magic numbers.

Image Files

@nightire
nightire / 解决 Git 在 windows 下中文乱码的问题.md
Last active April 24, 2024 16:19
解决 Git 在 windows 下中文乱码的问题

解决 Git 在 windows 下中文乱码的问题

原因

中文乱码的根源在于 windows 基于一些历史原因无法全面支持 utf-8 编码格式,并且也无法通过有效手段令其全面支持。

解决方案

  1. 安装
import sys
import numpy as np
import yt
import yt_idv
# yt reminder: phi is the polar angle (0 to 2pi)
# theta is the angle from north (0 to pi)
@SMEISEN
SMEISEN / config.py
Created November 3, 2020 11:36
python MQTT example
import os
from dotenv import load_dotenv
dotenv_path = os.path.join(os.path.dirname(__file__), '.env')
if os.path.exists(dotenv_path):
load_dotenv(dotenv_path)
class Config(object):
@nezamy
nezamy / webserver.sh
Last active April 24, 2024 16:11
Web Server Install
#!/bin/bash
# Just Setup Script
#chmod +x filename.sh
#COLORS
Color_Off='\033[0m' # Text Reset
# Regular Colors
Red='\033[0;31m' # Red
Green='\033[0;32m' # Green
Yellow='\033[0;33m' # Yellow
Purple='\033[0;35m' # Purple
@gmolveau
gmolveau / uuid_user.py
Last active April 24, 2024 16:09
sqlalchemy uuid for sqlite
########################
# UUID for SQLite hack #
########################
from sqlalchemy.types import TypeDecorator, CHAR
from sqlalchemy.dialects.postgresql import UUID
import uuid
class GUID(TypeDecorator):
NetLimiter 3
Registration name: Peter Raheli
Registration code: C99A2-QSSUD-2CSBG-TSRPN-A2BEB
NetLimiter 4
Registration Name: Vladimir Putin #2
Registration Code: XLEVD-PNASB-6A3BD-Z72GJ-SPAH7
https://www.netlimiter.com/download
# Netlimiter Full Netlimiter Activated Netlimiter cracked Netlimiter Full Version Netlimiter Serial Netlimiter keygen Netlimiter crack Netlimiter 4 serial Netlimiter 4 Crack Netlimiter 4 register Netlimiter 4 patch Netlimiter full Full version Netlimiter 4 Activated Netlimiter 4 Cracked Netlimiter Pro