This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jsx/Widget/types.ts | |
var stringTypes = /* @__PURE__ */ new Set([ | |
"string", | |
"number", | |
"bigint", | |
"symbol", | |
true | |
]); | |
var invalidChildTypes = /* @__PURE__ */ new Set([null, void 0, false, "function"]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sequence(...funcs) { | |
return function (value) { | |
return funcs.reverse().reduce(function(previous, current) { | |
return previous.call ? previous.call(this, current(value)) : previous; | |
}); | |
}; | |
}; | |
function instructionSet(instructionSet) { | |
return (valueToWorkWith) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function searchThreads(offset, max, threads) { | |
const searchedThreads = GmailApp.search("in: inbox older_than:365d", offset, max); | |
var maxDate = new Date(); | |
maxDate.setDate(maxDate.getDate()-365); | |
return searchedThreads.filter(function(thread) { | |
return thread.getLastMessageDate() < maxDate; | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const styles = ` | |
html { | |
font-family: -apple-system; | |
font-size: 10px; | |
} | |
body { | |
font-size: 1.6rem; | |
} | |
h1 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
palette="/tmp/palette.png" | |
filters="fps=25,scale=720:-1:flags=lanczos" | |
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette | |
ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i input1 -i input2 -filter_complex \ | |
"[0:v]setpts=PTS-STARTPTS, pad=iw*2:ih[bg]; \ | |
[1:v]setpts=PTS-STARTPTS[fg]; [bg][fg]overlay=w" output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import IO | |
defmodule SimilarfilmsPhoenix.GetData do | |
def build_key(key) do | |
transforms = %{"id" => "movie_id", "vote_average" => "rating", "poster_path" => "image_url"} | |
if (transforms[key]) do | |
transforms[key] | |
else | |
key | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function compose(...funcs) { | |
return function (value) { | |
return funcs.reverse().reduce(function(previous, current) { | |
return previous.call(this, current(value)); | |
}); | |
}; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- window management | |
-- animation set 0 for instant sizing | |
hs.window.animationDuration = 0 | |
function windowOrder() | |
local KEYBOARD_MODIFIER = {'cmd', 'alt', 'shift'} | |
function getPos() | |
local win = hs.window.focusedWindow() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function reloadConfig(files) | |
doReload = false | |
for _,file in pairs(files) do | |
if file:sub(-4) == ".lua" then | |
doReload = true | |
end | |
end | |
if doReload then | |
hs.reload() | |
end |
NewerOlder