Skip to content

Instantly share code, notes, and snippets.

@raarellano
raarellano / bash.rc
Last active April 17, 2021 15:50
pg_restore from Heroku
pg_restore --verbose --clean --no-acl --no-owner -U {user} -h {host} -d {database_name} -p {port} {file_name}
@raarellano
raarellano / doc.md
Last active April 9, 2024 19:44
Python-SPSS Scripting

Python-SPSS Scripting

The following documentation provides samples and instructions on how to get a Python script working with SPSS.

Standalone Scripts

Scripts can be ran outside of the SPSS GUI through the command prompt by using Modeler Batch/Clemb. Standalone scripts can also be ran through the SPSS GUI using standalone script. Tools > Standalone Script

Running a script using Clemb

Modeler Batch or Clemb is included with Modeler Client. It is not a separate install. If you have Modeler client you can use the clemb.exe that is in the bin folder and run against the local server. You can find the executable here: <path to spss program directory>\Modeler\18.0\bin\clemb.exe

@raarellano
raarellano / bash.rc
Last active March 24, 2016 18:47
Git Useful commands
Delete remote
git push origin --delete <branchName>
Pull from new remote branch
git branch --set-upstream-to=origin/branch_name
Push to new remote branch
git push --set-upstream origin branch_name
@raarellano
raarellano / bash.rc
Created September 18, 2015 20:15
Reprocess images for paperclip
User.find_each { |u| u.avatar.reprocess! }
@raarellano
raarellano / README.markdown
Last active October 10, 2016 20:58
Setup automated backup scripts

Setup folder structure

$ sudo su postgres

$ cd ~

$ mkdir -p backups/{daily,weekly,monthly,yearly} scripts

Install and Configure AWS

@raarellano
raarellano / bash.rc
Created September 11, 2015 14:47
Usefull Server Commands
Unicorn stop/start/restart:
/etc/init.d/unicorn_myapp stop
Nginx:
sudo service nginx start
@raarellano
raarellano / gist:eaf3a12aa53e640fcb38
Created August 17, 2015 22:32
Reprocess paperclip images
User.find_each { |u| u.avatar.reprocess! }
@raarellano
raarellano / README.markdown
Created August 14, 2015 16:37
Gibbon 1.1.5 Documentation

gibbon

Gibbon is an API wrapper for MailChimp's Primary and Export APIs.

Build Status Dependency Status ##Important Notes

Gibbon now targets MailChimp API 2.0, which is substantially different from API 1.3. Please use Gibbon 0.4.6 if you need to use API 1.3.

@raarellano
raarellano / rails_runner
Created May 27, 2015 13:16
Run a ruby file on production
bin/bundle exec rails runner -e production "eval(File.read 'file.rb')"
@raarellano
raarellano / batch
Created May 20, 2015 01:43
Usefull curl commands
#Post
curl -i -X POST -d paramater1="1" -d paramater2="ABC" http://api.example.com/resource