This file contains 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
# Generate a new key | |
openssl genrsa -out server.key 2048 | |
# Generate a new CSR | |
openssl req -sha256 -new -key server.key -out server.csr | |
# Check certificate against CA | |
openssl verify -verbose -CApath ./CA/ -CAfile ./CA/cacert.pem cert.pem | |
# Self Signed |
This file contains 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
import serial | |
import time | |
from messaging.sms import SmsDeliver | |
ser=serial.Serial('/dev/ttyACM0', baudrate=9600, timeout=.1, rtscts=0) | |
def sendCommand(com): | |
ser.write(com+"\r\n") | |
time.sleep(2) | |
ret = [] |
This file contains 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
'use strict' | |
import React, { PropTypes, Component } from 'react' | |
let Fill = ({ | |
start, end, | |
getPositionFromValue | |
}) => | |
<div | |
className='rangeslider__fill' | |
style={{ | |
left: (getPositionFromValue(start) + 10 )+ 'px', |
This file contains 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
export SQOOP_HOME=$HOME/sqoop-1.4.6.bin__hadoop-1.0.0 | |
export PATH=$PATH:$SQOOP_HOME/bin | |
export JAVA_HOME=/usr/java/jdk1.7.0_79 | |
# export JAVA_HOME=/usr/lib64/jvm/java-1.6.0 | |
export HADOOP_INSTALL=$HOME/hadoop-1.2.1 | |
export PATH=$PATH:$HADOOP_INSTALL/bin | |
export PATH=$PATH:$HADOOP_INSTALL/sbin | |
export HADOOP_MAPRED_HOME=$HADOOP_INSTALL | |
export HADOOP_COMMON_HOME=$HADOOP_INSTALL | |
export HADOOP_HDFS_HOME=$HADOOP_INSTALL |
This file contains 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
# Recipe for scala-2.10.4 | |
# brew install https://gist.githubusercontent.com/minhhahl/7d9b8a98f25c9595cb28/raw/fa2363e471d86bef38af38224b36366ac8a6e231/scala-2.10.4.rb --with-docs | |
require 'formula' | |
class ScalaDocs < Formula | |
homepage 'http://www.scala-lang.org/' | |
url 'http://www.scala-lang.org/downloads/distrib/files/scala-docs-2.10.4.zip' | |
sha1 '7ad47f9634fd2f452cadf35f7241102207c1a1cc' | |
end |
This file contains 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
function onOpen() { | |
var ui = SpreadsheetApp.getUi(); | |
ui.createMenu('Custom Menu') | |
.addItem('Update Sheet Name', 'menuUpdateSheetName') | |
.addToUi(); | |
} | |
function menuUpdateSheetName() { | |
var sheets = SpreadsheetApp.getActive().getSheets(); |
This file contains 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/env python | |
# -*- coding: utf-8 -*- | |
"""Chương trình chuyển đổi từ Tiếng Việt có dấu sang Tiếng Việt không dấu | |
Chỉnh sửa từ mã nguồn của anh NamNT | |
http://www.vithon.org/2009/06/14/x%E1%BB%AD-ly-ti%E1%BA%BFng-vi%E1%BB%87t-trong-python | |
""" | |
import re | |
INTAB = "ạảãàáâậầấẩẫăắằặẳẵóòọõỏôộổỗồốơờớợởỡéèẻẹẽêếềệểễúùụủũưựữửừứíìịỉĩýỳỷỵỹđẠẢÃÀÁÂẬẦẤẨẪĂẮẰẶẲẴÓÒỌÕỎÔỘỔỖỒỐƠỜỚỢỞỠÉÈẺẸẼÊẾỀỆỂỄÚÙỤỦŨƯỰỮỬỪỨÍÌỊỈĨÝỲỶỴỸĐ" |
This file contains 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
namespace :account do | |
namespace :setup do | |
desc "Creates deploy user and configures pubkey auth" | |
task :default do | |
create_user_account | |
set_group_membership | |
configure_auth_keys | |
end |