Skip to content

Instantly share code, notes, and snippets.

View pyguy's full-sized avatar
🍻
Happy learning

Hamidreza Josheghani pyguy

🍻
Happy learning
View GitHub Profile
@hunterjm
hunterjm / frigate_0.10_notification.yaml
Last active March 7, 2024 21:19
Frigate 0.10 Notifications
blueprint:
name: Frigate Notification (0.10.0)
description: |
## Frigate Mobile App Notification
This blueprint will send a notification to your device when a Frigate event for the selected camera is fired. The notification will initially include the thumbnail of the detection, but include an actionable notification allowing you to view the clip and snapshot.
With this blueprint, you may send the notification to multiple devices by leaving "Device" blank and instead use a [notification group][1].
### Software Version Requirements
@Paulchen-Panther
Paulchen-Panther / libreelec.sh
Last active November 10, 2023 06:54
Hyperion.NG on LibreELEC installation script
#!/bin/sh
# Script for installing Hyperion.NG release on LibreElec
# Examples of usage:
# Download and install latest Hyperion.NG release: libreelec.sh
# Download an specific Hyperion.NG release: libreelec.sh 2.0.0-alpha.6
# Install an specific Hyperion.NG release tar.gz file: libreelec.sh /storage/deploy/Hyperion-2.0.0-alpha.7-Linux-armv7l.tar.gz
#Set welcome message
echo '*******************************************************************************'
echo 'This script will install Hyperion.NG on LibreELEC'
@ameenkhan07
ameenkhan07 / FB-PE-InterviewTips.md
Last active April 11, 2024 17:02
Facebook Production Engineering Interview

What to Expect and Tips

• 45-minute systems interview, focus on responding to real world problems with an unhealthy service, such as a web server or database. The interview will start off at a high level troubleshooting a likely scenario, dig deeper to find the cause and some possible solutions for it. The goal is to probe your knowledge of systems at scale and under load, so keep in mind the challenges of the Facebook environment.
• Focus on things such as tooling, memory management and unix process lifecycle.

Systems

More specifically, linux troubleshooting and debugging. Understanding things like memory, io, cpu, shell, memory etc. would be pretty helpful. Knowing how to actually write a unix shell would also be a good idea. What tools might you use to debug something? On another note, this interview will likely push your boundaries of what you know (and how to implement it).

Design/Architecture 

Interview is all about taking an ambiguous question of how you might build a system and letting

@infernix
infernix / vcsa-kvm.yml
Created February 10, 2016 19:23
Create a VMware VCSA appliance under KVM with libvirt and ansible
---
- name: Generate a KVM enabled VMWare VCSA VM under libvirt
hosts: 127.0.0.1
connection: local
vars:
- reqpkgs_apt:
- bsdtar
- libguestfs-tools
- qemu-utils
- virtinst
@drolfe
drolfe / ADD User Account to iLO.xml
Last active August 11, 2023 23:14
HP iLO XML Scripts
HPONCFG all << end_marker
<RIBCL VERSION="2.0">
<LOGIN USER_LOGIN="Dontcare" PASSWORD="UsingAutologin">
<USER_INFO MODE="write">
<ADD_USER
USER_NAME="daniel"
USER_LOGIN="daniel"
PASSWORD="daniel123">
<ADMIN_PRIV value ="Yes"/>
<REMOTE_CONS_PRIV value ="Yes"/>
@justecorruptio
justecorruptio / 2048.c
Created April 4, 2014 03:49
Tiny 2048 in C!
M[16],X=16,W,k;main(){T(system("stty cbreak")
);puts(W&1?"WIN":"LOSE");}K[]={2,3,1};s(f,d,i
,j,l,P){for(i=4;i--;)for(j=k=l=0;k<4;)j<4?P=M
[w(d,i,j++)],W|=P>>11,l*P&&(f?M[w(d,i,k)]=l<<
(l==P):0,k++),l=l?P?l-P?P:0:l:P:(f?M[w(d,i,k)
]=l:0,++k,W|=2*!l,l=0);}w(d,i,j){return d?w(d
-1,j,3-i):4*i+j;}T(i){for(i=X+rand()%X;M[i%X]
*i;i--);i?M[i%X]=2<<rand()%2:0;for(W=i=0;i<4;
)s(0,i++);for(i=X,puts("\e[2J\e[H");i--;i%4||
puts(""))printf(M[i]?"%4d|":" |",M[i]);W-2