Skip to content

Instantly share code, notes, and snippets.

View MindaugasR's full-sized avatar

Mindaugas MindaugasR

View GitHub Profile
@MindaugasR
MindaugasR / SteamUserFunctions.php
Created March 19, 2019 09:35 — forked from rannmann/SteamUserFunctions.php
Convert Steam IDs to and from Community IDs and User IDs
<?php
/* Examples
toSteamID(25490879) // STEAM_0:1:12745439
toSteamID(76561197985756607) // STEAM_0:1:12745439
toSteamID("STEAM_0:1:12745439") // STEAM_0:1:12745439
toUserID(25490879) // 25490879
toUserID(76561197985756607) // 25490879
toUserID("STEAM_0:1:12745439") // 25490879
@MindaugasR
MindaugasR / nedarbo_dienos.php
Last active November 11, 2016 08:02
Nedarbo dienų apskaičiavimas
<?php
/**
* @param DateTime|null $date
* @return string|null
*/
function isNotWorkingDay(DateTime $date = null)
{
$localDate = $date ? clone $date : new DateTime();
$month = (int)$localDate->format('n');
$day = (int)$localDate->format('j');
@MindaugasR
MindaugasR / JavaScriptCountries.js
Last active January 17, 2016 20:15
JavaScript Countries
var Country = {
countries: {
"AC": {
countryName: "ASCENSION ISLAND",
countryCode: "247",
currencyCode: "EURO"
},
"AF": {
countryName: "AFGHANISTAN",
countryCode: "93",
@MindaugasR
MindaugasR / PrestaShop full backup script
Last active July 17, 2020 11:08
PrestaShop full backup script
#!/bin/bash
#Main settings
DOMAIN_DIR="/path/to/your/public_html"
BACKUP_DIR="/path/to/your/backup"
DATE=$(date +%Y-%m-%d)
# MySQL Settings
DB_HOST="localhost"
DB_USER="mysql_username"
@MindaugasR
MindaugasR / currency_list
Last active December 8, 2022 13:34
World Currency list in PHP Array
array (
'ALL' => 'Albania Lek',
'AFN' => 'Afghanistan Afghani',
'ARS' => 'Argentina Peso',
'AWG' => 'Aruba Guilder',
'AUD' => 'Australia Dollar',
'AZN' => 'Azerbaijan New Manat',
'BSD' => 'Bahamas Dollar',
'BBD' => 'Barbados Dollar',
'BDT' => 'Bangladeshi taka',