Skip to content

Instantly share code, notes, and snippets.

View stjernstrom's full-sized avatar
💭
Problem solving.....

Mathias Stjernstrom stjernstrom

💭
Problem solving.....
View GitHub Profile
@stjernstrom
stjernstrom / adjust_brightness.sh
Created January 14, 2024 08:27
Adjust brightness with brightnessctl in dynamic increments
#!/bin/bash
brightness_breakpoint=10
brightness_cmd="/usr/bin/brightnessctl -c backlight"
brightness_data=$($brightness_cmd)
cur_brightness=$(echo $brightness_data | grep -Po "(?<=Current brightness: )[0-9]+")
max_brightness=$(echo $brightness_data | grep -Po "(?<=Max brightness: )[0-9]+")
brightness_percent=$(bc <<< "scale=2; ($cur_brightness / $max_brightness) * 100")
div#videoplayer {
margin: 20px;
width: 100px;
height: 100px;
background: #f00;
-webkit-animation-name: spin;
-webkit-animation-duration: 40000ms;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
-moz-animation-name: spin;
#!/bin/bash
#
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA Corporation and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA Corporation is strictly prohibited.
#
2018-06-15 12:53:08 UTC comment server INFO 200 - TranscoderWorkerVideoEncoder.setupEncoder[_defaultVHost_:live/_definst_/test:720p]: Video encoding parameters - - - 29.19 - - -
2018-06-15 12:53:08 UTC comment server INFO 200 - # long: profile_id: 0=H264PROFILE_BASELINE, 1=H264PROFILE_MAIN, 3=H264PROFILE_HIGH - - - 29.191 - - - - - -
2018-06-15 12:53:08 UTC comment server INFO 200 - mainconcept.profile_id: 1 - - - 29.191 - - - - - - - - - - - - -
2018-06-15 12:53:08 UTC comment server INFO 200 - # long: level_id: = 10 -> 1.0, .. 51 -> 5.1 - - - 29.191 - - - - - - - - - - -
2018-06-15 12:53:08 UTC comment server INFO 200 - mainconcept.level_id: 32 - - - 29.191 - - - - - - - - - - - - -
2018-06-15 12:53:08 UTC comment server INFO 200 - # long: idr_interval: gop length - - - 29.191 - - - - - - - - - - - -
2018-06-15 12:53:08 UTC comment server INFO 200 - mainconcept.idr_interval: 0 - - - 29.191 - - - - - - - - - - - - -
2018-06-15 12:53:08 UTC comment server INFO 200 - # long: reordering_delay: max distance betw
[user]
name = xxx
email = xxx@xxx.xxx
[alias]
co = checkout
st = status
pd = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%an - %cr)%Creset' --abbrev-commit --date=relative production..
sd = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%an - %cr)%Creset' --abbrev-commit --date=relative staging..
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
export PATH="/usr/local/sbin:/usr/local/bin:$HOME/bin:$PATH"
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH="~/bin:$PATH"
# Java Path
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/
@stjernstrom
stjernstrom / responsive_iframe.html
Created April 23, 2015 09:19
Responsive iframe
<div class="video-container"><iframe frameborder="0" scrolling="0" height="360" width="640" src="https://...../"></iframe></div>
<style>
.video-container { position:relative; padding-bottom:56.25%; padding-top:0px; height:0; overflow:hidden; }
.video-container iframe { position:absolute; top:0; left:0; width:100%; height:100%; }
</style>