Skip to content

Instantly share code, notes, and snippets.

View atom2ueki's full-sized avatar
☮️

Tony Li atom2ueki

☮️
View GitHub Profile
@Jakz
Jakz / ffmpeg.md
Last active February 29, 2020 15:22
ffmpeg cheat sheet

Concatenate multiple VOB into same

ffmpeg -i "concat:/Path/File1.VOB|/Path/File2.VOB" -c copy file_output.vob

Convert VOB video to x256

ffmpeg -i file_input.vob -vf yadif -c:v libx265 -preset slow -crf 20 -c:a aac -b:a 256k file_output.mkv

Cropping a video

/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
const React = require('react-native');
const FBSDKCore = require('react-native-fbsdkcore');
const FBSDKLogin = require('react-native-fbsdklogin');
@dave-andersen
dave-andersen / kmeans.py
Last active September 1, 2022 11:15
k-means in Tensorflow
import tensorflow as tf
import numpy as np
import time
N=10000
K=4
MAX_ITERS = 1000
start = time.time()
@aphillipo
aphillipo / MainApp.js
Created October 5, 2015 19:26
Wrapping React Native Navigator
class MainApp extends Component {
constructor(props) {
super(props);
}
renderScene(route, navigator) {
var Component = route.component;
return (
<Component route={route} navigator={navigator} />
);
@newmarcel
newmarcel / UITableView+CATransaction.swift
Last active February 12, 2017 16:56
UITableView+CATransaction
//
// UITableView+CATransaction.swift
//
// Created by Marcel Dierkes on 08.05.15.
// Copyright (c) 2015 Marcel Dierkes. All rights reserved.
//
import UIKit
import QuartzCore
@hramos
hramos / README.md
Last active June 16, 2021 09:34
A middleware module for logging in a Parse.User using Facebook in express.

Parse Cloud Module for managing Facebook Login server side using Express.

To log in, visit https://YOUR_SUBDOMAIN.parseapp.com/login.

Installation

Move main.js and app.js into your cloud/ folder in Cloud Code if it's a new project. If you're already using Express, update your app.js accordingly.

If you already have a Parse Hosting app set up, but you're not using Express yet, add the following to your `main.js:

@sogko
sogko / app.js
Last active November 8, 2022 12:31
gulp + expressjs + nodemon + browser-sync
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.use(express.static('public'));
app.get('/', function(req, res) {
res.sendfile('./public/index.html');
@romaonthego
romaonthego / NSDateFormatter cheat sheet
Last active May 3, 2024 07:26
Date Formats for NSDateFormatter
a: AM/PM
A: 0~86399999 (Millisecond of Day)
c/cc: 1~7 (Day of Week)
ccc: Sun/Mon/Tue/Wed/Thu/Fri/Sat
cccc: Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday
d: 1~31 (0 padded Day of Month)
D: 1~366 (0 padded Day of Year)
@bobspace
bobspace / css_colors.js
Last active April 24, 2024 13:34
All of the CSS Color names in a big javascript object.
// CSS Color Names
// Compiled by @bobspace.
//
// A javascript object containing all of the color names listed in the CSS Spec.
// This used to be a big array, but the hex values are useful too, so now it's an object.
// If you need the names as an array use Object.keys, but you already knew that!
//
// The full list can be found here: https://www.w3schools.com/cssref/css_colors.asp
// Use it as you please, 'cuz you can't, like, own a color, man.