Skip to content

Instantly share code, notes, and snippets.

View netcode's full-sized avatar
🤠
Busy building something awesome @shieldfy

Eslam Salem netcode

🤠
Busy building something awesome @shieldfy
View GitHub Profile
@netcode
netcode / windows-keys.md
Created June 5, 2024 07:08 — forked from rvrsh3ll/windows-keys.md
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

@netcode
netcode / generate-jwt.php
Created October 4, 2017 12:29
generate new jwt-token in HS256 from RS256 public key
<?php
/**
* git clone https://github.com/bllohar/php-jwt-class-with-RSA-support.git
*/
include 'php-jwt-class-with-RSA-support/src/JWToken.php';
/**
* usage :
* php generate-jwt.php payload-in-base64 path/to/public-key
*/
@netcode
netcode / skeleton-daemon.sh
Created June 11, 2017 20:25 — forked from shawnrice/skeleton-daemon.sh
A template to write a quick daemon as a bash script
#!/bin/sh
# This is a skeleton of a bash daemon. To use for yourself, just set the
# daemonName variable and then enter in the commands to run in the doCommands
# function. Modify the variables just below to fit your preference.
daemonName="DAEMON-NAME"
pidDir="."
pidFile="$pidDir/$daemonName.pid"

Keybase proof

I hereby claim:

  • I am netcode on github.
  • I am eslam (https://keybase.io/eslam) on keybase.
  • I have a public key whose fingerprint is 00D5 F81B 42FE 2925 6F1D FE3F 0F73 384C B18D B3AF

To claim this, I am signing this object:

@netcode
netcode / drop.md
Created March 7, 2017 13:07
Drop all collections in MongoDB

#Drop all collections in MongoDB

go to mongo commandline and run the following two commands

use dbName
var x=db.getCollectionNames();for(var i in x){ db[x[i]].drop(); }
@netcode
netcode / aes.php
Created August 23, 2014 11:10
AES Encryption in php ( MCRYPT_RIJNDAEL_256 )
<?php
function fnEncrypt($sValue, $sSecretKey)
{
return rtrim(
base64_encode(
mcrypt_encrypt(
MCRYPT_RIJNDAEL_256,
$sSecretKey, $sValue,
MCRYPT_MODE_ECB,
mcrypt_create_iv(
@netcode
netcode / backupme.sh
Created August 23, 2014 11:02
shell script to backup files
#!/bin/bash
NOWX="$(date +'%m-%d-%y.%I-%M-%S')"
FILE="mywebsite.$NOWX.tar.gz"
echo "Starting Backup"
echo "=========================="
tar -zcvf backups/$FILE mywebsite/
echo "=========================="
echo "Done backup"
@netcode
netcode / crontab -e
Created August 13, 2014 11:49
auto fix mongodb after server crash
#add this line in crontab -e with root privilages
@reboot /var/www/fixmongo.sh