Skip to content

Instantly share code, notes, and snippets.

View jamestong10's full-sized avatar

James jamestong10

View GitHub Profile
@jamestong10
jamestong10 / etc_postfix_main.cf
Created August 26, 2018 15:36
Postfix Settings
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
@jamestong10
jamestong10 / set timezone
Last active July 3, 2018 14:07
code for wordpress
$ sudo dpkg-reconfigure tzdata
163nvren.com
360doc.com
7jiu.com.hk
a-gui.com
aboutfighter.com
apple01.net
appnews.fanswong.com
asia01.club
axn2000.blogspot.*
babymaycry.com
if (site_request.sessionCountViews == 6) {
fbq('track', "ViewContent", {
sessionCountViews: site_request.sessionCountViews,
});
}
@jamestong10
jamestong10 / database.yml
Created June 9, 2017 13:14
rails postgresql database setting
default: &default
host: localhost
encoding: utf8
adapter: postgresql
pool: 5
timeout: 5000
development:
<<: *default
database: example-develop
def generate_access_token
begin
self.access_token = SecureRandom.hex
end while self.class.exists?(access_token: access_token)
end
@jamestong10
jamestong10 / .gitignore
Last active July 30, 2017 19:05
redmine configurations on v.3.3-stable
#----------------------------------------------------------------------------
# Ignore these files when committing to a git repository.
#
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
# The original version of this file is found here:
# https://github.com/RailsApps/rails-composer/blob/master/files/gitignore.txt
#
# Corrections? Improvements? Create a GitHub issue:
# http://github.com/RailsApps/rails-composer/issues
@jamestong10
jamestong10 / bash_env.sublime-snippet
Last active November 28, 2016 03:51
Sublime Text 3 Snippets
<snippet>
<content><![CDATA[
#!/bin/bash
]]></content>
<tabTrigger>bash</tabTrigger>
<!-- <scope>source.python</scope> -->
</snippet>
@jamestong10
jamestong10 / railscasts_chef-solo_bootstrap_ubuntu.sh
Last active September 23, 2016 03:22
Bootstrap Ruby and Chef-Solo for Ubuntu 14.04.5 LTS 64 bit
#!/usr/bin/env bash
apt-get -y update
dpkg-reconfigure tzdata
# Install dependencies
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev libcurl4-openssl-dev curl
# Make
$("#CardHolderTemp").val("James");
$("#CardNoPart1").val("4311");
$("#CardNoPart2").val("9522");
$("#CardNoPart3").val("2222");
$("#CardNoPart4").val("2222");
$("#CreditMM").val("03");
$("#CreditYY").val("19");
$("#CreditAuth").val("222");
$("#CellPhoneCheck").val("");
$("#CreditPaySubmit").click();