Skip to content

Instantly share code, notes, and snippets.

View ttimasdf's full-sized avatar

Known Rabbit ttimasdf

View GitHub Profile
{
"stats": {},
"api": {
"services": [
"StatsService"
],
"tag": "api"
},
"policy": {
"levels": {
@kzu
kzu / ObservableDictionary.cs
Last active October 6, 2023 11:01
An ObservableDictionary<TKey, TValue>
// Licensed by Daniel Cazzulino under the MIT License
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Diagnostics;
using System.Dynamic;
using System.Linq;
using System.Text;
@nirvanatikku
nirvanatikku / css_inline_transformer.js
Created December 2, 2016 23:19
JavaScript CSS Inline Style Transformer (convert CSS + HTML into HTML with inline styles)
/**
* CSS Inline Transform v0.1
* http://tikku.com/css-inline-transformer-simplified
*
* Copyright 2010-2012, Nirvana Tikku
* Dual licensed under the MIT or GPL Version 2 licenses.
* https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt
*
* This tool leverages the jQuery library.
*
@ihipop
ihipop / frp systemd.md
Last active December 26, 2023 05:13
FRP systemd 启动脚本 FRP systemd init config
@thomasfr
thomasfr / autossh.service
Last active January 5, 2024 08:11
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
@JPvRiel
JPvRiel / journalctl_enable_persistent_storage.md
Last active January 24, 2024 20:23
Enable persistent storage for the systemd journal log

Enable persistent storage for the systemd journal log

Overview

The assumed default setting in /etc/systemd/journald.conf is Storage=auto which implies that systemd journaling will only persist the journal if the expected storage location is available. Otherwise, the journal data is stored in memory and lost between reboots. On Ubuntu 16.04, /var/log/journal does not exist by default. Create it to keep and query events from previous boots.

Considerations:

  • Syslog still provides the persistant log records for Ubuntu 16.04, so enabling persistant systemd journal logging does cause a level of duplicaiton.
  • There are sane defaults:
@mcdamo
mcdamo / ipmi-updater.py
Last active January 25, 2024 11:22 — forked from HQJaTu/ipmi-updater.py
Supermicro IPMI certificate updater
#!/usr/bin/env python3
# vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=python
# This file is part of Supermicro IPMI certificate updater.
# Supermicro IPMI certificate updater is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
@ihciah
ihciah / README.MD
Last active February 2, 2024 00:08
A reverse proxy for Telegram Bot API on Aliyun Function Compute / Cloudflare Workers

A reverse proxy for Telegram Bot API on Aliyun Function Compute / Cloudflare Workers

To help users in China mainland access telegram api stably and conveniently with low cost, this script maybe the one you need.

The server-less means you don't have to run a server to proxy the requests, just pay as you go.

Usage

Edit key_prefix, set it to the prefix of you bot address(like /bot563441998:) can avoid abusing.

@koenbollen
koenbollen / punch.py
Created July 5, 2010 19:10
Proof of Concept: UDP Hole Punching
#!/usr/bin/env python
#
# Proof of Concept: UDP Hole Punching
# Two client connect to a server and get redirected to each other.
#
# This is the client.
#
# Koen Bollen <meneer koenbollen nl>
# 2010 GPL
#
@roadrunner2
roadrunner2 / 0 Linux-On-MBP-Late-2016.md
Last active February 29, 2024 16:29
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)

Introduction

This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se