Skip to content

Instantly share code, notes, and snippets.

View int64ago's full-sized avatar
🎯
Focusing

Cody Chan int64ago

🎯
Focusing
View GitHub Profile
https://docusaurus.io/
https://docsify.js.org/#/
https://vuepress.vuejs.org/
https://www.gatsbyjs.org/
@int64ago
int64ago / lucky.js
Last active October 14, 2022 06:44
// ==UserScript==
// @name Juejin Lucky
// @namespace http://tampermonkey.net/
// @version 1.0
// @description 从关注 网易云音乐大前端团队 并且在 https://juejin.im/pin/6871042321472421902 沸点下回复的用户中去重后随机抽出 25 个,并分 3 组
// @author Cody
// @match https://juejin.im/pin/6871042321472421902
// @grant none
// ==/UserScript==
@int64ago
int64ago / generate-wildcard-certificate.sh
Created July 11, 2019 10:50 — forked from PowerKiKi/generate-wildcard-certificate.sh
Generate self-signed wildcard SSL certificate for development environment
#!/usr/bin/env bash
# print usage
DOMAIN=$1
if [ -z "$1" ]; then
echo "USAGE: $0 domain.lan"
echo ""
echo "This will generate a non-secure self-signed wildcard certificate for given domain."
echo "This should only be used in a development environment."
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
export default Comp => (
class HOC extends Component {
constructor(props) {
super(props);
this.el = document.createElement('div');
}
componentDidMount() {
2017-02-25 00:16:23,971 fail2ban.actions        [26643]: NOTICE  [sshd] Unban 195.160.180.107
2017-02-25 00:41:38,139 fail2ban.actions        [26643]: NOTICE  [sshd] Unban 195.3.144.213
2017-02-25 00:53:54,827 fail2ban.filter         [26643]: INFO    [sshd] Found 43.245.206.2
2017-02-25 00:53:57,056 fail2ban.filter         [26643]: INFO    [sshd] Found 43.245.206.2
2017-02-25 00:53:57,309 fail2ban.actions        [26643]: NOTICE  [sshd] Ban 43.245.206.2
2017-02-25 01:00:13,207 fail2ban.filter         [26643]: INFO    [sshd] Found 222.34.93.25
2017-02-25 01:00:15,467 fail2ban.filter         [26643]: INFO    [sshd] Found 222.34.93.25
2017-02-25 01:00:15,910 fail2ban.actions        [26643]: NOTICE  [sshd] Ban 222.34.93.25
2017-02-25 01:17:38,694 fail2ban.filter         [26643]: INFO    [sshd] Found 183.136.214.5
@int64ago
int64ago / daily_vnet.py
Last active May 18, 2021 07:26
微林【每日礼包】自动签到脚本
#!/usr/bin/python2
# -*- coding: utf-8 -*-
#
# This's an auto-sign script for vnet.link
# You should install PIL first, for Ubuntu 14.04:
# sudo apt-get build-dep python-imaging python-pip -y && pip install Pillow
#
# 12/3/2016 Cody Chan <int64ago@gmail.com>
# To support me, register from https://vnet.link/?rc=36900
@int64ago
int64ago / compare.js
Created December 29, 2015 06:08 — forked from alexey-bass/compare.js
JavaScript version compare
/**
* Simply compares two string version values.
*
* Example:
* versionCompare('1.1', '1.2') => -1
* versionCompare('1.1', '1.1') => 0
* versionCompare('1.2', '1.1') => 1
* versionCompare('2.23.3', '2.22.3') => 1
*
* Returns:

To install tcptraceroute on Debian/Ubuntu:

$ sudo apt-get install tcptraceroute

To install tcptraceroute on CentOS/REHL, first set up RepoForge on your system, and then:

$ sudo yum install tcptraceroute
* * * * * PHANTOMJS_EXECUTABLE=/usr/local/bin/phantomjs /usr/local/bin/casperjs /var/www/javascript/uat/prime.js 2>&1
@int64ago
int64ago / google_ips
Created June 16, 2015 15:19
Google IPs
74.14.192.0/18
216.58.192.0/19
216.239.32.0/19
64.233.160.0/19
66.249.80.0/20
72.14.192.0/18
209.85.128.0/17
66.102.0.0/20
74.125.0.0/16
64.18.0.0/20