Skip to content

Instantly share code, notes, and snippets.

View belmer's full-sized avatar

Belmer Salonoy belmer

View GitHub Profile
@belmer
belmer / gist:3791673
Created September 27, 2012 01:30 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@belmer
belmer / FogBugz_connection
Last active December 22, 2015 00:29
FogBugz Migration Notes
Connection string setup
--------------------------------------
32-bit server or 64-bit
HKEY_LOCAL_MACHINE\SOFTWARE\Fog Creek Software\FogBugz\[your FogBugz install directory]\
64-bit server with FogBugz running in 32-bit mode
HKEY_LOCAL_MACHINE\Wow6432Node\SOFTWARE\Fog Creek Software\FogBugz[your FogBugz install directory]\
MYSQL Versions
--------------------------------------
@belmer
belmer / gist:6462894
Created September 6, 2013 12:05
MySQL Commands
backup: # mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql
restore:# mysql -u root -p[root_password] [database_name] < dumpfilename.sql
@belmer
belmer / MySQL Server Management
Created October 9, 2013 06:19
MYSQL Server Management
### Reset MYSQL server on Windows
net stop MySQL
net start MySQL
@belmer
belmer / gist:8748764
Last active August 29, 2015 13:55 — forked from lesterjude/direct_call
Direct Call Logic

##Direct Call Logic

Description:

  1. Caller calls a drumbi phone number.
  2. Controller requests for WS to check if Caller ID has called before or first time.
  3. If Caller ID called first time :
    - Check if Drumbi phone is from Web App, play busy recording then update session to spam.
    - Check if Drumbi phone is from other app, then play the connected_caller event recording.
  1. If Caller ID has called before :
@belmer
belmer / gist:8764833
Last active August 4, 2016 03:13
Fixing the Font Awesome WOFF 404 Error under ASP.NET MVC

The solution for this is to add the following segment to the WebServer section of your web.config:

  <staticContent>
    <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
  </staticContent>

This configures IIS to understand that there is a woff mime type that it should care about, which magically makes the 404 go away.

If you get a 500 Internal Server Error due to there already being a mime map for .woff you can add a remove tab before adding the new mimeMap, like so:

aptitude install -y git curl python-dev python-pip redis-server ruby1.9.1-full rubygems1.9.1
aptitude install -y mysql-server libmysqlclient-dev
adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/git git
adduser --disabled-login --gecos 'gitlab system' gitlab
usermod -a -G git gitlab
su - gitlab
ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa
aptitude install gitolite
cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub
su - git
@belmer
belmer / gist:9724899c62e0f7c1322b
Last active August 29, 2015 14:02
google map api v3 drawing
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="UTF-8">
<title>Drawing Tools</title>
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false&libraries=drawing"></script>
<style type="text/css">
#map, html, body {
@belmer
belmer / React debug setState() warning
Last active February 24, 2016 01:51
React debug setState() warning
Paste this on your browser console and navigate to routes without refreshing your browser.
Once this is inplace whenever you get Warning on setState() it should give you the stack trace.
var warn = console.warn;
console.warn = function(warning) {
if (/(setState)/.test(warning)) {
throw new Error(warning);
}
warn.apply(console, arguments);
};
Sometimes there are modules that you created or you forked from other developer and you modify it to fit your needs.
I was on same exat scenario. The steps below will guide you on how to install modules in your application using link from github.
*Steps
1. Login to your github account
2. Go to your module repository
3. On your repository page there should be a button "Download ZIP".
--- Note: Others suggested that you can just copy the "https" or "ssh" link and do "npm install git+<https/ssh link>".
However this does not worked for me. Going back to "Download ZIP" button. Right click it and "Copy Link Address" (Im using chrome browser by the way).
4. Before you do an npm install make sure you change some parts of your link.