Skip to content

Instantly share code, notes, and snippets.

@blanboom
blanboom / StockWidget.js
Last active December 9, 2020 20:45 — forked from saiteja09/StockWidget.js
用于 Scriptable 的股票 widget,能够密集显示更多的股票信息
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: light-gray; icon-glyph: magic;
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-blue; icon-glyph: book; share-sheet-inputs: plain-text;
// Stock Ticker Widget
let stocksInfo = await getStockData()
let widget = await createWidget()
if (config.runsInWidget) {
@blanboom
blanboom / image-shadow
Last active March 4, 2020 11:16 — forked from twlz0ne/image-shadow
Add shadow to image
#!/bin/bash
##
# Add shadow to image
# @author gongqijian@gmail.com
# @date 2014-11-22
##
usage() {
app=$(basename $0)
cat <<EOF
@blanboom
blanboom / tmcleanup.md
Last active December 3, 2023 07:19 — forked from linjer/tmcleanup.md
Script to automatically remote old Mac OSX Time Machine Backups older than a specified number of days

Prerequisites

  • gfind (via brew install findutils)
  • Time Machine drive mounted on your computer (or you can change path from standard /Volume/Time\ Machine\ Backups/Backups.backup.db/
  • Admin/sudo access in the OSX terminal

Script

  • Be sure to set the correct machine name. You can check the actual folder things are going into by looking in the backup location.
  • By default, it erases all backups older than 30 days. Adjust as desired.

Keybase proof

I hereby claim:

  • I am blanboom on github.
  • I am blanboom (https://keybase.io/blanboom) on keybase.
  • I have a public key ASDxUCE4LY2XrIUhN8TFq4YdFAtePLgs65xVCJguROytcAo

To claim this, I am signing this object:

#!/usr/local/bin/python3
##########################################
# 问题:
# 有一条河,河边有一个猎人牵着一头狼,一个男人带着两个小男孩,还有一个女人带着两个小女孩
# 如果猎人离开,狼就会把所有人吃掉
# 如果男人离开,女人会把两个小男孩掐死
# 如果女人离开,男人会把两个小女孩掐死
# 河里有一条船,船上只能乘坐两人(狼算一人),只有猎人、男人、女人会划船
# 如何使他们全部过河?
@blanboom
blanboom / SMBDIS.ASM
Created March 28, 2016 08:44 — forked from 1wErt3r/SMBDIS.ASM
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@blanboom
blanboom / config.txt
Created March 13, 2015 12:47
My Raspberry Pi 2 config.txt
# For more options and information see
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1
set isRunning to false
tell application "System Events"
if exists process "OmniFocus" then
set isRunning to true
end if
end tell
if isRunning is true then
tell application "System Events"
@blanboom
blanboom / filter.py
Last active March 29, 2016 08:34
滤波器特性分析_信号与系统作业
#!/usr/bin/python
# -*- coding: utf-8 -*-
# 信号与系统课程设计:滤波器特性分析
# 作者:马晓忠(Blanboom)
# http://blanboom.org
# 2014 年 06 月 17 日
# 环境:
# Python: 2.7.5
# NumPy: 1.6.2
/*
*
* File: MP3_Shield_RealtimeMIDI.ino
* Author: Matthias Neeracher
*
* This code is in the public domain, with the exception of the contents of sVS1053b_Realtime_MIDI_Plugin.
*
* The code is based on Nathan Seidle's Sparkfun Electronics example code for the Sparkfun
* MP3 Player and Music Instrument shields and and VS1053 breakout board.
*