Skip to content

Instantly share code, notes, and snippets.

View seifscape's full-sized avatar
:octocat:

Seif Kobrosly seifscape

:octocat:
View GitHub Profile
@sye8
sye8 / HeartRateTask.md
Last active March 19, 2025 20:36
Research Kit + Apple Watch Tutorial (Swift 3) - Part 2: Creating a Heart Rate Task + Heart Rate with Apple Watch
@pythoninthegrass
pythoninthegrass / uninstall_mso.sh
Last active April 20, 2021 00:02 — forked from pirafrank/uninstall_office_2016.sh
Uninstall Microsoft Office from macOS completely
#!/usr/bin/env bash
# SOURCES:
# https://gist.github.com/pirafrank/18d62c062e2806c1d183
# SEE THIS EXCELLENT SITE IF GIST FAILS:
# https://office-reset.com
# activate verbose standard output (stdout)
set -v
@monkeywithacupcake
monkeywithacupcake / CollectionViewUnicodeEmojis.playground
Created October 19, 2017 02:41
Swift 4 Playground showing how to build StackView, Horizontal CollectionView, and work with unicode emojis programmatically
//: Playground - noun: a place where people can play
import UIKit
import PlaygroundSupport
extension String {
func getUnicodeCodePoints() -> [String] {
return unicodeScalars.map { "U+" + String($0.value, radix: 16, uppercase: true) }
}
}
@rldaulton
rldaulton / NetworkManager.swift
Created August 16, 2017 15:57
A simple Swift network management file
//
// NetworkManager.swift
//
// Created by Ryan Daulton on 8/15/17.
// Copyright © 2017 Ryan Daulton. All rights reserved.
//
import Foundation
import Alamofire
import SwiftyJSON
/*
* SEP firmware split tool
*
* Copyright (c) 2017 xerub
*/
#include <fcntl.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
@braian87b
braian87b / openwrt-lede-openvpn-client.md
Last active April 2, 2021 09:33
Setting an OpenWrt / LEDE Based Router as OpenVPN Client

These instructions should work for Streisand as well for others VPN providers (Streisand is a Software that automatically configures a VPS online server with OpenVPN and other VPN/Proxy Softwares in order to have a private VPN Server)

These instructions are for getting an OpenWrt Based Router working as OpenVPN Client (should work for LEDE, Gargoyle and another distributions). Computers connected to Lan Ports of the OpenWrt Router will navigate through the Internet connection of the OpenVPN Server (in this case the Streisand one previously set up) you need a working Router with OpenWrt based firmware flashed on it (LEDE or eko.one.pl could also work) steps works well on Chaos Calmer 15.05 or 15.05.1.

  1. You need to telnet 192.168.1.1 (OpenWrt Router) and set up a password using passwd You can skip this if you already have a password and can connect using ssh.
import Foundation
enum API {
static let baseURL = URL(string: "https://cocoacasts.com")!
}
class NetworkManager {
@nguyentruongky
nguyentruongky / Airbnb_home_screen.md
Last active May 24, 2019 15:09
A simple sample of Airbnb's home screen

Airbnb Home screen sample

You can see it anywhere. It's very popular in home screen, gallery screen. See how to do that.

  • Create new project. Remove ViewController.swift and the view controller in Main storyboard.
  • Add TableViewController to storyboard. Don't forget check Is Initial View Controller
  • Name the Table View Cell and Identifier HeaderCell. Set cell's height to 400.
  • Design your cell look like this
@oleander
oleander / Makefile
Created April 6, 2017 12:26
How to use the Swift Package Manager and CocoaPods within the same XCode application
APP="MyApp"
CONSTRUCT=xcodebuild -workspace $(APP).xcworkspace -scheme $(APP) clean
install_deps:
pod install
create_config:
swift package fetch
swift package generate-xcodeproj
wipe:
rm -rf .build $(APP).xcodeproj $(APP).xcworkspace Package.pins Pods Podfile.lock
@ilyapuchka
ilyapuchka / StickyLayout.swift
Last active February 25, 2024 18:43
Really sticky collection view layout
// The issue with sectionHeadersPinToVisibleBounds and sectionFootersPinToVisibleBounds is that they do not pin
// first header and last footer when bouncing. This layout subclass fixes that.
class StickyLayout: UICollectionViewFlowLayout {
override init() {
super.init()
self.sectionFootersPinToVisibleBounds = true
self.sectionHeadersPinToVisibleBounds = true
}