This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| hdmi_force_edid_audio=1 | |
| decode_MPG2=0x7a641de0 | |
| decode_WVC1=0x47751316 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| stat_summary(aes(label=round(..y..,2)), fun.y=mean, geom="text", size=6, vjust = -0.5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def criteria = Spot.createCriteria() | |
| def result = criteria.list { | |
| eq("slide.id", params.long("id")) | |
| createAlias('layoutSpot', 'lSpot', CriteriaSpecification.LEFT_JOIN) | |
| createAlias('lSpot.sample', 'smpl', CriteriaSpecification.LEFT_JOIN) | |
| projections { | |
| property "id" | |
| property "signal" | |
| property "block" | |
| property "row" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def criteria = SomeDomainClass.createCriteria() | |
| def result = criteria.list { | |
| ... | |
| } | |
| ObjectMapper mapper = new ObjectMapper() | |
| def jsonResult = mapper.writeValueAsString(result) | |
| response.contentType = "text/json" | |
| render jsonResult |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class SecurityTokenService { | |
| def getSecurityToken(SomeDomainClass sdc) { | |
| if(!sdc?.uuid){ | |
| sdc.uuid = UUID.randomUUID().toString() | |
| sdc.save(flush:true) | |
| } | |
| return sdc.uuid | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private def accessAllowed = { securityToken, uuid -> | |
| //check if user is authenticated | |
| if(!springSecurityService.isLoggedIn()){ | |
| //alternatively check if a security token is provided | |
| if(!securityToken || securityToken != uuid){ | |
| return(false) | |
| } | |
| } | |
| return(true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| authenticate <- function(baseUrl="http://localhost:8080/GrailsApp/", user, password, verbose=F){ | |
| require(RCurl) | |
| loginUrl = paste(baseUrl, "login/auth", sep="") | |
| authenticateUrl = paste(baseUrl, "j_spring_security_check", sep="") | |
| cat(paste("trying to authenticate user", user)) | |
| agent="Mozilla/5.0" | |
| #Set RCurl pars | |
| curl = getCurlHandle() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dataSource { | |
| driverClassName = 'com.mysql.jdbc.Driver' | |
| url = 'jdbc:mysql://localhost/miracle' | |
| username = 'miracle' | |
| password = 'rppa4ever' | |
| dbCreate = 'update' | |
| pooled = true | |
| properties { | |
| maxActive = -1 | |
| minEvictableIdleTimeMillis=1800000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| awk -F, '$1 !~ /(^CDS|^UTR3)/' microT_CDS_data.csv > microT_CDS_data.filtered.csv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| EXPECTED_ARGS=3 | |
| E_BADARGS=65 | |
| MYSQL=`which mysql` | |
| Q1="CREATE DATABASE IF NOT EXISTS $1;" | |
| Q2="GRANT USAGE ON *.* TO $2@localhost IDENTIFIED BY '$3';" | |
| Q3="GRANT ALL PRIVILEGES ON $1.* TO $2@localhost;" | |
| Q4="FLUSH PRIVILEGES;" |