Skip to content

Instantly share code, notes, and snippets.

Avatar
🍪
Eating Cookies

Adem Kouki Ademking

🍪
Eating Cookies
View GitHub Profile
@Ademking
Ademking / README.md
Last active Jul 31, 2020
How to expose virtual machine to Internet and make LDAP accessible
View README.md

How to expose virtual machine to Internet and make LDAP accessible

In this example we need to make port 389 (LDAP) accessible

  1. In virtualbox, go to :
Machine --> Settings --> Network --> Attached to: Bridged Adapter
  1. In your virtual machine, get your guest ipv4 address. In our case it's: 192.168.1.4
@Ademking
Ademking / README.md
Created Jul 23, 2020
LDAP + Windows server 2019 + Laravel
View README.md

Testing LDAP Connection (Native PHP)

  1. Install:
  • Windows server 2019
  • Make windows server IP static: In Virtualbox, Machine -> Settings -> Network -> Bridged Adapter
  1. We will need these information:
  • Server IP address: (you can get it using "ipconfig" command)
  • Admin username: (Example: Administrator)
  • Admin password: (Example: 123456789A@)
View README.md
@Ademking
Ademking / README.md
Created Jun 29, 2020
Web Dev (Frontend)
View README.md
@Ademking
Ademking / README.md
Last active Aug 8, 2020
Heroku Notes
View README.md

How to add heroku app to existing project

heroku git:remote -a HEROKU_APP_NAME_HERE

Heroku deployment without the app being at the repo root (in a subfolder)

git add .
git commit -m "First Commit"
git subtree push --prefix NAME_OF_SUBFOLDER_HERE heroku master
@Ademking
Ademking / nearest.js
Created Jun 14, 2020
JS: Find Nearest Color from Array
View nearest.js
const baseColors = [
{
"hex": "#FFFFFF",
"name": "White",
},
{
"hex": "#000000",
"name": "Black",
},
{
@Ademking
Ademking / README.md
Created May 13, 2020
Extract uncompiled, uncompressed SPA code from Webpack source maps.
View README.md
@Ademking
Ademking / Note.md
Created Apr 4, 2020
Run Android Emulator directly ( without a console window )
View Note.md

Don't forget to rename your avd. In this example "Pixel_2_API_27"

@Ademking
Ademking / app.js
Created Nov 4, 2019
Remove duplicates from Array
View app.js
// Helper function - remove duplicates from Array
function uniq(a) {
var seen = {};
return a.filter(function(item) {
return seen.hasOwnProperty(item) ? false : (seen[item] = true);
});
}
@Ademking
Ademking / README.md
Last active Oct 23, 2019
Windows 10 - Remove Garbage apps
View README.md

(UPDATE): Remove Bloatware using "Windows10Debloater" [with GUI]

  1. Run Powershell (as admin)

  2. Copy/paste

 iex ((New-Object System.Net.WebClient).DownloadString('https://git.io/debloat')) 
You can’t perform that action at this time.