Skip to content

Instantly share code, notes, and snippets.

View mindcont's full-sized avatar
🎯
Focusing

Apes mindcont

🎯
Focusing
View GitHub Profile
@mindcont
mindcont / ga.py
Last active August 12, 2016 05:25
利用基因遗传算法中进行文本匹配
"""Genetic Algorithmn Implementation
"""
#引入随机函数
import random
#定义基因遗传算法顶层接口
class GeneticAlgorithm(object):
# 定义算法初始化
def __init__(self, genetics):
@mindcont
mindcont / adbwifi.sh
Created February 24, 2017 01:47 — forked from stormzhang/adbwifi.sh
shell script for adb wifi
#!/bin/bash
#Modify this with your IP range
MY_IP_RANGE="192\.168\.1"
#You usually wouldn't have to modify this
PORT_BASE=5555
#List the devices on the screen for your viewing pleasure
adb devices
@mindcont
mindcont / phpmyadmin-connect-remote-mysql.md
Last active April 11, 2017 03:01
本地 phpmyadmin 连接远程数据库 local phpmyadmin connect remote mysql database

1.屏蔽本地连接

ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1

run the command vim /etc/mysql/my.cnf.
comment bind-address = 127.0.0.1 using the # symbol.
restart your mysql server once.

2.远程访问权限

@mindcont
mindcont / nginx-php-mysql-install.md
Last active April 27, 2017 07:20
nginx、php7、mysql 安装指南

nginx

To add NGINX yum repository, create a file named /etc/yum.repos.d/nginx.repo and paste one of the configurations below:

CentOS:

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
@mindcont
mindcont / openwrt-upgrade.sh
Created May 4, 2017 12:58
upgrade software in openwrt
#!/bin/sh
opkg update
for ipk in $(opkg list-upgradable | awk '$1!~/^kmod|^Multiple/{print $1}'); do
opkg upgrade $ipk
done
@mindcont
mindcont / ubuntu-remove-gui.md
Created May 20, 2017 01:43
ubuntu如何卸载图形界面

ubuntu如何卸载图形界面

方法

直接卸载界面

sudo apt-get remove unity

但是这样做依赖的包还在,而且万一以后要用到桌面又很麻烦了,不是很好的办法。

个人觉得比较好的办法是开机不进入图形界面而是直接进入命令行

# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@mindcont
mindcont / uss-enterprise-space-cruiser-sheet.md
Last active September 5, 2017 07:58
uss enterprise space cruiser sheet

U.S.S. Enterprise Space Cruiser

Summary:

THE VESSEL

美国企业号是宇宙飞船,官方名称是“星舰”。比现在的海军巡洋舰有点大,它是Starfleet服务中规模最大,最现代化的船只。它有一个430人的船员,其中约三分之一是女性。

The U.S.S. Enterprise is a spaceship, official designation "starship." Somewhat larger than a present-day naval cruiser, it is the largest and most modern type vessel in the Starfleet Service. It has a crew of 430 persons, approximately one-third of them female.

@mindcont
mindcont / emoji.md
Created August 16, 2017 11:24 — forked from hustcc/emoji.md
emoji-preview

Emoji表情

将对应emoji表情的符号码复制后输入你的markdown文本即可显示emoji表情。 如:blush:,显示为:blush:

人物

syntax preview syntax preview syntax preview
:bowtie: :bowtie: :smile: 😄 :laughing: 😆
@mindcont
mindcont / ffmpeg.md
Created November 18, 2017 06:57 — forked from v5tech/ffmpeg.md
ffmpeg视频合并、格式转换、截图

使用ffmpeg合并MP4文件

ffmpeg -i "Apache Sqoop Tutorial Part 1.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i "Apache Sqoop Tutorial Part 2.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "Apache Sqoop Tutorial Part 3.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate3.ts
ffmpeg -i "Apache Sqoop Tutorial Part 4.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate4.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|intermediate3.ts|intermediate4.ts" -c copy -bsf:a aac_adtstoasc "Apache Sqoop Tutorial.mp4"