Skip to content

Instantly share code, notes, and snippets.

View KheangSenghort's full-sized avatar
💻

Kheang Senghort KheangSenghort

💻
View GitHub Profile
@KheangSenghort
KheangSenghort / AttachmentHandler.swift
Created August 28, 2021 07:21 — forked from deepakraj27/AttachmentHandler.swift
Access Camera, Photo Library, Video and File from User device using Swift 4
//
// AttachmentHandler.swift
// AttachmentHandler
//
// Created by Deepak on 25/01/18.
// Copyright © 2018 Deepak. All rights reserved.
//
import Foundation
import UIKit
@KheangSenghort
KheangSenghort / app.js
Created August 17, 2018 02:19 — forked from bingeboy/app.js
Upload and display image with NodeJS and Express.
/*
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, user = require('./routes/user')
, common = require('./routes/common')
, fs = require('fs')
, http = require('http')
, util = require('util')
@KheangSenghort
KheangSenghort / BackgroundTask.swift
Created March 21, 2018 04:50 — forked from phatmann/BackgroundTask.swift
Encapsulate iOS background tasks in a Swift class
class BackgroundTask {
private let application: UIApplication
private var identifier = UIBackgroundTaskInvalid
init(application: UIApplication) {
self.application = application
}
class func run(application: UIApplication, handler: (BackgroundTask) -> ()) {
// NOTE: The handler must call end() when it is done