Skip to content

Instantly share code, notes, and snippets.

@naazeri
naazeri / Dockerfile
Last active January 18, 2020 03:09 — forked from kubaceg/Dockerfile
Docker install ioncube extension (php 7.3)
# replace wordpress with any image you like :)
FROM wordpress:php7.3-fpm-alpine
RUN curl -o ioncube.tar.gz http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \
&& tar -xvvzf ioncube.tar.gz \
&& mv ioncube/ioncube_loader_lin_7.3.so `php-config --extension-dir` \
&& rm -Rf ioncube.tar.gz ioncube \
&& docker-php-ext-enable ioncube_loader_lin_7.3
@naazeri
naazeri / gist:167ce9941098930e1160864e3753be29
Created March 9, 2021 15:01
Show All Git Commits in Beautiful Mode
git log --oneline --graph --reflog --date-order
@naazeri
naazeri / gistGitAlias.md
Last active March 23, 2023 18:05
Add Alias to Git

this command set alias for git add -A to git a:

git config --global alias.a 'add -A'

@naazeri
naazeri / n28s.lua
Created December 2, 2022 16:43 — forked from Lerg/n28s.lua
Script wrapper for Defold
local hashed = require('libs.hashed')
local _M = {}
local scripts = {}
-- NoMoreGlobalFunctionsInScripts
function _M.new()
local script = {
import random
# choices in game. r=rock, p=paper, s=scissors
choices = ['r', 'p', 's']
# get user input
userChoice = input('Choose your weapon [r]ock, [p]aper, or [s]cissors: ')
if userChoice not in choices:
print('Invalid input')
import random
numbers = []
def getUniqueRandom(start, end):
while True:
n = random.randrange(start, end)
if n not in numbers:
return n
class Node:
def __init__(self, value):
self.value = value
self.next = None
class LinkedList:
def __init__(self, head=None):
self.head = head
from tkinter import *
from tkinter.ttk import *
from time import strftime
# creating window
window = Tk()
window.title('Clock')
# create label
setTimeout(() => {
console.log("timeout 1")
Promise.resolve().then(() => {
console.log("p1")
})
}, 0)
setTimeout(() => {
console.log("timeout 2")
void multiply(int number)
{
number *= 2;
}
void add(ref int number)
{
number += 1;
}