Global Variables:
- Should be constants, in
ALL_CAPS
- Or variables prefixed with
_underscore
Constant values should be in ALL_CAPS
other variables should be snake_case
or camelCase
Functions and Methods should be PascalCase
FROM php:7.3-apache | |
RUN docker-php-ext-install mysqli | |
# Use the default production configuration | |
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" | |
# Path to search for mysql UNIX socket | |
RUN echo "mysqli.default_socket=/var/run/mysqld/mysqld.sock" >> $PHP_INI_DIR/php.ini | |
# Allow short open tags |
Print(obj, quote:=False, end:="`n") | |
{ | |
static cout:=FileOpen("*", "w") | |
, escapes := [["``", "``" "``"], ["""", """"""], ["`b", "``b"] | |
, ["`f", "``f"], ["`r", "``r"], ["`n", "``n"], ["`t", "``t"]] | |
if IsObject(obj) | |
{ | |
for k in obj | |
is_array := k == A_Index | |
until !is_array |
; Script to turn the Synaptics Touchpad on and off. Useful for laptops with | |
; Synaptic touchpads that do not have dedicated touchpad on/off buttons. I use | |
; this code to quickly toggle on and off the touchpad on my Lenovo Thinkpad, | |
; where I primarily use the TrackPoint. | |
; API Reference | |
; https://autohotkey.com/board/topic/65849-controlling-synaptics-touchpad-using-com-api/page-2#entry416712 | |
; Constants |
#NoEnv | |
SetBatchLines, -1 | |
map := FileOpen(A_Desktop "\day3.txt", "r").Read() | |
map := StrSplit(map, "`n", "`r") | |
; --- Part 1 --- | |
for y, row in map |
#NoEnv | |
SetBatchLines, -1 | |
Gui, Add, Button, gDoConversion, Convert from Markdown to BBCode | |
Gui, Add, Edit, w640 h480 vPost | |
Gui, Show | |
return | |
GuiClose: | |
ExitApp |
Array_Gui(Array, Parent="") { | |
if !Parent | |
{ | |
Gui, +HwndDefault | |
Gui, New, +HwndGuiArray +LabelGuiArray +Resize | |
Gui, Margin, 5, 5 | |
Gui, Add, TreeView, w300 h200 | |
Item := TV_Add("Array", 0, "+Expand") | |
Array_Gui(Array, Item) |
Gson_Window() | |
{ | |
static dom, window | |
if window | |
return window | |
dom := ComObjCreate("htmlfile") | |
dom.write("<meta http-equiv='X-UA-Compatible'content='IE=edge'><script> | |
( Comment |