Skip to content

Instantly share code, notes, and snippets.

View stefanjudis's full-sized avatar
🙉
Jo!

Stefan Judis stefanjudis

🙉
Jo!
View GitHub Profile
@stefanjudis
stefanjudis / transaction.sql
Created September 4, 2012 10:01
SQL safe execution
START TRANSACTION;
(SQL BLA BLA)
COMMIT;
@stefanjudis
stefanjudis / payload.json
Created June 6, 2013 13:32
Payload cushion-cli
{
"payload": {
"id":7840145,
"repository":{
"id":510697,
"name":"cushion-cli",
"owner_name":"stefanjudis",
"url":"https://github.com/stefanjudis/cushion-cli"
},
"number":"129",
@stefanjudis
stefanjudis / postgresCommands.txt
Created June 6, 2013 17:21
Postgres Handling
# get table schema
\d+ travalizit_builds
# list tables in database
\dt
# example insert query for /builds POST
INSERT INTO travalizit_builds VALUES('7840176','510697','129','1','2013-06-06T13:09:41Z','2013-06-06T13:11:05Z','-1','NULL','node_js','2013-06-06T13:11:05Z','174','-1','NULL','-1','-1','NULL')
# execute local script on heroku db
# Remove old local branches and sync with remote
git remote prune origin
@stefanjudis
stefanjudis / .travis.yml
Created June 6, 2013 20:32
FollowerPower
notifications:
webhooks: http://limitless-badlands-1553.herokuapp.com/builds
# connect to heroku postgres database
heroku pg:psql HEROKU_POSTGRESQL_VIOLET_URL
@stefanjudis
stefanjudis / ellipcis.css
Created June 9, 2013 09:06
Overflow ellipsis
.ellipsis {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
@stefanjudis
stefanjudis / builds.json
Created July 5, 2013 14:38
Response builds endpoint
[
{
"id" : 8746364,
"repository_id":1010289,
"number":"24",
"state":"finished",
"result":0,
"started_at":"2013-07-04T21:02:02Z",
"finished_at":"2013-07-04T21:05:58Z",
"duration":440,
@stefanjudis
stefanjudis / detailedMetrics.js
Created November 10, 2013 14:39
Chrome snippet to show performance of document
javascript:( function() {
console.group( 'Performance Information for all entries of ' + window.location.href );
console.log( '\n-> Duration is displayed in ms\n ' )
var entries = window.performance.getEntries();
entries = entries.sort( function( a, b ) {
return b.duration - a.duration;
} );
* requests: 35
* gzipRequests: 6
* postRequests: 0
* httpsRequests: 0
* redirects: 0
* notFound: 0
* timeToFirstByte: 764
* timeToLastByte: 782
* bodySize: 554164
* contentLength: 1926185