Skip to content

Instantly share code, notes, and snippets.

View FiveYellowMice's full-sized avatar
:electron:
Reluctantly relying on Electron

Alex Huang FiveYellowMice

:electron:
Reluctantly relying on Electron
View GitHub Profile
!function(t){function e(t,e){var n,i,u,f,o,c,l,d=""
if(e?(c=r,l=a):(c=a,l=r),"string"!=typeof t)return t
for(n=0;n<t.length;n++)i=t.charAt(n),u=t.charCodeAt(n),f=u>13312&&40899>u||u>63744&&64106>u,f?(o=c.indexOf(i),d+=-1!==o?l.charAt(o):i):d+=i
return d}function n(t,i,r){var a,u
if(i instanceof Array)for(a=0;a<i.length;a++)n(t,i[a],r)
else u=t.getAttribute(i),""!==u&&null!==u&&t.setAttribute(i,e(u,r))}function i(t,r){var a,u
if(1===t.nodeType)for(u=t.childNodes,a=0;a<u.length;a++){var f=u.item(a)
if(1===f.nodeType){if(-1!=="|BR|HR|TEXTAREA|SCRIPT|OBJECT|EMBED|".indexOf("|"+f.tagName+"|"))continue
n(f,["title","data-original-title","alt","placeholder"],r),"INPUT"===f.tagName&&""!==f.value&&"text"!==f.type&&"hidden"!==f.type&&(f.value=e(f.value,r)),i(f,r)}else 3===f.nodeType&&(f.data=e(f.data,r))}}var r=new String("万与丑专业丛东丝丢两严丧个丬丰临为丽举么义乌乐乔习乡书买乱争于亏云亘亚产亩亲亵亸亿仅从仑仓仪们价众优伙会伛伞伟传伤伥伦伧伪伫体余佣佥侠侣侥侦侧侨侩侪侬俣俦俨俩俪俭债倾偬偻偾偿傥傧储傩儿兑兖党兰关兴兹养兽冁内冈册写军农冢冯冲决况冻净凄凉凌减凑凛几凤凫凭凯击凼凿刍划刘则刚创删别刬刭刽刿剀剂剐剑剥剧劝办务劢动励劲劳势勋勐勚匀匦匮区医华协单卖卢卤卧卫却卺厂厅历厉压厌厍厕厢厣厦厨厩厮县参叆叇双发变叙叠叶号
@FiveYellowMice
FiveYellowMice / fym-short-url.js
Last active February 21, 2016 07:00
https://fivy.ml USED TO powered by
#!/usr/bin/env node
const http = require("http");
const url = require("url");
const fs = require("fs");
const yaml = require("js-yaml");
var server = http.createServer(recievedRequest);
server.listen(8063, "::1", function() {
console.log("Start serving...");

Elements and Principles of Design

The elements of design are the marks we make on a page, and they are the starting point for creating designs in an infinite number of ways, either by hand or with a computer. Before we can analyze the work by past and present professionals, we need to understand the design elements as they enable us to evaluate the effectiveness of any example of visual communication and design.

Elements Principles
Point Figure-ground
Line Contrast
Shape Balance ( Symmetrical / Asymmetrical )
Form Pattern ( Repetition / Alternation )
#!/usr/bin/env lua
local website = "https://fiveyellowmice.com"
local mapping = {
home = "/",
about = "/about/",
projects = "/projects/",
newstyle = "/newstyle/",
search = "/search/",
posts = "/posts/",

What + Why + When + What effect = Annotaion

[Unit]
Description=Run Yoitsu Horo bot once
[Service]
Type=oneshot
WorkingDirectory=/home/alex/Projects/yoitsuhorobot
ExecStart=/home/alex/Projects/yoitsuhorobot/yoitsuhorobot.sh
<?php
/**********************************
The MIT License (MIT)
Copyright (c) 2016 FiveYellowMice
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
@FiveYellowMice
FiveYellowMice / delete-old-screenshots.rb
Created November 26, 2016 05:28
Automatically delete old screenshots. Run as a systemd timer or cron job.
#!/usr/bin/env ruby
SCREENSHOTS_DIR = ENV['SCREENSHOTS_DIR'] ||
ENV['HOME'] + '/Pictures/Screenshots'
MAXIMUM_TIME = ENV['MAXIMUM_TIME'] ||
60 * 60 * 24 # 1 day
#######################################
#
#!/usr/bin/env ruby
# frozen_string_literal: true
class HoroSpeak
attr_accessor :debug_mode
@FiveYellowMice
FiveYellowMice / idc_chicories.rb
Created February 9, 2017 11:19
IDCChicories plugin for HoroBot2
# frozen_string_literal: true
require 'active_support/core_ext/numeric/time'
class HoroBot2::Plugins::IDCChicories < HoroBot2::Plugins::Base
RECEIVE_ONLY_WHEN_MATCH = /(?<!\w)(?:线路|骨干网|教育网|数据中心|線路|骨幹網|教育網|數據中心|IDC|BGP|OVH|AnyCast|NTT|QoS|PCCW|IMS|TEA|Cogent|[a-z]{2,3}NET|GRX|IPX|TFN|CN2|CERNET|[a-z]{2}IX|[EG]PON)(?!\w)/i
MESSAGE = "\u{1f31a} IDC 大佬们又要开始谈笑风生了。"