Skip to content

Instantly share code, notes, and snippets.

View creamidea's full-sized avatar

NekoTrek creamidea

View GitHub Profile
@creamidea
creamidea / YoudaoDictionaryEnhancer.user.js
Last active September 14, 2016 04:16
Improve the experience of the Youdao Dictionary. Thank you: dict.youdao.com && etymonline.com :D
// ==UserScript==
// @name Youdao Dictionary Enhancer
// @namespace http://tampermonkey.net/
// @version 1.1
// @description search words Celerity
// @author creamidea
// @match http://dict.youdao.com/*
// @require http://cdn.bootcss.com/nprogress/0.2.0/nprogress.min.js
// @resource nprogress_css http://cdn.bootcss.com/nprogress/0.2.0/nprogress.min.css
// @resource etymoline_css http://www.etymonline.com/style.css
@majido
majido / high-resolution-event-timestamp-polyfill.js
Last active September 27, 2016 13:05
High resolution Event.timeStamp polyfill
// Browsers (and the DOM spec) are in the process of moving the event timestamp
// from being a DOMTimeStamp (mostly relative to Date.now()) to being
// a DOMHighResTimeStamp (always relative to performance.now()).
// A simple polyfill for making Event.timeStamp to always be a
// DOMHighResTimeStamp that can be compared with performance.now(). This becomes
// a no-op for browsers that provide high resolution event timestamp.
// Compatibility:
// At the moment it is IE9+ as it requires: |performance.now| which is IE9+
@jb510
jb510 / ReadMe.md
Last active January 20, 2022 15:42 — forked from boogah/ale.bash
Auto Update Brew: OS X Launchd job and script to automatically update homebrew
  1. Place homebrewupdate.sh where ever you like, I use ~/bin/homebrewupdate.sh
  2. Place the .plist file in ~/Library/LaunchAgents and update the path to your bash script
  3. run launchctl load ~/Library/LaunchAgents/com.jb510.homebrewupdate.plist or whatever you've named your plist file.
  4. check launchctl list | grep jb510 to see that it's running

Note: You might need to chmod +x homebrewupdate.sh

Note 2: you can run this manually to test your script ~/bin/homebrewupdate.sh

Future: Update this to also update casks https://github.com/buo/homebrew-cask-upgrade or using brew cask list | xargs brew cask reinstall

@acgotaku
acgotaku / baidupan
Last active April 26, 2023 04:00
新版百度云盘aria2c导出下载 ,目前只实现了核心功能.
// ==UserScript==
// @name 百度网盘aria2导出工具
// @author acgotaku311
// @description 一个方便吧百度网盘的Aria2rpc导出的脚本。
// @encoding utf-8
// @include http://*n.baidu.com/s/*
// @include http://*n.baidu.com/disk/home*
// @include http://*n.baidu.com/share/link*
// @include https://*n.baidu.com/s/*
// @include https://*n.baidu.com/disk/home*
@zellux
zellux / zhihu.recipe
Last active August 9, 2019 16:50
知乎日报 Kindle 版生成工具,可用于 Calibre
#!/usr/bin/env python
__copyright__ = 'Yuanxuan Wang <zellux at gmail dot com>'
from calibre.web.feeds.news import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import Tag, NavigableString
from collections import OrderedDict
from contextlib import nested, closing
import json
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 7, 2024 19:32
A badass list of frontend development resources I collected over time.
@ahappyforest
ahappyforest / gist:5762346
Last active December 18, 2015 09:38
1. 将define换成了enum 2. 将sensor_msg_t的sensor_value字段由uint16_t改成了uint32_t
#ifndef SMART_IRRIGATION_H
#define SMART_IRRIGATION_H
#define RESERVED_LEN 1
#define OFF 0
#define ON 1
#define AUTO 2
enum {
AM_SENSOR_MSG = 7,
#ifndef SMART_IRRIGATION_H
#define SMART_IRRIGATION_H
#define RESERVED_LEN 1
// list of operation -> request_code
#define SET_SWITCH_STATUS_REQUEST 0x01// 设置传感器开关
#define GET_SWITCH_STATUS_REQUEST 0x02// 获取开关状态
#define GET_READING_REQUEST 0x03// 获取传感器采集的数据
#define SET_READING_PERIOD_REQUEST 0x04// 设置采集的周期
#include <assert.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <windows.h> // 各种位图数据结构
class Converter
{
public:
Converter() : pixels_(NULL), width_(0), height_(0) {}
@johnbender
johnbender / prefs.js
Created February 23, 2013 06:20
Set up Chrome Secure Shell to handle solarized terminal colors
// Disable bold.
term_.prefs_.set('enable-bold', false)
// Use this for Solarized Dark
term_.prefs_.set('background-color', "#002b36");
term_.prefs_.set('foreground-color', "#839496");
term_.prefs_.set('color-palette-overrides', [
'#073642',
'#dc322f',