Skip to content

Instantly share code, notes, and snippets.

View SofianeHamlaoui's full-sized avatar
🔴
TLP: Red

Sofiane Hamlaoui SofianeHamlaoui

🔴
TLP: Red
View GitHub Profile
import re
import sys
key=sys.argv[1]
REGEX = {
"MD5 Hash":"[a-f0-9]{32}",
"Artifactory API Token":'(?:\s|=|:|"|^)AKC[a-zA-Z0-9]{10,}',
"Basic Auth Credentials":"(?<=:\/\/)[a-zA-Z0-9]+:[a-zA-Z0-9]+@[a-zA-Z0-9]+\.[a-zA-Z]+",
"Cloudinary Basic Auth":"cloudinary:\/\/[0-9]{15}:[0-9A-Za-z]+@[a-z]+",
@SofianeHamlaoui
SofianeHamlaoui / emojis.md
Created June 17, 2021 17:35
list of github markdown emojis

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@SofianeHamlaoui
SofianeHamlaoui / Screen.sh
Created June 4, 2021 10:06
Sofiane Screen Res
#!/bin/bash
if [[ $(xrandr | grep "eDP" | awk '{print $1;}') == "eDP-1" ]]
then
xrandr --output eDP-1 --scale 1.3x1.3
elif [[ $(xrandr | grep "eDP" | awk '{print $1;}') == "eDP-1-1" ]]
then
xrandr --newmode "2496x1404_144.00" 767.25 2496 2720 2992 3488 1404 1407 1412 1529 -hsync +vsync
xrandr --addmode eDP-1-1 "2496x1404_144.00"
xrandr --output eDP-1-1 --mode "2496x1404_144.00"
#!/bin/bash
if [ $(whoami) != "root" ]; then
echo "Must be run as root"
exit 1
elif ( ! dpkg-query --list openvpn | grep -q "ii"); then
echo "Please install OpenVPN to your system."
exit 1
elif ( ! dpkg-query --list tor | grep -q "ii"); then
echo "Please install Tor to your system."
@SofianeHamlaoui
SofianeHamlaoui / fetch.js
Created May 30, 2021 15:53
Fetch All Files from Firebase Hosting
#!/usr/bin/env node
const requireAuth = require('firebase-tools/lib/requireAuth');
const api = require('firebase-tools/lib/api');
const fs = require('fs-extra');
const request = require('request');
if (!process.argv[2]) {
console.error(`
ERROR: Must supply a site name. Usage:

Keybase proof

I hereby claim:

  • I am sofianehamlaoui on github.
  • I am sofianehamlaoui (https://keybase.io/sofianehamlaoui) on keybase.
  • I have a public key ASDZUkVqNfc26CHKq6HKoGZ_2nZ80BG3FSoGUBgml6ObQgo

To claim this, I am signing this object:

@SofianeHamlaoui
SofianeHamlaoui / xrandr command
Created May 5, 2020 11:01
Xrander HDMI2 + main screen
xrandr --output HDMI-2 --auto --right-of eDP-1
@SofianeHamlaoui
SofianeHamlaoui / Tempus Dusk
Created February 18, 2020 12:25
Tempus Dusk
! Theme: Tempus Dusk
! Description: Dark theme with a deep blue-ish, slightly desaturated palette (WCAG AA compliant)
! Author: Protesilaos Stavrou (https://protesilaos.com)
xterm*background: #1f252d
xterm*foreground: #a2a8ba
xterm*color0: #1f252d
xterm*color1: #cb8d56
xterm*color2: #8ba089
xterm*color3: #a79c46
xterm*color4: #8c9abe
@SofianeHamlaoui
SofianeHamlaoui / checkPrerequisites.sh
Created February 15, 2020 04:59
checkPrerequisites
function checkPrerequisites(){
if ! uname -a | grep -i "x86_64" | grep -qi "Linux"; then
echo >&2 "Sorry! This installer is only compatible with Linux on x86_64. Terminating."
exit 10
fi
if ! grep -q '\<avx[^ ]*\>' /proc/cpuinfo; then
echo >&2 "Sorry! Kite only runs on processor architectures with AVX support. Exiting now."
exit 12
fi
@SofianeHamlaoui
SofianeHamlaoui / userChrome.css
Created February 14, 2020 20:13
Personal userChrome.css
/* funcionando melhor */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
* {
/* -------------------- 🎨 Customization 🎨 -------------------- */
--tab-corner-rounding: 5px;
--animation-speed: 0.2s;
--button-corner-rounding: 30px;