Skip to content

Instantly share code, notes, and snippets.

View Oschangkai's full-sized avatar

KaiYi Oschangkai

View GitHub Profile
@handcoding
handcoding / Ashley’s Light Fader.yaml
Last active November 19, 2024 13:35
This script for Home Assistant will fade a lamp over time with your choice of easing, including varieties of ease-in, ease-out, and ease-in-out.
alias: Ashley’s Light Fader
description: >
Fades a lamp over time. If you have any questions or comments about this
script, feel free to tweet Ashley Bischoff at @FriendlyAshley. Released under
the Apache 2.0 license. (v2.0)
fields:
light:
name: 💡 Light
description: entity_id of the lamp.
selector:
@JustinGrote
JustinGrote / Test-AzDOPipeline.ps1
Last active March 6, 2024 12:19
Test Azure Devops Pipeline YAML
function Test-AzDOPipeline {
<#
.SYNOPSIS
Tests an Azure Devops Pipeline YAML configuration
.DESCRIPTION
This can be used to validate an Azure Devops pipeline configuration within a particular pipeline project.
#>
param (
#Your Azure Devops Organization Name

Behavioral Interviewing

While there are a number of definitions, for our purposes, soft skills are all of the skills that are not technical. Meaning - the you that shows up the interview, as well as your technical ability. Your interview is composed of your technical prowess, as well as your soft-skills and ability to answer non-technical questions around teamwork, leadership, failure (yes), ability to adapt, timeliness, and communication skills.

If you have heard of the airport test - when hiring managers ask themselves would I want to be stuck in an airport with this person? - your non-technical stories will help them answer that question. In short: non-technical questions will ask you to tell a number of stories that supplement your technical mastery.

Interviews are subjective, based off of who’s interviewing you. When you prepare for soft-skill questions, understand the value that you can bring to a company as well as your goals and interests. You will deliver better answers and be more con

@mill1000
mill1000 / README.md
Last active July 5, 2024 08:18
Headless A2DP Audio Streaming on Raspbian Stretch

About

This gist will show how to setup Raspbian Stretch as a headless Bluetooth A2DP audio sink. This will allow your phone, laptop or other Bluetooth device to play audio wirelessly through a Rasperry Pi.

Motivation

A quick search will turn up a plethora of tutorials on setting up A2DP on the Raspberry Pi. However, I felt this gist was necessary because this solution is:

  • Automatic & Headless - Once setup, the system is entirely automatic. No user iteration is required to pair, connect or start playback. Therefore the Raspberry Pi can be run headless.
  • Simple - This solution has few dependencies, readily available packages and minimal configuration.
  • Up to date - As of December 2017. Written for Raspbian Stretch & Bluez 5.43

Prerequisites

@Snesi
Snesi / rotation-correction.pipe.ts
Last active April 24, 2020 03:16
Angular 2+ Pipe that auto-rotate images locally in the browser by parsing exif data in pipe inspired by https://gist.github.com/runeb/c11f864cd7ead969a5f0
import { Pipe, PipeTransform } from '@angular/core'
import { SafeHtml, SafeStyle, SafeScript, SafeUrl, SafeResourceUrl, DomSanitizer } from '@angular/platform-browser'
import { Observable } from 'rxjs/Observable'
import 'rxjs/add/observable/bindcallback'
const rotation = {
1: 'rotate(0deg)',
3: 'rotate(180deg)',
6: 'rotate(90deg)',
@agentsim
agentsim / highsierra_bootable.sh
Created June 10, 2017 02:23
Create bootable ISO from HighSierra Installer
# Generate a BaseSystem.dmg with 10.13 Install Packages
hdiutil attach /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/highsierra/
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg
@hollodotme
hollodotme / Install-nginx-with-http2-support.md
Created April 9, 2016 17:07
Install nginx with http2 support on ubuntu 14.04 LTS (Trusty)

How to install nginx (>= 1.9.5) with http2 support on Ubuntu 14.04 LTS (Trusty)

IMPORTANT: Backup your nginx site configs (usually under /etc/nginx/sites-available)!

Remove old nginx

Remove old nginx incl. nginx-common:

apt-get autoremove --purge nginx nginx-common
#
# smartcard_list.txt
# Copyright (C) 2002-2018 Ludovic Rousseau
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@ruo91
ruo91 / cloud-config.yaml
Created September 25, 2015 23:12
Rancher OS - example: cloud-config.yaml
#cloud-config
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC1TjQnNq/HMlI4JCCakK2SQwclw2T+HzuAo3p1+HSj7LsDTJEaMzvaQ3OmeXt6ZHycmv9Cx3sBDhGCu02891C2PKahNTplIi0dC0kFZcfu4J6ZynZLmaGPG81oBpZddEknazawWKq5Xdx20He+qoN86zGbrcXQKKZ30haZmzu/n/315Kazhyy7Iuaf1EvrSEbW97LBNtxAaEtolbPMPFjdjwD4LjARpeP7JNuAe4EQElfBElXdvQJxd4bcchavvNa68Y3IKGZ2kyKGBcZDLOICpGaZBOLYLhuwLn+zO3Hh3xYSGyXQQqUJVx4hRGIolm41F1vQMUS9Zxx/PMleqvWD
rancher:
network:
interfaces:
eth*:
dhcp: true
dns:
@ronaldsuwandi
ronaldsuwandi / config.fish
Last active July 30, 2021 07:54
My personal fish shell config for OS X. Supports git branch (fast git checks), virtualenv (if installed) and Kubernetes current context
function ls --description 'List contents of directory'
command ls -lFG $argv
end
function subl --description 'Launches sublime text in a new window'
command subl -n $argv
end
function code --description 'Launches visual code studio in a new window'
command code -n $argv