- In Xcode use command+n and in the file prompt select Other(either osx/ios)> PCH File.
- Give it a name and a target
- Go to the target's Build Settings and in Prefix Header config set the file path, something like this: "${PROJECT_DIR}/${PRODUCT_NAME}/PrefixHeader.pch"
- Change Precompile Prefix Header to YES Why?
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
#Postgres | |
##Configuração | |
[Check status no stackoverflow](http://stackoverflow.com/questions/7975414/check-status-of-postgresql-server-mac-os-x) | |
export PGDATA='/usr/local/var/postgres' | |
export PGHOST=localhost | |
alias start-pg='pg_ctl -l $PGDATA/server.log start' | |
alias stop-pg='pg_ctl stop -m fast' | |
alias show-pg-status='pg_ctl status' | |
alias restart-pg='pg_ctl reload' |
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
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippets | |
xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Notified Property C# - WinPhone</Title> | |
<Author>Vitor Navarro</Author> | |
<Description>Full Property shortcut with NotifyOfPropertyChange for WinPhone using C#</Description> | |
<Shortcut>propfullnotify</Shortcut> | |
</Header> |
Here you find a fast how to test of an API with cURL, HTTPie and RESTY. The API is simulated using JSON Server tool from typicode.
Install with npm npm install -g json-server
We use typicode sample json
{
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/sh | |
#From here http://askubuntu.com/questions/430853/how-do-i-find-my-internal-ip-address | |
#Also good reference http://askubuntu.com/questions/430853/how-do-i-find-my-internal-ip-address | |
#If using other mask than 8.8.8.8 change it here or pass it as param | |
ip route get 8.8.8.8 | awk '{print $NF; exit}' |
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
for familyName in UIFont.familyNames { | |
print("------------------------------") | |
print("Font Family Name = [\(familyName)]") | |
let names = UIFont.fontNames(forFamilyName: familyName as! String) | |
print("Font Names = [\(names)]") | |
} |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
/// <summary> | |
/// A camera switcher. It cicles camera transform through given positions starting from a specified position walking 1 by 1. | |
/// It can either change or animate between positions with the specified speed. | |
/// </summary> | |
public class VNCameraSwitch : MonoBehaviour { |
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
import UIKit | |
extension UIScrollView { | |
func toImage() -> UIImage? { | |
UIGraphicsBeginImageContext(contentSize) | |
let savedContentOffset = contentOffset | |
let savedFrame = frame | |
let saveVerticalScroll = showsVerticalScrollIndicator |