Skip to content

Instantly share code, notes, and snippets.

Alex Huang FiveYellowMice

Block or report user

Report or block FiveYellowMice

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View jquery-s2t.min.js
!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("万与丑专业丛东丝丢两严丧个丬丰临为丽举么义乌乐乔习乡书买乱争于亏云亘亚产亩亲亵亸亿仅从仑仓仪们价众优伙会伛伞伟传伤伥伦伧伪伫体余佣佥侠侣侥侦侧侨侩侪侬俣俦俨俩俪俭债倾偬偻偾偿傥傧储傩儿兑兖党兰关兴兹养兽冁内冈册写军农冢冯冲决况冻净凄凉凌减凑凛几凤凫凭凯击凼凿刍划刘则刚创删别刬刭刽刿剀剂剐剑剥剧劝办务劢动励劲劳势勋勐勚匀匦匮区医华协单卖卢卤卧卫却卺厂厅历厉压厌厍厕厢厣厦厨厩厮县参叆叇双发变叙叠叶号
View fym-short-url.js
#!/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...");
View elements-and-principles.md

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 )
View fym-short-url.lua
#!/usr/bin/env lua
local website = "https://fiveyellowmice.com"
local mapping = {
home = "/",
about = "/about/",
projects = "/projects/",
newstyle = "/newstyle/",
search = "/search/",
posts = "/posts/",
View annotation.md

What + Why + When + What effect = Annotaion

View yoitsuhorobot.service
[Unit]
Description=Run Yoitsu Horo bot once
[Service]
Type=oneshot
WorkingDirectory=/home/alex/Projects/yoitsuhorobot
ExecStart=/home/alex/Projects/yoitsuhorobot/yoitsuhorobot.sh
View horo-poi.php
<?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 Nov 26, 2016
Automatically delete old screenshots. Run as a systemd timer or cron job.
View delete-old-screenshots.rb
#!/usr/bin/env ruby
SCREENSHOTS_DIR = ENV['SCREENSHOTS_DIR'] ||
ENV['HOME'] + '/Pictures/Screenshots'
MAXIMUM_TIME = ENV['MAXIMUM_TIME'] ||
60 * 60 * 24 # 1 day
#######################################
#
View horospeak.rb
#!/usr/bin/env ruby
# frozen_string_literal: true
class HoroSpeak
attr_accessor :debug_mode
View ruby-1.9.3-openssl-sslv3-patch.patch
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb
index 8c04cb5..132d803 100644
--- a/ext/openssl/extconf.rb
+++ b/ext/openssl/extconf.rb
@@ -104,6 +104,9 @@
have_func("SSLv2_method")
have_func("SSLv2_server_method")
have_func("SSLv2_client_method")
+have_func("SSLv3_method")
+have_func("SSLv3_server_method")
You can’t perform that action at this time.