Skip to content

Instantly share code, notes, and snippets.

View DKepov's full-sized avatar
💭
🏡 Working

Dmitriy Kepov DKepov

💭
🏡 Working
View GitHub Profile
@qoomon
qoomon / conventional_commit_messages.md
Last active May 23, 2024 13:32
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@afriza
afriza / twinkle-auto-call-answer.go
Last active April 22, 2020 17:43
Twinkle Linux SIP/VoIP auto call and auto answer via command line
package main
import (
"bufio"
"context"
"flag"
"fmt"
"log"
"os/exec"
"strings"
@diogocapela
diogocapela / moment-js-timezones.txt
Created September 7, 2018 00:10
List of All Moment.js Timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active May 22, 2024 13:04
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@landzz
landzz / curl.post.multipart.php
Created June 8, 2018 06:52
php curl post with file (multipart)
<?php
if ( ! function_exists('getCurlPostwithFile')){
function getCurlPostwithFile($_url='', $_param=array(), $_file_name=array()){
if($_url !=''){
ini_set("memory_limit", "512M");
$_file_data = array();
foreach ($_file_name as $_key => $_val){
@carousel
carousel / snake-to-camel.php
Last active May 8, 2024 15:42
Convert snake to camel case and back with PHP
<?php
function camel_to_snake($input)
{
return strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', $input));
}
function snakeToCamel($input)
{
return lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $input))));
}
@qti3e
qti3e / README.md
Last active April 13, 2024 15:50
List of file signatures and mime types based on file extensions
@maxivak
maxivak / __upload_file.md
Last active April 4, 2024 10:07
PHP upload file with curl (multipart/form-data)

We want to upload file to a server with POST HTTP request. We will use curl functions.


// data fields for POST request
$fields = array("f1"=>"value1", "another_field2"=>"anothervalue");

// files to upload
$filenames = array("/tmp/1.jpg", "/tmp/2.png");
pierstoval@PIERSTOVAL /mnt/e/dev/www/sandbox $ ./test.bash
KO for key ALLUSERSPROFILE
KO for key APPDATA
KO for key CLINK_DIR
KO for key CommonProgramFiles
KO for key CommonProgramW6432
KO for key COMPUTERNAME
KO for key ComSpec
KO for key FPS_BROWSER_APP_PROFILE_STRING
@luciddreamz
luciddreamz / keycloak.sh
Last active February 27, 2024 05:26 — forked from paoloantinori/keycloak.sh
Keycloak Admin API Rest Example: Get User
#!/bin/bash
# requires https://stedolan.github.io/jq/download/
# config
KEYCLOAK_URL=http://localhost:8080/auth
KEYCLOAK_REALM=realm
KEYCLOAK_CLIENT_ID=clientId
KEYCLOAK_CLIENT_SECRET=clientSecret
USER_ID=userId