Skip to content

Instantly share code, notes, and snippets.

View Ademking's full-sized avatar
🍪
Eating Cookies

Adem Kouki Ademking

🍪
Eating Cookies
View GitHub Profile
@Ademking
Ademking / README.md
Created June 30, 2020 22:48
Android Dev
@Ademking
Ademking / README.md
Created June 29, 2020 02:12
Web Dev (Frontend)
@Ademking
Ademking / README.md
Last active August 8, 2020 04:44
Heroku Notes

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 June 14, 2020 23:23
JS: Find Nearest Color from Array
const baseColors = [
{
"hex": "#FFFFFF",
"name": "White",
},
{
"hex": "#000000",
"name": "Black",
},
{
@Ademking
Ademking / README.md
Created May 13, 2020 07:14
Extract uncompiled, uncompressed SPA code from Webpack source maps.
@Ademking
Ademking / Note.md
Created April 4, 2020 07:06
Run Android Emulator directly ( without a console window )

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

@Ademking
Ademking / app.js
Created November 4, 2019 12:35
Remove duplicates from Array
// 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 December 22, 2023 14:21
Windows 10 - Remove Garbage apps

(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')) 
@Ademking
Ademking / README.md
Created September 14, 2019 03:23
Create UUID
function create_UUID() {
		var dt = new Date().getTime();
		var uuid = 'xxyxxxxxxyxxxxxyxxxx'.replace(/[xy]/g, function(c) {
			var r = (dt + Math.random() * 16) % 16 | 0;
			dt = Math.floor(dt / 16);
			return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16);
		});
		return uuid;
	}
@Ademking
Ademking / README.md
Last active August 30, 2019 13:05
Facebook api links
1: Count the number of sent messages
https://graph.facebook.com/me/threads?limit=50&access_token=xxxxxxxxxxx

2: Delete the message
https://graph.facebook.com/id_tu_api_dem_tin_nhan?access_token=&method=delete

3: Get ds all your friends
https://graph.facebook.com/fql?q=SELECT+uid,+name,+friend_count,+subscriber_count+FROM+user+WHERE+uid+IN+(SELECT+uid2+FROM+friend+WHERE+uid1+=+me())++ORDER+BY+rand()+LIMIT+5000&access_token=