Skip to content

Instantly share code, notes, and snippets.

View louy's full-sized avatar
💭
I may be slow to respond.

Louay Akkad louy

💭
I may be slow to respond.
View GitHub Profile
@louy
louy / ras.php
Created August 12, 2013 16:16
Block Spam attacks on wp registeration page.
<?php
/*
Plugin Name: Registeration Anti-Spam
Plugin URI: https://gist.github.com/louy/6212415
Description: Block Spam attacks on wp registeration page.
Author: Louy Alakkad
Version: 1.0
Author URI: http://l0uy.com/
*/
@louy
louy / FBDownloader.iim
Last active December 28, 2015 22:49
iMacros Facebook Album Downloader. All you need to do is open the album page and run this script in loop mode with loop max equal to the count of pictures inside the album.
VERSION BUILD=8530828 RECORDER=FX
SET !ERRORIGNORE YES
TAB T=1
SET !LOOP 1
TAG POS={{!LOOP}} TYPE=A ATTR=CLASS:uiMediaThumb* EXTRACT=href
TAB OPEN
TAB T=2
URL GOTO={{!EXTRACT}}
SET !EXTRACT NULL
#!/bin/sh
set -e
git branch | grep -v "master" | xargs git branch -d
git fetch origin --prune

Keybase proof

I hereby claim:

  • I am louy on github.
  • I am louay (https://keybase.io/louay) on keybase.
  • I have a public key ASBtmGtwrtSjxZxz-xcoWXvlt2aQt_RP7QT7QbdYobGkzwo

To claim this, I am signing this object:

@louy
louy / index.html
Created December 18, 2018 19:51
React prototype boilerplate
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Prototype</title>
</head>
<body>
<div id="root"></div>
<script src="https://unpkg.com/react@16.7.0-alpha.2/umd/react.production.min.js"></script>
<script src="https://unpkg.com/react-dom@16.7.0-alpha.2/umd/react-dom.production.min.js"></script>
@louy
louy / is_email.js
Created July 8, 2013 10:47
is_email function from WordPress written in Javascript
/**
* is_email function from WordPress
* written in Javascript
*
* by Louy Alakkad <me@l0uy.com>
*
* Verifies that an email is valid.
*
* Does not grok i18n domains. Not RFC compliant.
*
@louy
louy / aws-mfa.sh
Last active August 19, 2019 13:39
aws-cli mfa session utility
# AWS MFA session util
# Setup:
# assuming you're using a profile called "default":
# In ~/.aws/config, set up a default-mfa-temp profile:
# ```
# [default]
# region = eu-west-2
# [default-mfa-temp]
# region = eu-west-2
@louy
louy / nginx.conf
Created April 28, 2016 21:23
Docker Nginx Config
daemon off;
user nginx;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@louy
louy / fresha-search-layout.markdown
Created May 24, 2023 08:37
Fresha Search Layout
@louy
louy / replit-database-import-export.sh
Last active June 6, 2023 02:23
Replit database import/export
# Export to a folder
mkdir -p db
cd db
curl -k $REPLIT_DB_URL?prefix= | xargs -I@ curl -k -O "$REPLIT_DB_URL/@"
cd ..
tar -czvf db.tar.gz db
# Then download db.tar.gz manually