Skip to content

Instantly share code, notes, and snippets.

View JFSene's full-sized avatar

Joe JFSene

  • Brazil
View GitHub Profile
@JFSene
JFSene / index.html
Last active August 4, 2016 20:11 — forked from anonymous/index.html
Charles Bukowsky Tribute Page
<div class="container">
<div class="row">
<h1 class="text-center"><em>Charles Bukowski</em></h1>
<h3 class="text-center"> "O maior poeta da América"</h3>
</div>
<div class="jumbotron">
<img class="img-responsive center-block img-rounded" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxISEhUSExIVFRUVFRUWFRgVFRUVFRUWFRYXFxUVFxUYHSggGBolHRUVITEhJSktLi4uFx8zODMtNygtLisBCgoKBQUFDgUFDisZExkrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrK//AABEIAMIBAwMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAADAAECBAUGBwj/xAA9EAABAwIEAwYDBQcDBQAAAAABAAIRAyEEEjFBBVFhBhMicYGRMqHwB0JyscEUUmKCkqLRI+HxM1OywuL/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8A8ychyjFQdTQRTJOTSgM02TQotCMUEGtRWkBM0ItJoKC1SIIRWiFXDI0VyjRJ1QQMxIVrAVHHVWsPhhEI7GgHKgiynN0OrT1K0X0YCt8O4GKzfHUFIEw3NHjdplbJF5geqDmqTmklDr0wJK7TFdk8LhY7+sQ93wgwGkyQBlaXPiWkTAG8qFThGDcx2Qujdz3AEQJOUWJvYAtJMjRB54GSZKHXdNgvS6HD8FkDTh6b5DjJNRrsgIzOJa+NNCQDJ2AAdXodgqVZ00jUpgua003EVCxxdc5gAcgbc5hIJGuiDzU8kNwXYca7
@JFSene
JFSene / Swift and Soap Web Service
Created November 23, 2016 16:10 — forked from dethbiscuit/Swift and Soap Web Service
Swift and Soap Web Service
//
// Call a soap web service
//
// Add
// NSURLConnectionDelegate
// NSXMLParserDelegate
class MapViewController: UIViewController, MKMapViewDelegate, CLLocationManagerDelegate, NSURLConnectionDelegate, NSXMLParserDelegate{
@IBOutlet weak var mapKit: MKMapView!
var wsUrl : String = "http://mobilewebservice.greenmotion.ch/MobileEvpass.asmx"
@JFSene
JFSene / UIView extension for autoLayout
Created January 14, 2017 04:43
A fast and easy autoLayout extesion for your cells
extension UIView {
func anchorToTop(_ top: NSLayoutYAxisAnchor? = nil, left: NSLayoutXAxisAnchor? = nil, bottom: NSLayoutYAxisAnchor? = nil, right: NSLayoutXAxisAnchor? = nil) {
anchorWithConstantsToTop(top, left: left, bottom: bottom, right: right, topConstant: 0, leftConstant: 0, bottomConstant: 0, rightConstant: 0)
}
func anchorWithConstantsToTop(_ top: NSLayoutYAxisAnchor? = nil, left: NSLayoutXAxisAnchor? = nil, bottom: NSLayoutYAxisAnchor? = nil, right: NSLayoutXAxisAnchor? = nil, topConstant: CGFloat = 0, leftConstant: CGFloat = 0, bottomConstant: CGFloat = 0, rightConstant: CGFloat = 0) {
@JFSene
JFSene / btnLabels.swift
Created January 14, 2017 19:36
Setting animation and labels to btns
switch index {
case 0:
UIView.animate(withDuration: 0.3, animations: {
self.btnIniciarOUTLET.setTitle("Próximo", for: .normal)
self.btnIniciarOUTLET.alpha = 1
})
case 1:
UIView.animate(withDuration: 0.3, animations: {
self.btnIniciarOUTLET.setTitle("Próximo", for: .normal)
self.btnIniciarOUTLET.alpha = 1
import UIKit
class CollectionViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
@IBOutlet weak var cv: UICollectionView!
let arrayFotos = (1...14).map {
UIImage(named: "\($0).jpg")
}
let cellIdentifier = "CollectionViewCell"
@JFSene
JFSene / pickerview.swift
Created March 27, 2017 14:36
Add multiple buttons to PickerView's Toolbar
let picker: UIPickerView
picker = UIPickerView(frame: CGRectMake(0, 200, view.frame.width, 300))
picker.backgroundColor = .whiteColor()
picker.showsSelectionIndicator = true
picker.delegate = self
picker.dataSource = self
let toolBar = UIToolbar()
toolBar.barStyle = UIBarStyle.Default
static func alertMessage(errorMessage: String, controller: UIViewController, title: String) {
let alertController = UIAlertController(title: title, message: errorMessage, preferredStyle: .alert)
let okAction = UIAlertAction(title: "Ok", style: .default, handler: nil)
alertController.addAction(okAction)
controller.present(alertController, animated: true, completion: nil)
}
static func alertMessageNav(errorMessage: String, controller: UIViewController, title: String, cHandler: @escaping (Void)-> () ) {
let alertController = UIAlertController(title: title, message: errorMessage, preferredStyle: .alert)
let okAction = UIAlertAction(title: "Ok", style: .default, handler: {(action:UIAlertAction) in
let version = Bundle.main.infoDictionary["CFBundleShortVersionString"] as! String
releaseVersionLabel.text = "v\(version)"
@JFSene
JFSene / RN-cheat-sheet.css
Created July 5, 2017 14:11
React-Native CSS like style
Valid keys: [
"display",
"width",
"height",
"top",
"left",
"right",
"bottom",
"minWidth",
"maxWidth",
@JFSene
JFSene / PulseButton.swift
Created October 4, 2017 16:35
Pulse Animation
func animationScaleEffect(view:UIView,animationTime:Float) {
UIView.animateWithDuration(NSTimeInterval(animationTime), animations: {
view.transform = CGAffineTransformMakeScale(0.6, 0.6)
},completion:{completion in
UIView.animateWithDuration(NSTimeInterval(animationTime), animations: { () -> Void in
view.transform = CGAffineTransformMakeScale(1, 1)
})