Force downgrade to rubygems 1.8
rvm rubygems latest-1.8 --force
Setup the MySQL database and user
Start the server:
./script/app start
#! /usr/bin/ruby | |
require 'socket' | |
# use printer IP address here | |
sock = TCPSocket.new('000.000.000.000', '9100') | |
# Start | |
sock.write "\u{001B}%-12345X@PJL\n" | |
# commands |
# Count the number of rows in csv files not counting the header row | |
# (assuming the header has a column named "header_col") | |
cat *.csv | grep -w "header_col" -c -v | |
# recursive | |
find `pwd` | xargs cat | grep -w "user_id" -c -v | |
# also listing files in order | |
ls -lR --group-directories-first |
git stash list | awk '{b= gensub(" ", "_", "g", $0); system("git stash show -p " substr($1, 0, length($1)-1) " > ~/Desktop/" b ".diff")}' |
Force downgrade to rubygems 1.8
rvm rubygems latest-1.8 --force
Setup the MySQL database and user
Start the server:
./script/app start
# See http://webcheatsheet.com/SQL/mysql_backup_restore.php | |
# Backup | |
mysqldump -u user -pMyPassword databasename > databasename.sql | |
# Restore | |
# http://www.thegeekstuff.com/2008/09/backup-and-restore-mysql-database-using-mysqldump/ | |
# Drop the existing table | |
# Create the table |
;; Configure emacs | |
;; Set font | |
;; http://askubuntu.com/questions/23603/how-to-change-font-size-in-emacs | |
(set-face-attribute 'default nil :height 120) | |
;; disable splash screen | |
(load "~/elisp/autoloads" 'install) | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. |
:: Fix based on http://qt-project.org/forums/viewthread/13963 | |
C:\Qt\Qt5.2.1\5.2.1\msvc2012_64_opengl\bin\dumpcpp.exe "C:\Program Files\SolidWorks Corp\SolidWorks\sldworks.tlb" -n SWK -o sldworks | |
C:\Qt\Qt5.2.1\5.2.1\msvc2012_64_opengl\bin\dumpcpp.exe "C:\Program Files\SolidWorks Corp\SolidWorks\swconst.tlb" -n SWK -o sldconst |
# http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/ | |
@@echo off | |
CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /x64 | |
set QTDIR=C:\Qt\5.2.1 | |
set PATH=%QTDIR%\bin;C:\Qt\qt-creator-opensource-src-3.0.1\bin;C:\Qt\jom;C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin;%PATH% | |
set QMAKESPEC=win32-msvc2010 | |
cd C:\Qt\5.2.1 | |
cmd | |