Skip to content

Instantly share code, notes, and snippets.

View naoyeye's full-sized avatar
🦾

J.Y Han naoyeye

🦾
View GitHub Profile
@j-iNFINITE
j-iNFINITE / 百度云盘批量转存用户分享
Created February 29, 2016 06:00
百度云盘批量转存用户分享
/**
* 贪灵Gollum for Baiduyun, Ver.3.4.4
* 立即执行函数:百度云盘批量转存用户分享。
*
* 【特点】
* - 可保持或无视原分享者的目录结构。
* - 支持差分转存。
* - 自动分解转存,可突破单次转存总文件数5000的限制。
* - 可在分享主页下,进入某文件夹来转存其下级子文件夹。
* - 支持专辑转存。
@kettuniko
kettuniko / randomcolors.js
Last active October 5, 2023 20:32
Random RGBA colors with javascript
const randomNumber = (min, max) => Math.floor(Math.random() * (max - min + 1) + min);
const randomByte = () => randomNumber(0, 255)
const randomPercent = () => (randomNumber(50, 100) * 0.01).toFixed(2)
const randomCssRgba = () => `rgba(${[randomByte(), randomByte(), randomByte(), randomPercent()].join(',')})`
#!/usr/bin/env python
# To look at: https://github.com/kcrawford/mac-network/blob/master/lib/mac-network/wifi.rb
# To look at: https://stackoverflow.com/questions/28096630/mac-os-x-10-10-reorder-preferred-networks
'''
Playing around with CoreWLAN to return information about the wi-fi connection
Documentation:
https://developer.apple.com/library/mac/documentation/CoreWLAN/Reference/CWInterface_reference/translated_content/CWInterface.html
@chrisb
chrisb / gist:4d6a09c6cc1ca2e1b14e
Last active November 25, 2022 04:15
Homebrew, Ruby, and Rails on OS X 10.10

OS X 10.10 Guide

Here's what I did to get things working.

1. Install Xcode 6

Yep, over at: https://developer.apple.com

2. Install the Command Line Tools (CLT)

@namuol
namuol / INSTALL.md
Last active July 24, 2023 11:53
rage-quit support for bash

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

@justjavac
justjavac / img2txt.js
Last active December 9, 2021 06:46
img2txt:基于canvas的图片转字符画工具
var cv = document.getElementById('cv');
var c = cv.getContext('2d');
var txtDiv = document.getElementById('txt');
var fileBtn = document.getElementById("up-button");
var img = new Image();
img.src = 'a.jpg';
img.onload = init; // 图片加载完开始转换
fileBtn.onchange = getImg;
// 根据灰度生成相应字符
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active June 10, 2024 15:37
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

/**
* scrollTop Module
*
* Just add `totop` as class or attribute to some element.
*
* This used to be plain jQuery, but we are cool now. Sadly, it
* still requires jQuery for the animation.
*
* This even works as a Facebook page, thanks to
* http://stackoverflow.com/a/8130267/1254484
@wilsonjackson
wilsonjackson / candykeys.js
Last active December 17, 2015 02:49
Questing hot keys for Candy Box !
// Automatically creates hot keys for each potion/scroll/magic item you can use in a quest using the
// first available letter in the button's text. Special exclusions are made for keys that are used by
// the game itself — if you don't know why, I won't spoil it for you.
// Hot keys can be enabled or disabled by a button at the top of the page, or by pressing CTRL+K or
// CMD+K.
!function (undefined) {
var enabled = false, bindings = {}, reserved = 'IK';
$.each(potions.list, function (i, potion) {
var text = potion.buttonText,
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 5, 2024 22:16
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: