Skip to content

Instantly share code, notes, and snippets.

View adelynx's full-sized avatar
🏠
Work from home

Adel Kedjour adelynx

🏠
Work from home
View GitHub Profile
Activation Key: 54703-98224-69173-57729-64687
File Installation Key: 60915-54893-59227-06046-00879-23758-40953-46389-00580-22272-43569-01202-13854
@adelynx
adelynx / clean_code.md
Created August 31, 2022 13:30 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@adelynx
adelynx / how-to-install-homebrew-on-manjaro.md
Created December 16, 2021 00:53 — forked from fardjad/how-to-install-homebrew-on-manjaro.md
[How to Install homebrew on Manjaro] Steps required to install homebrew on Manjaro Linux #linux #manjaro #homebrew

How to Install homebrew on Manjaro

Steps required to install homebrew on Manjaro Linux

Steps

  1. Install base-devel

     pacman -Syu # CAUTION: this updates the whole system
    

pacman -S base-devel

@adelynx
adelynx / broadcast.sh
Created November 22, 2021 22:50 — forked from BusterNeece/broadcast.sh
FunkyWayFM: The shell script used to merge the video feed and AzuraCast-powered radio feed into a single YouTube stream.
#! /bin/bash
VBR="1500k"
FPS="30"
QUAL="veryfast"
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"
KEY=""
VIDEO_SOURCE="/home/ubuntu/video3.mp4"
@adelynx
adelynx / new-mac.md
Created September 3, 2021 17:09 — forked from alanzeino/new-mac.md
New Mac Setup

All the stuff I do to set up a new Mac

Applications

  • Amphetamine
  • DaisyDisk
  • Deliveries
  • iA Writer
  • iStat Menus
  • Kaleidoscope
  • PopClip
  • Reeder
@adelynx
adelynx / tailf-with-colors.sh
Created February 12, 2021 19:29 — forked from JBlond/tailf-with-colors.sh
Tail logs with color for Monolog
tailf-with-colors () {
if [ -z "$1" ] ; then
echo "Please specify a file for monitoring"
return
fi
tail -f $1 | awk '
{matched=0}
/INFO:/ {matched=1; print "\033[0;37m" $0 "\033[0m"} # WHITE
/DEBUG:/ {matched=1; print "\033[0;37m" $0 "\033[0m"} # WHITE
@adelynx
adelynx / generate-ssh-key.sh
Created October 15, 2020 22:19 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@adelynx
adelynx / github.js
Created September 23, 2020 16:32 — forked from StephanHoyer/github.js
Commiting multiple files to github over API
'use strict';
var Octokat = require('octokat');
var extend = require('lodash/object/assign');
var defaults = {
branchName: 'master',
token: '',
username: '',
reponame: ''
@adelynx
adelynx / selenium-php-webdriver-cheatsheet.md
Created November 21, 2019 10:05 — forked from aczietlow/selenium-php-webdriver-cheatsheet.md
Cheat sheet for using php webdriver (facebook/webdriver).

Webdriver PHP API workthough

  • Open a browser

    # start an instance of firefox with selenium-webdriver
    
    $browser_type = 'firefox'
    $host = 'http://localhost:4444/wd/hub'
    

$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track