Skip to content

Instantly share code, notes, and snippets.

@mcmoe
mcmoe / Convert .mov or .MP4 to .gif.md
Last active April 8, 2024 09:15 — forked from SheldonWangRJT/Convert .mov or .MP4 to .gif.md
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This note 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.

@zhiyelee
zhiyelee / snnipt_with_circle.lua
Last active June 29, 2022 22:46
hammerspoon: move cursor between screens and show a circle around the mouse
--- start move cursor bewteen screens
function show_circle()
local mousepoint = hs.mouse.getAbsolutePosition()
local color = {["red"]=0,["blue"]=1,["green"]=0,["alpha"]=0.5}
local circle = hs.drawing.circle(hs.geometry.rect(mousepoint.x - 40, mousepoint.y - 40, 80, 80))
circle:setStrokeColor(color)
circle:setFill(false)
circle:setStrokeWidth(5)
circle:bringToFront(true)
circle:show(0.5)
// time and time end
console.time("This");
let total = 0;
for (let j = 0; j < 10000; j++) {
total += j
}
console.log("Result", total);
console.timeEnd("This");
// Memory
@busyevolving
busyevolving / circle-follow-cursor.markdown
Created September 23, 2019 10:48
Circle Follow Cursor
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var styleEl = document.getElementById('css-layout-hack');
if (styleEl) {
styleEl.remove();
return;
}
styleEl = document.createElement('style');
styleEl.id = 'css-layout-hack';
@reinink
reinink / app.js
Created November 2, 2018 12:56
Auto register Vue components
/**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
window.Vue = require('vue');
@vookimedlo
vookimedlo / macos_mute_unmute.md
Last active February 23, 2024 12:17
MacOS: mute & unmute from command line

Mute volume

osascript -e "set volume with output muted"

Unmute volume

osascript -e "set volume without output muted"
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active April 23, 2024 04:51
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat

Install MySQL

See what formula are available.

brew search mysql
==> Formulae
@hiqsol
hiqsol / findClass.php
Created June 27, 2018 19:10
Find full class path by class name using composer class map
#!/usr/bin/env php
<?php
$name = $argv[1];
$pfix = "\\$name";
$len = strlen($pfix);
require "vendor/composer/autoload_static.php";
$tmp = get_declared_classes();