# https://unix.stackexchange.com/questions/5010/how-can-i-count-the-number-of-different-characters-in-a-file
# works for linux. There is a variation for MacOS in the link ^
sed 's/\(.\)/\1\n/g' text.txt | sort | uniq -c # sort -nr # uncomment this to sort the list by frequency
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Author: Eric Pruitt (http://www.codevat.com) | |
| # License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause) | |
| # Description: This Makefile is designed to create a statically linked nginx | |
| # binary without any dependencies on the host system's version of glibc. | |
| NGINX_VERSION=1.15.0 | |
| OPENSSL_VERSION=1.0.2o | |
| PCRE_VERSION=8.42 | |
| ZLIB_VERSION=1.2.11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/swift | |
| // DISCLAIMER | |
| // This script modifies an unencrypted file associated with the trial version of Final Cut Pro. | |
| // Under the DMCA (17 U.S.C. § 1201), this modification does not qualify as circumvention of a technological | |
| // protection measure (TPM), as it does not involve bypassing encryption, authentication, or similar protections. | |
| // Distributing this code is therefore legal under the DMCA. | |
| // This script is intended for educational and research purposes, such as exploring trial-related file structures, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| export http_proxy=http://127.0.0.1:8080 | |
| export https_proxy=http://127.0.0.1:8080 | |
| export CC=clang | |
| export CXX=clang++ | |
| # git init | |
| git config --global user.name 'docker' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| char *user_country_name = ""; // [MOD] | |
| module_param_named(cn, user_country_name, charp, S_IRUGO); // [MOD] | |
| MODULE_PARM_DESC(cn, "Country Name"); // [MOD] | |
| static int __ath_regd_init(struct ath_regulatory *reg) | |
| { | |
| struct country_code_to_enum_rd *country = NULL; | |
| u16 regdmn; | |
| if (!reg) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ps4原生支持推送twitch直播 要转发b站 实现思路非常简单 | |
| 1. 修改路由器劫持流到本地 | |
| 2. 推送流到b站 | |
| 第一步可以通过两种方法实现 | |
| 1. 路由器iptable修改 | |
| 熟悉dd-wrt或者open-wrt的都很好操作,推送端口为1935, 只要把所有twitch的ip段导向到本地就行了 | |
| 把1.1.1.109改成你本地的rtmp服务器ip就行(路由器或者pc) | |
| iptables -t nat -A PREROUTING -d 103.53.48.0/23 -p tcp --dport 1935 -j DNAT --to-destination 1.1.1.109:1935 | |
| iptables -t nat -A POSTROUTING -j MASQUERADE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require_relative 'boot' | |
| require_relative 'rails_initializable_hack' | |
| require 'rails/all' | |
| # Require the gems listed in Gemfile, including any gems | |
| # you've limited to :test, :development, or :production. | |
| Bundler.require(*Rails.groups) | |
| module Rails5NewDemo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * CloudFare IP list: https://www.cloudflare.com/ips/ | |
| * Google's IP addresses: | |
| nslookup -q=TXT _netblocks.google.com 8.8.8.8 | |
| nslookup -q=TXT _netblocks2.google.com 8.8.8.8 | |
| nslookup -q=TXT _netblocks3.google.com 8.8.8.8 | |
| Each of the above line will display a CIDR block or Google’s IP addresses. | |
| * Amazon IP addresses: https://ip-ranges.amazonaws.com/ip-ranges.json |
# wget https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7.3-x86_64/pgdg-redhat96-9.6-3.noarch.rpm
# rpm -ihv pgdg-redhat96-9.6-3.noarch.rpm
# yum -y install postgresql96-devel postgresql96 postgresql96-contrib
$ gem install pg -- --with-pg-config=/usr/pgsql-9.6/bin/pg_config