This file contains 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
UIGraphicsBeginImageContextWithOptions(self.size, NO, [[UIScreen mainScreen] scale]); | |
CGContextRef outputContext = UIGraphicsGetCurrentContext(); | |
CGContextScaleCTM(outputContext, 1.0, -1.0); | |
CGContextTranslateCTM(outputContext, 0, -self.size.height); | |
// draw base image | |
CGContextDrawImage(outputContext, imageRect, self.CGImage); | |
// draw effect image | |
if (hasBlur) { |
This file contains 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
require 'net/http' | |
require 'json' | |
require "base64" | |
file = File.read('/Users/paulo/Downloads/receipt') | |
contents = Base64.encode64(file) | |
def validate_receipt_remote(receipt_base64) | |
receipt_base64.gsub! ' ', '+' |
This file contains 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
Paulos-MacBook-Pro:~ paulo$ sudo bless --device /dev/disk0s2 --setBoot --verbose | |
Password: | |
EFI found at IODeviceTree:/efi | |
found ioreg "FirmwareFeaturesMask"; featureMaskValue=0xE803FF37 | |
found ioreg "FirmwareFeatures"; featureFlagsValue=0xE803F537 | |
isPreBootEnvironmentUEFIWindowsBootCapable=1 | |
given BSD is not a DVD disc medium | |
isDVDWithElToritoWithUEFIBootableOS=0 | |
Checking if disk is complex (if it is associated with booter partitions) | |
GPT detected |
This file contains 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
Paulos-MacBook-Pro:~ paulo$ cat /Volumes/Macintosh\ HD/System/Library/CoreServices/SystemVersion.plist | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>ProductBuildVersion</key> | |
<string>15F34</string> | |
<key>ProductCopyright</key> | |
<string>1983-2016 Apple Inc.</string> | |
<key>ProductName</key> |
This file contains 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
Paulos-MacBook-Pro:~ paulo$ diskutil list | |
/dev/disk0 | |
#: TYPE NAME SIZE IDENTIFIER | |
0: GUID_partition_scheme *251.0 GB disk0 | |
1: EFI EFI 209.7 MB disk0s1 | |
2: Apple_CoreStorage 232.0 GB disk0s2 | |
3: Apple_Boot Recovery HD 650.1 MB disk0s3 | |
4: Apple_HFS Mac testing 17.5 GB disk0s4 | |
5: Apple_Boot Recovery HD 650.0 MB disk0s5 | |
/dev/disk1 |
This file contains 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
// | |
// main.m | |
// mudaImagens | |
// | |
// Created by Paulo Cesar on 09/02/16. | |
// Copyright © 2016 Paulo Cesar. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <AppKit/AppKit.h> |
This file contains 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
Puelos-Macbook:ChataBackend paulo$ cat Gemfile.lock | |
GIT | |
remote: git://github.com/jnicklas/carrierwave.git | |
revision: 45d90749693fdbaf5b2eaf2e17b975541cb2b8ce | |
specs: | |
carrierwave (0.10.0) | |
activemodel (>= 3.2.0) | |
activesupport (>= 3.2.0) | |
json (>= 1.7) | |
mime-types (>= 1.16) |
This file contains 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
float r = Color.red(obj.color)/255.0f; | |
float g = Color.green(obj.color)/255.0f; | |
float b = Color.blue(obj.color)/255.0f; | |
float[] matrix = { | |
r, r, r, r, r, //red | |
g, g, g, g, g, //green | |
b, b, b, b, b, //blue | |
1, 1, 1, 1, 1 //alpha | |
}; |
This file contains 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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(50); |
This file contains 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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(100); |