Skip to content

Instantly share code, notes, and snippets.

@fhefh2015
fhefh2015 / tuchuang.html
Created December 3, 2016 10:15 — forked from c93614/tuchuang.html
围脖是个好图床, great tools for image upload
<!DOCTYPE HTML>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<title>围脖是个好图床</title>
<style type="text/css" media="screen">
*{
margin:0;padding:0;
font-family:arial, sans-serif;
color:#222;
@fhefh2015
fhefh2015 / requirements.txt
Created December 13, 2016 12:53 — forked from mrluanma/requirements.txt
Python 登录新浪微博(requests 真的比 urllib2 强了 2^^32 倍 pip install requests)
requests==2.4.3
rsa==3.1.4
@fhefh2015
fhefh2015 / autoplay-audio-ios.html
Created December 20, 2016 08:51 — forked from ufologist/autoplay-audio-ios.html
在 iOS 微信浏览器中自动播放 HTML5 audio(音乐) 的正确方式
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>Auto play html audio in iOS WeChat InAppBrowser the right way</title>
</head>
<body>
<h1>在 iOS 微信浏览器中自动播放 HTML5 audio(音乐) 的正确方式</h1>
<p>核心原理: 在微信的JS-API 中 play 一下 audio 即可达到自动播放的目的(应该是微信自己做了处理)</p>
@fhefh2015
fhefh2015 / Laravel_validation.php
Created December 20, 2016 09:36
Localization Validation Message For Chineses With Laravel 5
<?php
return [
'unique' => ':attribute 已存在',
'accepted' => ':attribute 是被接受的',
'active_url' => ':attribute 必须是一个合法的 URL',
'after' => ':attribute 必须是 :date 之后的一个日期',
'alpha' => ':attribute 必须全部由字母字符构成。',
'alpha_dash' => ':attribute 必须全部由字母、数字、中划线或下划线字符构成',

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X

@fhefh2015
fhefh2015 / gist:4a9b883ebda55b692f3193839504bc8f
Created February 22, 2017 14:14 — forked from ptigas/gist:2820165
linked list implementation in python
class Node :
def __init__( self, data ) :
self.data = data
self.next = None
self.prev = None
class LinkedList :
def __init__( self ) :
self.head = None
@fhefh2015
fhefh2015 / wechat-imagePreview.js
Last active February 23, 2017 02:32 — forked from loo2k/wechat-imagePreview.js
调用微信内置图片查看
/**
* 方法1
* 调用微信内置浏览器查看图片功能
* current - 查看图片的 url
* urls - 查看图片 url 集合
*/
function imagePreview(current, urls) {
// 解析相对路径
var anchor = document.createElement('a');
@fhefh2015
fhefh2015 / nonchoppybluetooth
Created March 17, 2017 08:32 — forked from dictvm/nonchoppybluetooth
Okayish Bluetooth configuration for OS X El Capitan to work with Bose Soundlink Mini 2
{
"Apple Bitpool Max (editable)" = 80;
"Apple Bitpool Min (editable)" = 35;
"Apple Initial Bitpool (editable)" = 35;
"Apple Initial Bitpool Min (editable)" = 53;
"Negotiated Bitpool" = 80;
"Negotiated Bitpool Max" = 80;
"Negotiated Bitpool Min" = 80;
}
@fhefh2015
fhefh2015 / CopyUtils.java
Created October 30, 2017 10:23 — forked from binjoo/CopyUtils.java
JAVA:复制文件和文件夹
package com.utils;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
/***
*
* @ClassName CopyUtils
@fhefh2015
fhefh2015 / RandomValidateCode.java
Created January 10, 2018 15:51 — forked from oakhole/RandomValidateCode.java
生成随机验证码
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.util.Random;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;