Skip to content

Instantly share code, notes, and snippets.

# 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
@zflat
zflat / altair_help_files.md
Last active December 26, 2015 19:19
Altair Help Locations
  • HyperMesh overview:

[file:///C:/Program%20Files/Altair/12.0/help/hm/hmbat.htm?hypermesh.htm][1]

  • HyperMesh Tutorials

    [file:///C:/Program%20Files/Altair/12.0/help/hm/hmbat.htm?hypermesh_tutorials.htm][2]

  • HyperWorks Desktop Overview:

@zflat
zflat / gist:7117767
Created October 23, 2013 12:30
Reset-postgres-primary-key-sequence
Useful when inserting rows into postres (like when seeding data from a .sql dump) messes up the database.
http://stackoverflow.com/questions/244243/how-to-reset-postgres-primary-key-sequence-when-it-falls-out-of-sync
// Login to psql and run the following
// What is the result?
SELECT MAX(id) FROM your_table;
// Then run...
@zflat
zflat / gist:7076465
Created October 20, 2013 23:08
Git repo from central location
git clone ssh://[email protected]/~/path_to.git
Article at: http://toroid.org/ams/git-central-repo-howto
@zflat
zflat / pg_migrate_steps.sh
Last active March 17, 2022 04:51
Migrate pg dump from Heroku to local sqlite3 development (and beyond)
# Export the Heroku PG database to a local dump file
# https://devcenter.heroku.com/articles/heroku-postgres-import-export#export
heroku pgbackups:capture
curl -o latest.dump `heroku pgbackups:url`
# Install postregs & Setup password
# https://help.ubuntu.com/community/PostgreSQL
# List databases
sudo -u postgres psql -l
@zflat
zflat / gist:5662984
Created May 28, 2013 14:04
pass errors and warnings as reference to OLE server
def wrapper_for_operation
e = AsRefArg::new_obj
w = AsRefArg::new_obj
instance.call_operation(args, e, w)
parse_error_warnings(*WIN32OLE::ARGV[1..2])
end
def parse_error_warnings(e, w)
# handle e and w args
@zflat
zflat / note_for_locking
Created April 3, 2012 15:04
rails with_lock
see http://guides.rubyonrails.org/3_2_release_notes.html
This makes it possible to write the following:
class Order < ActiveRecord::Base
def cancel!
transaction do
lock!
# ... cancelling logic