Skip to content

Instantly share code, notes, and snippets.

View lohenyumnam's full-sized avatar
👨‍💻
Working...

Lohen lohenyumnam

👨‍💻
Working...
View GitHub Profile

If .DS_Store was never added to your git repository, simply add it to your .gitignore file.

If you don't have one, create a file called

.gitignore

In your the root directory of your app and simply write

Download the uTorrent server package for Ubuntu 13.04 with the following command to download it via terminal.

for 64bit

wget http://download.ap.bittorrent.com/track/beta/endpoint/utserver/os/linux-x64-ubuntu-13-04 -O utserver.tar.gz

for 32Bit

wget http://download.ap.bittorrent.com/track/beta/endpoint/utserver/os/linux-i386-ubuntu-13-04 -O utserver.tar.gz
@lohenyumnam
lohenyumnam / 1: App.js
Created March 23, 2023 04:34 — forked from helenaford/1: App.js
useNotificationService
import { useNotificationService } from './hooks';
function App() {
useNotificationService();
...
}

Swift Compilation with Sublime Text 3 on macOS

Adding Swift Build System

Open Sublime Text 3 Go To Preferences > Browse Packages... Create a folder "SwiftBuilder" inside Packages directory. Add a file named Swift.sublime-build inside SwiftBuilder directory. Copy the following script in Swift.sublime-build file.

Install Swift on Ubuntu 17.10, Sublime Text 3 Installation and setup for Swift

Step 1

Install ubuntu make

sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
sudo apt update
@lohenyumnam
lohenyumnam / How to use CoreLocation in iOS using Swift 4.swift
Last active May 13, 2021 21:53
How to use CoreLocation in iOS using Swift 4 to get your location Speed, Floor, timestamp, Course Direction, Altitude above sea level
// How to use CoreLocation to get your location Speed, Floor, timestamp, Course Direction, Altitude above sea level
//TODO: Step 1 ####################################################################
// First of all import "CoreLocation"
import CoreLocation
//TODO: Step 2 ####################################################################
@lohenyumnam
lohenyumnam / hello_world.py
Last active January 24, 2020 06:03
Hello World Examples
class HelloWorld:
def __init__(self, name):
self.name = name.capitalize()
def sayHi(self):
print "Hello man " + self.name + "!"
hello = HelloWorld("world")
hello.sayHi()
@lohenyumnam
lohenyumnam / Data+PrettyPrint.swift
Created June 28, 2019 12:19 — forked from cprovatas/Data+PrettyPrint.swift
Pretty print JSON string from Data in Swift 4.1 (especially useful printing to Xcode console)
import Foundation
extension Data {
var prettyPrintedJSONString: NSString? { /// NSString gives us a nice sanitized debugDescription
guard let object = try? JSONSerialization.jsonObject(with: self, options: []),
let data = try? JSONSerialization.data(withJSONObject: object, options: [.prettyPrinted]),
let prettyPrintedString = NSString(data: data, encoding: String.Encoding.utf8.rawValue) else { return nil }
return prettyPrintedString
}
Name Arch Ubuntu
Package Manager Pacman Apt-Get
Command to Refresh and Upgrade pacman -Syy apt-get update
Command to Refresh and Upgrade pacman -Syu apt-get update && apt-get dist-upgrade
Command to install wget pacman -S wget apt-get install wget
Command to install sublime-text pacaur -S sublime-text sudo add-apt-repository ppa:webupd8team/sublime-text-3 && sudo apt-get update && sudo apt-get install sublime-text-installer

Select the Video and Audio quality with the following command

youtube-dl -F <VideoURL>

To download the video with particular Video and Audio or Audio only just type

youtube-dl -f <AudioQuality> + <VideoQuality> <VideoURL>