Skip to content

Instantly share code, notes, and snippets.

View ayee's full-sized avatar

Anthony Yee ayee

View GitHub Profile
0. SSH to server
1. Edit /opt/bitnami/apps/jenkins/jenkins_home/config.xml
2. set userSecurity to false: <userSecurity>false</userSecurity>
3. delete
<authorizationStrategy> and <securityRealm>
4. /etc/init.d/bitnami restart
@ayee
ayee / gist:b02f2066d9b3c750acb3
Created May 26, 2015 21:23
Query to pull a dataset of first-hit visits (visit_number=1) with only variables that have been shown with significant influence
select paidlengthofstay, sitecatalyst_narrow.* from customer_sample_null_plos_fix join reservation using (accountorderitemid) join sitecatalyst_narrow on reservation.reservationitemid = sitecatalyst_narrow.purchase_id_int and sitecatalyst_narrow.visit_number = 1 and purchase_id_int is not NULL
@ayee
ayee / Sample Redshift code
Created March 17, 2015 17:43
Sample redshift code to load from JSON file using jsonpaths
### begin Redshift code ###
// get rid of the old stuff
drop table crashyplane;
// create a new table
create table crashyplane (
event varchar(255) not null,
"time" int,
distinct_id varchar(255) distkey sortkey not null,

I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):

Detailed Instructions

For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.

Install Jenkins Plugins

Adding SFTP-only user to Ubuntu Server

To add a SFTP-only user, you'll need to make sure your SSH config settings are correct, add a new user/group and set permissions for your new user. For step-by-step directions, see below. Omit sudo if you're logged in as root.

Directions

  1. Edit /etc/ssh/sshd_config and make sure to add the following at the end of the file:

     Match group filetransfer
    

ChrootDirectory %h