Skip to content

Instantly share code, notes, and snippets.

View fpg1503's full-sized avatar
🐥

Francesco fpg1503

🐥
View GitHub Profile
@leonardofed
leonardofed / README.md
Last active April 19, 2025 04:38
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


import Foundation
public extension String {
public func replacing(range: CountableClosedRange<Int>, with replacementString: String) -> String {
let start = characters.index(characters.startIndex, offsetBy: range.lowerBound)
let end = characters.index(start, offsetBy: range.count)
return self.replacingCharacters(in: start ..< end, with: replacementString)
}
}
@erica
erica / goto.md
Last active July 27, 2016 17:13

Introducing Goto

  • Proposal: SE-0666
  • Author: Erica Sadun
  • Status: Draft
  • Review manager: Crusty

Introduction

This proposal introduces goto to Swift.

Extending Swift Literals

  • Proposal: TBD
  • Author: Erica Sadun
  • Status: TBD
  • Review manager: TBD

Introduction

This proposal expands Swift's language literals to include common cross-platform concepts.

@IgorMing
IgorMing / main.go
Created July 7, 2016 02:15 — forked from nubunto/main.go
Código para o Igão.
package main
import (
"database/sql"
"encoding/json"
"fmt"
"log"
"net/http"
_ "github.com/lib/pq"
@digoreis
digoreis / CURLSwift.swift
Last active May 15, 2018 20:45
test extension for curl - Update to Swift 3
//
// CURLDebug.swift
//
// Created by apple on 02/06/16.
// Copyright © 2016 Rodrigo Reis. All rights reserved.
//
import Foundation
@wgins
wgins / people2csv.py
Last active May 31, 2018 19:05 — forked from marinamixpanel/people2csv.py
Mixpanel - Exporting people profiles to CSV
''' people export'''
import base64
import csv
import sys
import time
import urllib # for url encoding
import urllib2 # for sending requests
try:
A view controller cannot segue to another controller without presenting itself.
https://stackoverflow.com/questions/8221787/perform-segue-on-viewdidload
https://stackoverflow.com/questions/10428629/programatically-set-the-initial-view-controller-using-storyboards
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
@IaroslavR
IaroslavR / gist:834066ba4c0e25a27078
Last active May 31, 2023 15:10
install last tesseract to Amazon Linux
sudo yum install autoconf aclocal automake
sudo yum install libtool
sudo yum install libjpeg-devel libpng-devel libtiff-devel zlib-devel
cd ~/downloads
wget http://www.leptonica.com/source/leptonica-1.72.tar.gz
tar -zxvf leptonica-1.72.tar.gz
cd leptonica-1.72
./configure
make
sudo make install
@dbettermann
dbettermann / Screenshot.swift
Last active April 18, 2019 16:53
Take screenshot that includes status bar
extension UIScreen {
class func screenshot() -> UIImage {
let view = mainScreen().snapshotViewAfterScreenUpdates(false)
UIGraphicsBeginImageContext(view.bounds.size)
view.drawViewHierarchyInRect(view.bounds, afterScreenUpdates: true)
let screenshot = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()