Skip to content

Instantly share code, notes, and snippets.

View cmd-save's full-sized avatar

Beast Node cmd-save

  • Nature Inc.
  • Earth
View GitHub Profile
@cmd-save
cmd-save / 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 {
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
@cmd-save
cmd-save / 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:

@cmd-save
cmd-save / 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 :
@cmd-save
cmd-save / MySQL Server Management
Created October 9, 2013 06:19
MYSQL Server Management
### Reset MYSQL server on Windows
net stop MySQL
net start MySQL
@cmd-save
cmd-save / 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
@cmd-save
cmd-save / 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
--------------------------------------
@cmd-save
cmd-save / 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