Skip to content

Instantly share code, notes, and snippets.

View joshteng's full-sized avatar

Joshua Teng joshteng

View GitHub Profile
@joshteng
joshteng / call.js
Last active December 28, 2015 09:49
call('sip:97158683@shims.starhub.net.sg', {
onAnswer: function() {
say("Hi there! Goodbye.");
}
}
call "97158683", {
:network => "SMS"}
say "Don't forget your meeting at 2 p.m. on Wednesday!"
http://onlinesupport.fujixerox.com/processDriverForm.do;jsessionid=48F6A7AE3E901576D43022BD5EA61823.worker1?ctry_code=ID&lang_code=en&d_lang=en&corp_pid=DPCM305DF&rts=null&model=DocuPrint+CM305+df&type_id=2&oslist=Windows+7+64bit&lang_list=en
@joshteng
joshteng / televate_button_link_integration.html
Last active January 3, 2016 23:19
To integrate Televate on websites via a custom button or link.
@joshteng
joshteng / Propertyplus.html
Created January 23, 2014 10:44
Instructions to integrate Televate using custom button or link
<!--Step One: include this script in your within your html body-->
<script type="text/javascript" src="//app.televate.io/lightbox.js"></script>
<!--Step Two: create a button that will trigger the form-->
<!--use this-->
<a href="#" class="televate-trigger" data-menu-id="l_EKm2ry4Ay-rPNxzF092g">Call Us</a>
<!--or this-->
<button class="televate-trigger" data-menu-id="l_EKm2ry4Ay-rPNxzF092g">Enquiries</button>
@joshteng
joshteng / psql_encoding.markdown
Last active October 31, 2022 19:23 — forked from turboladen/psql_encoding.sql
This solves Postgresql's encoding issue (happened to me when running postgres on my vagrant box) The error happens when trying to create db "rake db:create": Error message: "encoding UTF8 does not match locale en_US; the chosen LC_CTYPE setting requires encoding LATIN1"
sudo su postgres
psql
update pg_database set datistemplate=false where datname='template1';
drop database Template1;
create database template1 with owner=postgres encoding='UTF-8' lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0;
update pg_database set datistemplate=true where datname='template1';
@joshteng
joshteng / Deploying_rails_app.markdown
Last active August 29, 2015 13:57
Manual Server Set Up + Deploy With Capistrano (not working yet)

Download and Install Vagrant http://www.vagrantup.com/ and VirtualBox https://www.virtualbox.org/ or VMware before beginning

#Set up Vagrant *this guide assumes the use of Mac OS X Mountain Lion on local machine and Ubuntu 12.04 LTS x64 on Vagrant box. It is compatible with many other distros but hasn't been tested.

##Step 1: Make and run box

vagrant init
vagrant box add <path to box directory or name according to https://vagrantcloud.com/>
vagrant up

#Setting Up a Ubuntu Machine

####Step 1 Install all dependencies using Laptop by Thoughtbot

bash <(wget -qO- https://raw.githubusercontent.com/thoughtbot/laptop/master/linux) 2>&1 | tee ~/laptop.log

####Step 2 Restart computer

@joshteng
joshteng / dokku_setup.md
Last active May 12, 2022 14:38
Using Dokku to deploy a Rails Application

#Goal Deploy your Rails App super easily with Dokku on Digital Ocean cheap cheap!

##Notes

  • Follow 12 factor design (include the rails_12factor gem)
  • Don't forget your Procfile with the command to start up your application server
  • I prefer using external hosted logging services like Logentries (not in this guide)
  • Set up performance monitoring AppSignal or New Relic (not in this guide)