Skip to content

Instantly share code, notes, and snippets.

View Bellov's full-sized avatar
:octocat:

Alexander Atanasov Bellov

:octocat:
  • Sofia, Bulgaria
View GitHub Profile
@Bellov
Bellov / countries_codes_and_coordinates in array
Created August 22, 2023 08:30
All countries with country code and corinates
$countryData = [
["Country", "Alpha-2 code", "Alpha-3 code", "Numeric code", "Latitude (average)", "Longitude (average)"],
["Afghanistan", "AF", "AFG", "4", "33", "65"],
["Albania", "AL", "ALB", "8", "41", "20"],
["Algeria", "DZ", "DZA", "12", "28", "3"],
["American Samoa", "AS", "ASM", "16", "-14.3333", "-170"],
["Andorra", "AD", "AND", "20", "42.5", "1.6"],
["Angola", "AO", "AGO", "24", "-12.5", "18.5"],
["Anguilla", "AI", "AIA", "660", "18.25", "-63.1667"],
["Antarctica", "AQ", "ATA", "10", "-90", "0"],
@Bellov
Bellov / countries_codes_and_coordinates.csv
Created August 22, 2023 07:17 — forked from tadast/countries_codes_and_coordinates.csv
Countries with their (ISO 3166-1) Alpha-2 code, Alpha-3 code, UN M49, average latitude and longitude coordinates
Country Alpha-2 code Alpha-3 code Numeric code Latitude (average) Longitude (average)
Afghanistan AF AFG 4 33 65
Albania AL ALB 8 41 20
Algeria DZ DZA 12 28 3
American Samoa AS ASM 16 -14.3333 -170
Andorra AD AND 20 42.5 1.6
Angola AO AGO 24 -12.5 18.5
Anguilla AI AIA 660 18.25 -63.1667
Antarctica AQ ATA 10 -90 0
Antigua and Barbuda AG ATG 28 17.05 -61.8
@Bellov
Bellov / copy to clipboard
Created November 2, 2022 19:55
copy to clipboard vanila js
const el = document.createElement("textarea"); // Create a <textarea> element
el.value = str; // Set its value to the string that you want copied
el.setAttribute("readonly", ""); // Make it readonly to be tamper-proof
el.style.position = "absolute";
el.style.left = "-9999px"; // Move outside the screen to make it invisible
document.body.appendChild(el); // Append the <textarea> element to the HTML document
const selection = document.getSelection();
const selected =
selection && selection.rangeCount > 0 // Check if there is any content selected previously
@Bellov
Bellov / PHP global helper for convet sum to BG words
Last active July 21, 2021 12:24
PHP global helper for convet sum to BG words
/*
* Convert number to bg words
* Example
* 1000 => хиляда лева
* 1000,2 => хиляда лева и 2 стотинки
*/
if (!function_exists('numberToLv')) {
function numberToLv($number)
@Bellov
Bellov / VSC settings json
Last active April 1, 2021 17:23
VSC settings json
{
// "editor.fontFamily": "Menlo, Monaco, 'Courier New', monospace",
"editor.lineHeight": 19,
"terminal.external.linuxExec": "zsh",
"terminal.integrated.shell.osx": "/bin/zsh",
"terminal.integrated.fontFamily": "Hasklig, Consolas, 'Courier New', monospace",
"terminal.integrated.fontSize": 16,
"editor.fontSize": 16,
"editor.wordWrap": "on",
"editor.autoClosingBrackets": "always",
@Bellov
Bellov / My Settings for VSC
Last active November 15, 2019 10:17
My Settings for VSC
{
"todo-tree.customHighlight": {
"TODO": {},
"FIXME": {}
},
"editor.rulers": [
120
],
"workbench.colorCustomizations": {
"statusBar.background": "#a8a8a8",
@Bellov
Bellov / my bash_profile
Created May 13, 2019 10:46
Bash Profile
#!/bin/bash
# ~/.bashrc - bash interactive session config
#
# is this an interactive session?
#
[[ -z "${PS1}" ]] && return
#
@Bellov
Bellov / key.md
Created February 7, 2019 07:57
FREE IntelliJ IDEA key 2018.2!

READ or DIE

  • put 0.0.0.0 account.jetbrains.com into your hosts file (C:\Windows\System32\drivers\etc\hosts or /etc/hosts)
  • for GayOS macOS read that
  • use the key below
K71U8DBPNE-eyJsaWNlbnNlSWQiOiJLNzFVOERCUE5FIiwibGljZW5zZWVOYW1lIjoibGFuIHl1IiwiYXNzaWduZWVOYW1lIjoiIiwiYXNzaWduZWVFbWFpbCI6IiIsImxpY2Vuc2VSZXN0cmljdGlvbiI6IkZvciBlZHVjYXRpb25hbCB1c2Ugb25seSIsImNoZWNrQ29uY3VycmVudFVzZSI6ZmFsc2UsInByb2R1Y3RzIjpbeyJjb2RlIjoiSUkiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJSUzAiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJXUyIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IlJEIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiUkMiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJEQyIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IkRCIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiUk0iLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJETSIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IkFDIiwicGFpZFVwVG8iOiIy
@Bellov
Bellov / Stylesheet file for ATOM
Last active October 5, 2018 13:15
My stylesheet file for ATOM
/* variable defaults */
@syntax-cursor-line: transparent;
/* stuff in the status bar */
status-bar {
text-transform: lowercase;
.deprecation-cop-status {
color: inherit;
@Bellov
Bellov / Laravel ENV file for PQSL
Last active September 14, 2018 10:55
env file for laravel pgsql db
APP_ENV=local
APP_DEBUG=true
APP_KEY=base64:***************************
APP_URL=http://localhost
DB_CONNECTION=pgsql
DB_HOST=hostname
DB_PORT=5432
DB_DATABASE=Your database name
DB_USERNAME=Your database username