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/sh | |
palette="/tmp/palette.png" | |
filters="fps=15,scale=320:-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
import re | |
from queue import PriorityQueue | |
class Tile: | |
def __init__(self, blocked=False, lb="", isKey=False, isTrap=False): | |
self.blocked = blocked | |
self.lb = lb | |
self.isKey = isKey | |
self.isTrap = isTrap | |
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/sh | |
# OpenBSD-STABLE Automated build script: 2 Posted 12-02-2014 at 06:18 PM by rocket357 | |
# from http://www.linuxquestions.org/questions/blog/rocket357-328529/openbsd-stable-automated-build-script-2-36315/ | |
# Comment by louy2 | |
# Requires root | |
# Default disk layout doesn't work because /usr/xenocara & /usr/xobj shares | |
# the 2G given to /usr | |
# Recommend 2G each for /usr/xenocara & /usr/xobj too |
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 Html exposing (..) | |
import Html.App as App | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (onClick) | |
import Random | |
main = | |
App.program | |
{ init = init | |
, update = update |
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 Html exposing (..) | |
import Html.App as App | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (onInput, onClick) | |
import String | |
import Regex | |
main = | |
App.beginnerProgram { model = model, view = view, update = update } |
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
// test null-terminated number | |
if (sscanf(string, "%d%c", &number, &dummy) == 1) | |
// test \n-terminated number i.e. stdin | |
if (sscanf(string, "%d%c", &number, &dummy) == 2 || dummy == '\n') |
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
def needPanels(motoStr, atoStr): | |
panelDict = {} | |
motoList = list(motoStr) | |
for panel in motoList: | |
if panel in panelDict.keys(): | |
panelDict[panel] += 1 | |
else: | |
panelDict[panel] = 1 | |
needCount = 0 | |
atoList = list(atoStr) |
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
# https://www.linuxquestions.org/questions/linux-newbie-8/bell-sound-alert-on-bash-shell-giving-me-the-prompt-926299/ | |
PROMPT_COMMAND="echo -e '\a'" |
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
# /etc/profile.d/set_win_home.sh | |
# Set HOME to Windows user dir | |
# Source: https://superuser.com/questions/809974/msys2-home-folder-show | |
HOME=/c/Users/$USER | |
cd |
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
Verifying that +fridsun is my blockchain ID. https://onename.com/fridsun |