- 浏览: 249759 次
- 性别:
- 来自: 内蒙古
最新评论
-
jiguanghover:
写的不错,收藏一下
Ubuntu下RVM, Ruby, rails安装详细 和 卸载 -
maoghj:
回顾总结(二) -
yun2223:
对楼主表示感谢
Android控件开发之Gallery3D效果 -
zw_lovec:
说清楚点吧 亲 加点注释
out of memory -
lzyfn123:
http://www.iteye.com/images/smi ...
ruby-string 字符串的学习
文章列表
安装包: http://apt.saurik.com/cydia/debs/
安装命令:
dpkg -i cydia_1.1.17.deb
PostgreSql 数据库
-- ===== sql 开始 =====
-- 数据库时区
SHOW timezone;
-- 清空表
TRUNCATE t1 RESTART IDENTITY;
# 查看sql执行过程
EXPLAIN
-- 设置默认值
SELECT COALESCE(NULL, 0);
-- 生成序列 start,stop,step
SELECT generate_series(0,9,1);
-- 时间计算
SELECT now(), now() + (t1.days||' Days')::INTERVAL, ...
MacBook Pro Windows驱动链接
- 博客分类:
- osx系统
MacBook Pro (13-inch, 2016, Four Thunderbolt 3 Ports)
Win8.1 驱动下载链接
http://swcdn.apple.com/content/downloads/28/47/041-88734-A_Q0SKN07BL0/7knxzec1xmojr5x5t7xnu5a4u6lslmlf9v/BootCampESD.pkg
OpenSSL中算法记录
1、证书(X.509证书、PKCS#7证书、PKCS#12证书)
# pfx证书操作
path = Rails.root.join('config/cert/citicpay.pfx')
str = File.open(path).read.encode('utf-8')
str = Base64.decode64(str) rescue str
pfx = OpenSSL::PKCS12.new(str, pass)
{cer: pfx.certificate.to_pem, # X.509证书
key: pfx.key.to_pe ...
前端下载二进制文件
downloadFile =function(data, fileName){
if (!data) {
return
}
let url = window.URL.createObjectURL(new Blob([data]))
let link = document.createElement('a')
link.style.display = 'none'
link.href = url
link.setAttribute('download', fileName)
document.body. ...
参考相关网址:
http://www.jinbuguo.com/openssh/sshd_config.html 中文配置手册
https://help.ubuntu.com/community/SSH/OpenSSH/Configuring#Forwarding openSSH配置
Aliyun OSS 使用 - 图片持久化
参考:aliyun-sdk Ruby版本
uri = URI('https://<bucket>.oss-cn-beijing.aliyuncs.com/img/62ed226d-5673-4e12-8c0a-9734ac570893_02.jpg')
uri.query = 'x-oss-process'
header = {}
header['content-type'] = 'application/x-www-form-urlen ...
# 文档(Apple授权登录)
https://developer.apple.com/documentation/signinwithapplerestapi
# 获取公钥Key接口
https://appleid.apple.com/auth/keys
# 验证客户端发送的authorizationCode接口
https://appleid.apple.com/auth/token
require 'net/https'
require 'jwt'
class AppleAuth
APPLE_ISSUER = 'https://appleid. ...
1、下载golang二进制安装包:
https://studygolang.com/dl?spm=a2c4e.11153940.blogcont645569.15.56f37fb1InYiOF
2、解压安装包到指定目录,此处以解压到/usr/local目录下为例:
tar -C /usr/local -xzf go.linux-amd64.tar.gz
3、在/etc/profile中添加以下内容,设置GO环境变量:
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
export GOPATH=/ho ...
RQRCode插件使用
- 博客分类:
- Ruby on Rails 方面
def config
{
level: :m, # 容错级别
mode: :mode_8bit_byte # 使用模型
}
end
def png_config
{
file: false,
resize_gte_to: false,
resize_exactly_to: false,
fill: 'white',
color: 'black',
b ...
# Charles Proxy License Registered Name: https://zhile.io License Key: 48891cf209c6d32bf4
=> 前端下载图片压缩包
加载js文件:https://github.com/Stuk/jszip/tree/master/dist/jszip.js
打包img文件为blob对象:
var zip = new JSZip()
App = {
saveFilebyBlob: function (content, fileName) {
var aLink = document.createElement('a');
var evt = document.createEvent("HTMLEvents"); ...
主要步骤如下:
<!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->
1、下载 solr (http://lucene.apache.org/solr/);
下载 tomcat(http://tomcat.apache.org/)
下载 java,需要高版本的jdk7+ (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloa ...