Force downgrade to rubygems 1.8
rvm rubygems latest-1.8 --force
Setup the MySQL database and user
Start the server:
./script/app start
#include <stdio.h> | |
#include <stdlib.h> | |
unsigned long bit_sum(unsigned long n) { | |
return n ? (1 + bit_sum(n & (n - 1))) : 0; | |
} | |
void main(int argc, char ** argv) { | |
char * p; | |
long n; |
#! /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 |