Skip to content

Instantly share code, notes, and snippets.

View cchitsiang's full-sized avatar
💭
🤖 AI & the Future of Work | 🏗️ Software Architecture & Design

Chew Chit Siang cchitsiang

💭
🤖 AI & the Future of Work | 🏗️ Software Architecture & Design
  • Kuala Lumpur, Malaysia
  • 17:02 (UTC +08:00)
View GitHub Profile
#!/usr/bin/env ruby
require 'koala' # gem install koala --no-ri --no-rdoc
# create a facebook app and get access token from here
# https://developers.facebook.com/tools/explorer
# select "groups", "photos" when authenticating
oauth_access_token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
group_filtering_words = ['ruby']
image_path = 'image.png' #change to your image path
message = 'My Cool image.' # your message
@cchitsiang
cchitsiang / modifyConnectionStrings.ps1
Created February 25, 2014 01:51 — forked from jwcarroll/modifyConnectionStrings.ps1
Set Connection String Powershell Function Usage: Set-ConnectionString "MyWebApp\app.config" MyConnectionString "Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;" Other Reference for more scenario : http://www.protosystem.net/post/2009/06/01/Using-Powershell-to-manage-application-configuration.aspx
Function Set-ConnectionString{
[CmdletBinding(SupportsShouldProcess=$True)]
Param(
[string]$fileName="app.config",
[string]$connectionStringName,
[string]$connectionString
)
$config = [xml](Get-Content -LiteralPath $fileName)
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql2
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8
;
; "CMD Prompt Here" PowerToy
;
; Copyright 1996 Microsoft Corporation
;
; Modified to launch VS.NET 2010 command prompt 5/6/03 MG
; Modified to launch VS.NET 2012 command prompt 9/4/12 KZU
; Modified to add context menu to a directory background 9/27/12 SinaIRV
[version]
@cchitsiang
cchitsiang / 0_reuse_code.js
Created October 14, 2013 02:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console