Skip to content

Instantly share code, notes, and snippets.

View Akki9326's full-sized avatar
:octocat:
Focusing

Akash Akki9326

:octocat:
Focusing
View GitHub Profile

find . -type d | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/"

This command will search recursively for directories inside the parent directory and then draw the tree of the founded directories.

You may also try the following to include all of the files as well.

find | sed 's|[^/]*/|- |g'

@Akki9326
Akki9326 / WebRTC.log
Last active May 27, 2019 07:48
Web-RTC Log
(audio_device_module.mm:21): CreateAudioDeviceModule
(audio_device_module_ios.mm:44): current platform is IOS
(audio_device_module_ios.mm:45): iPhone Audio APIs will be utilized.
(audio_processing_impl.cc:438): Capture analyzer activated: 0
Capture post processor activated: 0
Render pre processor activated: 0
(webrtc_video_engine.cc:473): WebRtcVideoEngine::WebRtcVideoEngine()
(webrtc_voice_engine.cc:196): WebRtcVoiceEngine::WebRtcVoiceEngine
(webrtc_voice_engine.cc:219): WebRtcVoiceEngine::Init
(webrtc_voice_engine.cc:227): Supported send codecs in order of preference:
@Akki9326
Akki9326 / NSNotificationCenter.swift
Created March 4, 2019 12:49
NSNotificationCenter Extension
/*
Copyright (c) 2011-present, NimbusKit. All rights reserved.
This source code is licensed under the BSD-style license found at http://nimbuskit.info/license
Extracted from NimbusKit: Swift Edition at https://github.com/nimbuskit/swift
*/
extension NSNotificationCenter {
/**
Adds an entry to the receiver’s dispatch table with an observer, a notification handler and optional criteria: notification name and sender.
@Akki9326
Akki9326 / ViewController.swift
Created March 28, 2017 07:08
Simple Barcode Scanning with Swift
import UIKit
import AVFoundation
class ViewController: UIViewController, AVCaptureMetadataOutputObjectsDelegate {
let session : AVCaptureSession = AVCaptureSession()
var previewLayer : AVCaptureVideoPreviewLayer!
var highlightView : UIView = UIView()
@Akki9326
Akki9326 / gist.swift
Created March 30, 2016 09:07
Filtering an Array of Dictionaries in swift
var visitors = [["age" : 22], ["age" : 41], ["age" : 23], ["age" : 30]]
var filteredVisitors = visitors.filter({
$0["age"] < 30
})
println(filteredVisitors)
//[["age" : 22], ["age" : 23]]