Skip to content

Instantly share code, notes, and snippets.

View marciok's full-sized avatar
🎯
Focusing

Marcio Klepacz marciok

🎯
Focusing
View GitHub Profile
NEW_RELIC_APP_NAME: tolook
NEW_RELIC_LICENSE_KEY: 188e88ac234ec06699b24108534ca71f83693454
NEW_RELIC_LOG: stdout
*************************************************************************
Rails console ENV variable
..."RACK_ENV"=>"production", "NEW_RELIC_LICENSE_KEY"=>"188e88ac234ec06699b24108534ca71f83693454", "RAILS_ENV"=>"production", "NEW_RELIC_APP_NAME"=>"tolook", ....
2013-06-21T00:18:19.626025+00:00 app[web.1]: ** [NewRelic][06/21/13 00:18:19 +0000 e55aba68-4e1a-43d7-8000-9aa362f998d1 (5)] INFO : Starting the New Relic Agent.
2013-06-21T00:18:19.625902+00:00 app[web.1]: ** [NewRelic][06/21/13 00:18:19 +0000 e55aba68-4e1a-43d7-8000-9aa362f998d1 (5)] INFO : Reading configuration from config/newrelic.yml
2013-06-21T00:18:19.627324+00:00 app[web.1]: ** [NewRelic][06/21/13 00:18:19 +0000 e55aba68-4e1a-43d7-8000-9aa362f998d1 (5)] INFO : Environment: production
2013-06-21T00:18:19.627539+00:00 app[web.1]: ** [NewRelic][06/21/13 00:18:19 +0000 e55aba68-4e1a-43d7-8000-9aa362f998d1 (5)] INFO : Connecting workers after forking.
2013-06-21T00:18:19.639433+00:00 app[web.1]: ** [NewRelic][06/21/13 00:18:19 +0000 e55aba68-4e1a-43d7-8000-9aa362f998d1 (5)] INFO : Detected Unicorn, please see additional documentation: https://newrelic.com/docs/troubleshooting/im-using-unicorn-and-i-dont-see-any-data
2013-06-21T00:18:19.627463+00:00 app[web.1]: ** [NewRelic][06/21/13 00:18:19 +0000 e55aba68
require 'net/http'
uri = URI('http://tolook.herokuapp.com/1/looks.json')
10000.times do
Net::HTTP.get(uri)
sleep(5)
p 'One more connection'
end
@marciok
marciok / UIView+Constraints.h
Created December 5, 2013 10:58
A category to help work with constraints. Basically what I did is created getters methods to help retrieve a specific constraint, for example: a tableview bottom constraint without having to connect IBOutlets. It's still pretty basic with only 4 methods: - bottomConstraint - topConstraint - widthConstraint - heightConstraint
//
// UIView+Constraints.h
// Calendar
//
// Created by Marcio Klepacz on 12/3/13.
// Copyright (c) 2013 Any.DO. All rights reserved.
//
#import <UIKit/UIKit.h>
<?php
// Put your device token here (without spaces):
$deviceToken = 'device token';
// Put your private key's passphrase here:
$passphrase = 'pass phrase';
// Put your alert message here:
$message = 'Seeking Alpha';

italics bold bold italic strikethrough

Header 1

Header 2

Header 3

Header 4

Header 5
@marciok
marciok / hannukiah
Created December 16, 2014 23:02
Hanukkiah
//// www.paintcodeapp.com
//// Color Declarations
let outerFlameColor = UIColor(red: 0.941, green: 0.906, blue: 0.572, alpha: 1.000)
let innerFlameColor = UIColor(red: 0.861, green: 0.137, blue: 0.137, alpha: 1.000)
let hanukkiahColor = UIColor(red: 0.455, green: 0.454, blue: 0.452, alpha: 1.000)
//// hanukkiah Drawing
var hanukkiahPath = UIBezierPath()
hanukkiahPath.moveToPoint(CGPointMake(120.5, 699.5))
@marciok
marciok / your-custom-build-script.sh
Created March 5, 2015 17:06
Adding an environment variable before building your app
# 1. Add an enviroment variable on your bundle identifier on Xcode for example:
# com.yourAppName.$(PRODUCT_NAME:rfc1034identifier).${MY_ENV_VARIBLE}.
# 2. You should have a custom build script to execute on travis, so your .travis.yml look like this:
# ....
# script:
# - ./your-custom-build-script.sh
# ....
# 3. Set a value to this variable before your build with travis:
export MY_ENV_VARIBLE="customName"
@marciok
marciok / Podfile
Last active August 29, 2015 14:17
Testing view controllers Podfile example
platform :ios, '8.0'
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'PonyTests', :exclusive => true do
pod 'Nimble', :git => 'https://github.com/Quick/Nimble.git' #, :branch => 'swift-1.1' # if you want to use swift 1.1
pod 'Quick', :git => 'https://github.com/Quick/Quick.git', # :branch => 'swift-1.1'
end
import Quick
import Nimble
import MyAppModule // Importing the app module
class HelloTest: QuickSpec {
override func spec() {
//...
}
}