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
# -*- coding: utf-8 -*- | |
import json | |
import re | |
from ..Script import Script | |
class VaryTempWithHeight(Script): | |
def __init__(self): |
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
/**** This version is ported by Atadiat to work on ESP8266 (tested on NodeMCU 1.0) ****/ | |
/**** Porting was done by Yahya Tawil****/ | |
// ESP32 WiFi <-> 3x UART Bridge | |
// by AlphaLima | |
// www.LK8000.com | |
// Disclaimer: Don't use for life support systems | |
// or any other situations where system failure may affect |
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
// Place your settings in this file to overwrite the default settings | |
{ | |
// used to improve formatting | |
"C_Cpp.clang_format_path": "/usr/bin/clang-format", | |
"C_Cpp.intelliSenseEngine": "Default", | |
"C_Cpp.default.includePath": [ | |
"${workspaceFolder}/**", | |
"/usr/include", | |
"/usr/include/x86_64-linux-gnu", | |
"/usr/include/linux" |
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 | |
# used for turning octoprint items into timelapse gifs. | |
# usage ./mkgif.sh <input_movie> <output_gif> | |
# - error checking is for people who type things poorly :) | |
FPS=10 | |
# Option 1 | |
# http://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality | |
PALETTE="pallet-$1.png" | |
ffmpeg -y -i $1 -vf fps=$FPS,scale=800:-1:flags=lanczos,palettegen "$PALETTE" | |
ffmpeg -i $1 -i "$PALETTE" -filter_complex "fps=$FPS,scale=800:-1:flags=lanczos[x];[x][1:v]paletteuse" $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
# print the 10 most common commands executed from bash/zsh history | |
history | awk '{print $2}' | tr ' ' '\n' | sort | uniq -c |sort -n | tail |
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 | |
# Add usernames to add to /etc/sudoers for passwordless sudo | |
users=("user") | |
for user in "${users[@]}" | |
do | |
cat /etc/sudoers | grep ^$user | |
RC=$? | |
if [ $RC != 0 ]; then |
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
export PYTHONSTARTUP=$HOME/.pythonstartup.py |
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
set nocompatible | |
filetype off " required! | |
set rtp+=~/.vim/vundle.git/ | |
call vundle#begin() | |
" My Plugins here: | |
" | |
" original repos on github | |
Plugin 'scrooloose/nerdtree' |
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
gitlab_rails['ldap_enabled'] = true | |
gitlab_rails['ldap_host'] = '192.168.230.7' | |
gitlab_rails['ldap_port'] = 389 | |
gitlab_rails['ldap_uid'] = 'sAMAccountName' | |
# requires that your AD setups support certificates it appears | |
gitlab_rails['ldap_method'] = 'plain' # "tls" or "ssl" or "plain" | |
gitlab_rails['ldap_bind_dn'] = 'cn=adauth,cn=Users,dc=foo,dc=local' | |
gitlab_rails['ldap_password'] = 'Password123' | |
gitlab_rails['ldap_active_directory'] = true | |
# documentation indicates the below should be false for AD; however, experimentation shows this should be true |
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
// get the server URL | |
var server_url = $("[value^=rtmp]").value; | |
// get the current key | |
var stream_key = $(".stream-name-text").value; | |
// assemble the QR code, thanks http://stackoverflow.com/a/9447876 | |
var div = $("#yt-masthead-content"); | |
var qrIMG = 'https://chart.googleapis.com/chart?chl=' + server_url + '/' + stream_key + '&chld=M%7C0&cht=qr&chs=125x125'; | |
var img = document.createElement('img'); |