Skip to content

Instantly share code, notes, and snippets.

View archywillhe's full-sized avatar
⚰️
catching deadlines

Archy Will He / 何魏奇 archywillhe

⚰️
catching deadlines
View GitHub Profile
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active July 27, 2024 18:46
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@bhrott
bhrott / UIColorExtension.md
Created March 1, 2017 22:16
Swift 3: Hex UIColor

Extension:

import Foundation
import UIKit

extension UIColor {
    convenience init(hexString: String) {
        let hex = hexString.trimmingCharacters(in: CharacterSet.alphanumerics.inverted)
        var int = UInt32()
 Scanner(string: hex).scanHexInt32(&int)
@Slava
Slava / 500.cpp
Last active August 29, 2015 14:14
#include <iostream>
#include <set>
#include <vector>
#include <cmath>
using namespace std;
typedef pair<long long, long long> pii;
set<pii> pq;
// Create a UIImage from sample buffer data
- (UIImage *) imageFromSampleBuffer:(CMSampleBufferRef) sampleBuffer
{
// Get a CMSampleBuffer's Core Video image buffer for the media data
CVImageBufferRef imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);
// Lock the base address of the pixel buffer
CVPixelBufferLockBaseAddress(imageBuffer, 0);
// Get the number of bytes per row for the pixel buffer
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"