Skip to content

Instantly share code, notes, and snippets.

@rab
rab / .gitconfig
Last active May 14, 2024 07:05
A good starting point for ~/.gitconfig
# -*- Conf -*-
[color]
branch = auto
diff = auto
status = auto
showbranch = auto
ui = true
# color.branch
# A boolean to enable/disable color in the output of git-branch(1). May be set to always, false (or
@weakish
weakish / flvcd.py
Created May 19, 2011 02:27
Download videos via flvcd.com
#!/usr/bin/env python3.2
# by Jakukyo Friel <weakish@gmail.com> under GPL v2
# Download videos via flvcd.com
# Usage: flvcd url
# TODO:
# - Some sites divide video into clips, we need to support it.
# - flvcd.com may use '...' in the link address displayed. This script fails under this condition.
@Blackshome
Blackshome / sensor-light.yaml
Last active May 14, 2024 07:03
Home Assistant Sensor Light that can be used in Blueprints
blueprint:
name: Sensor Light
description: >
# 💡 Sensor Light
**Version: 6.5**
Your lighting experience, your way - take control and customize it to perfection! 💡✨
@lbruder
lbruder / lbForth.c
Created April 6, 2014 15:21
A minimal Forth compiler in ANSI C
/*******************************************************************************
*
* A minimal Forth compiler in C
* By Leif Bruder <leifbruder@gmail.com> http://defineanswer42.wordpress.com
* Release 2014-04-04
*
* Based on Richard W.M. Jones' excellent Jonesforth sources/tutorial
*
* PUBLIC DOMAIN
*
@PyaeSoneAungRgn
PyaeSoneAungRgn / laravel-folder-permissions.md
Last active May 14, 2024 07:02
Laravel Folder Permissions
@gmr
gmr / bindify.py
Last active May 14, 2024 07:02
Convert tinydns zone files to bind
#!/usr/bin/env python
import collections
import datetime
from os import path
import pickle
import sys
if len(sys.argv) < 2:
print('Usage: bindify.py zonefile')
@yulanggong
yulanggong / calender.md
Created June 13, 2014 05:35
日历标准格式研究

日历标准格式研究

日历的导入导出

格式

现在通用的日历格式是 iCalendar,通常扩展名是 .ics

BEGIN:VCALENDAR #日历开始
@Faheetah
Faheetah / install.sh
Created September 15, 2023 16:30
Install containerd and nerdctl on Ubuntu
# Note: can also just install nerdctl-full
sudo apt-get update
sudo apt-get install containerd
wget https://github.com/containerd/nerdctl/releases/download/v1.5.0/nerdctl-1.5.0-linux-amd64.tar.gz
tar -zxf nerdctl-1.5.0-linux-amd64.tar.gz nerdctl
sudo mv nerdctl /usr/bin/nerdctl
rm nerdctl-1.5.0-linux-amd64.tar.gz
@KeiKinn
KeiKinn / jd_auto_review.js
Created April 8, 2019 03:09
京东自动评价脚本,在网页京东登录后,Chrome F12打开dev tools,在console中粘贴代码并回车即可
1
document.body.innerHTML = "";$("html").css("overflow","hidden");$("body").append('<div id="topTitle" style="padding:20px;display:block;font-size:48px;color:#FFFFFF;background-color:#e2231a;width:100%;text-align:center">京东自动评价JS脚本 by Clarkent V0.3</div><iframe src="https://club.jd.com/myJdcomments/myJdcomment.action?sort=0" style="width:99%;height:800px" id="JDifr"></iframe>');$("#J-global-toolbar").remove();let isFiveStar = true;$("#topTitle").click(function(){(isFiveStar = !isFiveStar) ? $("#topTitle").css("background-color","#e2231a"):$("#topTitle").css("background-color","#8B0000");});let pendingNum = 1;let waitSubmitIds;let curId = 0;let maxCurId = 0;$("#JDifr").load(function(){if($("#JDifr").attr("src").indexOf("sort") > 0){pendingNum = ($("#JDifr").contents().find("a.text:first").siblings().length>0 && $("#JDifr").contents().find("a.text:first").attr("href")=="?sort=0")?parseInt($("#JDifr").contents().find("a.text:first").next().text()):0;waitSubmitIds = $("#JDifr").contents().find(".number").length>0