Skip to content

Instantly share code, notes, and snippets.

@victerryso
victerryso / readme.md
Last active February 22, 2016 03:14
Create SSL Certificate

Create SSH Certificate

Terminal

$ ssh root@000.000.000.000
$ openssl req -newkey rsa:2048 -nodes -keyout domain.key -out domain.csr

Start SSL

@victerryso
victerryso / deploy
Last active January 20, 2016 02:02
Meteor Deploy to Digital Ocean
# Sources
# johngibby.com/blog/How_to_deploy_your_meteor.js_app_on_Digital_Ocean
# stackoverflow.com/questions/20117104/mongodb-root-user
# digitalocean.com
# Create a Digital Ocean Ubuntu 14.04 Droplet
# You'll receive an email with your new IP and Password
# e.g.
# Droplet Name: dropletname
# IP Address: 000.000.000.000
/*
* zClip :: jQuery ZeroClipboard v1.1.1
* http://steamdev.com/zclip
*
* Copyright 2011, SteamDev
* Released under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*
* Date: Wed Jun 01, 2011
*/
[
{
"assessments": [
"participation in online discussion groups (20%)",
" assignment 1 (30%)",
" assignment 2 - case study and analysis (50%) "
],
"category": "Graduate Certificate of Health Science (Developmental Disability)",
"classes": "Online ",
"code": "GSDD5001",
@victerryso
victerryso / extract_images.rb
Last active August 29, 2015 14:21
Extracting Images From DOCX File
require 'zip'
def extract_images(file_path, destination = nil)
destination = File.basename(file_path, '.*') unless destination
file_path = File.join(Dir.pwd, file_path)
Zip::File.open(file_path) do |zip_file|
zip_file.each do |file|
next unless file.name =~ /word\/media/
new_file = File.join(destination, File.basename(file.name))