Skip to content

Instantly share code, notes, and snippets.

View maxoralbay's full-sized avatar
🏠
Working from home

Maxat Oralbayev maxoralbay

🏠
Working from home
View GitHub Profile
@elisei
elisei / install_lamp_18.sh
Created December 18, 2018 01:12 — forked from ankurk91/install_lamp_ubuntu.sh
Ubuntu 18.04 - PHP development (php 7.2, MySQL 5.7, apache 2.4)
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Ubuntu 18.04 dev Server
# Run like - bash install_lamp.sh
# Script should auto terminate on errors
echo -e "\e[96m Adding PPA \e[39m"
sudo add-apt-repository -y ppa:ondrej/apache2
@rhuancarlos
rhuancarlos / sources.list
Created October 5, 2018 03:22
Ubuntu 18.04 Bionic default /etc/apt/sources.list
#deb cdrom:[Ubuntu 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426)]/ bionic main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
@kentkrantz
kentkrantz / table_tostring.lua
Last active November 18, 2020 09:32
Convert lua table to string
function table.val_to_str ( v )
if "string" == type( v ) then
v = string.gsub( v, "\n", "\\n" )
if string.match( string.gsub(v,"[^'\"]",""), '^"+$' ) then
return "'" .. v .. "'"
end
return '"' .. string.gsub(v,'"', '\\"' ) .. '"'
else
return "table" == type( v ) and table.tostring( v ) or
tostring( v )
@thegitfather
thegitfather / vanilla-js-cheatsheet.md
Last active March 10, 2024 11:48
Vanilla JavaScript Quick Reference / Cheatsheet
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active March 15, 2024 21:29
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@randrews
randrews / match_test.lua
Created June 10, 2011 06:14
Toy regular expression matcher in Lua
require "match"
test("Basic match",
function()
assert(("floob"):match("flo"))
assert(not ("floob"):match("nar"))
end)
test("Caret match",
function()