Skip to content

Instantly share code, notes, and snippets.

View trandaison's full-sized avatar

Son Tran trandaison

View GitHub Profile
@trandaison
trandaison / after.sh
Created August 30, 2016 16:15 — forked from cluppi/after.sh
Turning SSL on for Homestead
#!/bin/sh
# Config for SSL.
echo "--- Making SSL Directory ---"
mkdir /etc/nginx/ssl
echo "--- Copying $i SSL crt and key ---"
openssl req -nodes -new -x509 -keyout /etc/nginx/ssl/server.key -out /etc/nginx/ssl/server.crt -subj "/C=US/ST=NY/L=NYC/O=Dis/CN=www.example.com"
echo "--- Turning SSL on in nginx.conf. ---"
Atom_backup
package chuong_6;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Iterator;
public class Bai6_3 {
public static void main(String[] args) throws IOException {
<button type="button" name="submit" class="btn-save btn-primary btn">Save</button>
<script>
$(document).ready(function() {
$('.btn-save').on('click', function() {
$.ajax({
type: 'POST',
url: '/workspaces/<%= params[:id] %>',
data: {
_method: "patch",
@trandaison
trandaison / page_load.md
Last active December 22, 2016 09:54
Display Loading Image While Page Loads

#Add the Page Loader Div Add the below div right below the opening tag.

<div class="loader"></div>

#Add some CSS

.loader {
  position: fixed;
 left: 0px;
@trandaison
trandaison / Install Kingsoft Office 2013.md
Last active December 23, 2016 06:22
Install Kingsoft Office 2013 for Linux on Ubuntu 14.04

#Step 1: Remove previous Kingsoft Office package

sudo apt-get purge kingsoft-office

#Step 2: Install Kingsoft Office (64-bit)

sudo dpkg --add-architecture i386
sudo apt-get update
wget kingsoft kdl.cc.ksosoft.com/wps-community/kingsoft-office_9.1.0.4280~a12p4_i386.deb
sudo dpkg -i kingsoft-office_9.1.0.4280~a12p4_i386.deb
@trandaison
trandaison / whenever.md
Last active January 15, 2020 17:08
Simple example about Whenever gem

#Add sidekiq, sinatra and whenever to the Gemfile

gem 'sidekiq'
gem 'sinatra', require: false
gem "whenever", require: false

Then install the gem

$ bundle install
@trandaison
trandaison / nodejs_on_ubuntu.md
Last active March 29, 2017 00:37
Install Nodejs on Ubuntu
sudo apt-get install npm
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/node 

To upgrade to latest version (and not current stable) version, you can use

<html>
<head>
<title>Google Maps Multiple Markers</title>
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
</head>
<body>
<div id="map" style="height: 400px; width: 500px;">
</div>
<script type="text/javascript">
@trandaison
trandaison / starUML.md
Last active May 7, 2024 19:44
Get full version of StarUML