Skip to content

Instantly share code, notes, and snippets.

View ramazansancar's full-sized avatar
📚
Study

Ramazan Sancar ramazansancar

📚
Study
View GitHub Profile
@refo
refo / 0- Docker Caddy Wordpress.md
Last active September 27, 2022 14:28
Docker Caddy Wordpress

Docker Caddy Wordpress

@chaojian-zhang
chaojian-zhang / DockerUsageNotes.md
Last active February 10, 2023 21:44
Docker Usages Notes

Basics

  • docker run --name <your_container_name> alpine/git <git_command>
  • docker run -it --name <your_container_name> alpine/git <git_command>: Run with tty interactive
  • docker run -d --name couch -p 8091-8094:8091-8094 -p 11210:11210 couchbase: Run (e.g. a server) unattached
  • docker cp container_name:/git/getting-started .: Copy files/folders between a container and the local filesystem
  • docker start <your_container_name>: Start a stopped container
  • docker attach <your_container_name>: Attach to running container
@allaniftrue
allaniftrue / keypress.js
Created June 3, 2021 06:46
Reactjs prevent characters on keypress
use { useState } from 'react';
const Test = () => {
const [tipAmount, setTipAmount] = useState('');
const handleKeypress = (e) => {
if(!((e.keyCode > 95 && e.keyCode < 106)
|| (e.keyCode > 47 && e.keyCode < 58)
|| e.keyCode == 8)) {
e.preventDefault(); // Let's stop this event.
#!/bin/bash
# From https://github.com/LIAAD/yake#installing-docker
# Install dependencies
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
@allaniftrue
allaniftrue / countries.json
Created April 16, 2021 02:00
Alpha-2 ISO3166 countries
[
{
"label": "Afghanistan",
"value": "AF"
},
{
"label": "Åland Islands",
"value": "AX"
},
{
@jwalton
jwalton / main_benchmark_test.go
Last active November 8, 2023 14:04
Gawk Benchmark
package main
import (
"testing"
"github.com/fatih/color"
"github.com/jwalton/gchalk"
"github.com/logrusorgru/aurora"
"github.com/mgutz/ansi"
"github.com/muesli/termenv"
@sindresorhus
sindresorhus / esm-package.md
Last active June 1, 2024 19:35
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@regstuff
regstuff / 16-merge.txt
Created February 22, 2021 12:41
Merge 16 mono audios into one 16 channel audio
ffmpeg -i 1.wav -i 2.wav -i 3.wav -i 4.wav -i 5.wav -i 6.wav -i 7.wav -i 8.wav -i 9.wav -i 10.wav -i 11.wav -i 12.wav -i 13.wav -i 14.wav -i 15.wav -i 16.wav -filter_complex "[2:a][0:a][1:a][3:a][4:a][5:a][6:a][7:a][8:a][9:a][10:a][11:a][12:a][13:a][14:a][15:a]join=inputs=16:channel_layout=hexadecagonal[a]" -map "[a]" output.wav
{
"RequestID": "MakeOrder_5332109163_20210126134804",
"Name": "OZGUR AKSU",
"MobilePhone": "5332109163",
"ProductIDs": [
262,
131,
130,
134,
244,
@mertcb
mertcb / create_server.sh
Created January 11, 2021 19:20
Create Jitsi Server in one command
# ENTER YOUR CUSTOM VALUES HERE
HOSTNAME="subdomain.example.com"
EMAIL="info@example.com"
# set hostname
hostnamectl set-hostname $HOSTNAME
echo -e "127.0.0.1 localhost $HOSTNAME" >> /etc/hosts
# add Jitsi to sources
wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | sudo apt-key add -