Skip to content

Instantly share code, notes, and snippets.

View Neko3000's full-sized avatar
⛩️
Peace & Love

Xueliang Chen Neko3000

⛩️
Peace & Love
View GitHub Profile
disabled_rules: # rule identifiers turned on by default to exclude from running
- colon
- comma
- control_statement
- trailing_whitespace
//
// ColorPalette.swift
// Monotone
//
// Created by Xueliang Chen on 2020/10/31.
//
import Foundation
import UIKit
import Hue
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
// Manually creates the window and makes it visible.
window = UIWindow(frame: UIScreen.main.bounds)
/**
* Open an input stream and read the header. The codecs are not opened.
* The stream must be closed with avformat_close_input().
*
* @param ps Pointer to user-supplied AVFormatContext (allocated by avformat_alloc_context).
* May be a pointer to NULL, in which case an AVFormatContext is allocated by this
* function and written into ps.
* Note that a user-supplied AVFormatContext will be freed on failure.
* @param url URL of the stream to open.
* @param fmt If non-NULL, this parameter forces a specific input format.
typedef struct AVCodecParameters {
/**
* General type of the encoded data.
*/
enum AVMediaType codec_type;
/**
* Specific type of the encoded data (the codec used).
*/
enum AVCodecID codec_id;
/**
import UIKit
extension Thread{
public func join(){
while(!self.isFinished){
usleep(10)
}
}
@Neko3000
Neko3000 / Hyper-Active-Tab.js
Last active September 9, 2020 01:52
HowTo: My Terminal & Shell setup - Hyper.js + ZSH + starship
module.exports = {
config: {
// rest of the config
activeTab: '🚀'
}
// rest of the file
}
@Neko3000
Neko3000 / libavutil_frame.h
Created August 15, 2020 09:40
AVDev Chapter1
typedef struct AVFrame {
#define AV_NUM_DATA_POINTERS 8
/**
* pointer to the picture/channel planes.
* This might be different from the first allocated byte
*
* Some decoders access areas outside 0,0 - width,height, please
* see avcodec_align_dimensions2(). Some filters and swscale can read
* up to 16 bytes beyond the planes, if these filters are to be used,
* then 16 extra bytes must be allocated.
@Neko3000
Neko3000 / Character.swift
Last active June 23, 2021 12:39
Decorator pattern in Swift
protocol Character {
func getHealth() -> Int
}