Skip to content

Instantly share code, notes, and snippets.

// Don't forget to add to the project:
// 1. DeepLabV3 - https://developer.apple.com/machine-learning/models/
// 2. CoreMLHelpers - https://github.com/hollance/CoreMLHelpers
enum RemoveBackroundResult {
case background
case finalImage
}
extension UIImage {
@fatihgokce
fatihgokce / node_nginx_ssl.md
Created April 28, 2021 13:56 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@fatihgokce
fatihgokce / cell-tests.rs
Created June 26, 2020 11:39 — forked from jonhoo/cell-tests.rs
cell-refcell-rc
// these aren't _quite_ functional tests,
// and should all be compile_fail,
// but may be illustrative
#[test]
fn concurrent_set() {
use std::sync::Arc;
let x = Arc::new(Cell::new(42));
let x1 = Arc::clone(&x);
std::thread::spawn(move || {
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
import java.util.Stack;
public class FloodFill {
private static final String SEPARATOR = "--------------------------------------------------------------------";
private static final int[][] directions = new int[][]{
@fatihgokce
fatihgokce / playground.rs
Created May 1, 2019 21:29 — forked from rust-play/playground.rs
Code shared from the Rust Playground
fn main() {
let names = vec!["Bob", "Frank", "Ferris"];
for name in names.iter() {
match name {
&"Ferris" => println!("There is a rustacean among us!"),
_ => println!("Hello {}", name),
}
}
let mut names2 = vec!["Bob", "Frank", "Ferris"];
@fatihgokce
fatihgokce / exercise.tour.go
Created September 23, 2018 12:15 — forked from zyxar/exercise.tour.go
tour.golang exercise solutions
/* Exercise: Loops and Functions #43 */
package main
import (
"fmt"
"math"
)
func Sqrt(x float64) float64 {
z := float64(2.)