Skip to content

Instantly share code, notes, and snippets.

View Vico1993's full-sized avatar
:shipit:
I break things with my computer

Piolin Victor Vico1993

:shipit:
I break things with my computer
View GitHub Profile

gif-from-tweet

There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.

Dependencies

  • ffmpeg
    • macOS: brew install ffmpeg
    • Ubuntu/Debian: apt install ffmpeg
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active May 6, 2024 21:40
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@meandmax
meandmax / getcookiebyname.js
Last active October 27, 2020 02:01
get the cookie value by name if a cookie name exists.
/**
* get cookie by name without using a regular expression
*/
var getCookie = function(name) {
var getCookieValues = function(cookie) {
var cookieArray = cookie.split('=');
return cookieArray[1].trim();
};
var getCookieNames = function(cookie) {