Skip to content

Instantly share code, notes, and snippets.

View TuralAsgar's full-sized avatar

Tural Asgar TuralAsgar

View GitHub Profile
@Pen-y-Fan
Pen-y-Fan / Info for PHPStorm.md
Last active April 15, 2024 16:25
PHPStorm Tips, Tricks and setup

PHPStorm

PhpStorm Tips, ticks and standard setup

  1. Tips and Tracks for PHPStorm (PHPStorm Tips and Tricks.md)
  2. Standard setup for PHP projects (Standard.md)
@justsml
justsml / fetch-api-examples.md
Last active February 24, 2024 18:05
JavaScript Fetch API Examples
@ale10257
ale10257 / menu.php
Last active August 31, 2020 11:57
Yii2 displaying a menu with an unlimited nesting level from Nested Sets
<?php
/**
* @var $this yii\web\View
* @var $categories \app\models\Category[]
* @var $level_start int
*/
use yii\helpers\Html;
[Unit]
Description=ServiceName
Documentation=https://example.com/doc.txt
After=network-online.target
Wants=network-online.target systemd-networkd-wait-online.service
[Service]
Restart=on-failure
PermissionsStartOnly=true
User=programusername
@ishanjain28
ishanjain28 / nginx
Last active September 5, 2017 22:13
# nginx reverse proxy configuration for hosting two websites on one server
# File has to be saved in /etc/nginx/sites-available/website
# Then link it and store that in ../sites-enabled
# Also this configuration can be used to enable https on a website, Remove the third server {} block.
server {
# Redirect from http to https
listen 80;
listen [::]:80 default_server;
return 301 https://$host$request_uri;
@sosedoff
sosedoff / 1_simple.go
Created July 16, 2016 18:45
Golang Custom Struct Tags Example
package main
import (
"fmt"
"reflect"
)
// Name of the struct tag used in examples
const tagName = "validate"
@tanyuan
tanyuan / smart-caps-lock.md
Last active May 8, 2024 16:05
Smart Caps Lock: Remap Caps Lock to Control AND Escape

Smart Caps Lock: Remap to Control AND Escape (Linux, Mac, Windows)

Caps Lock 變成智慧的 Control 以及 Escape

  • 單獨輕按一下就是 Escape
  • 若按下時同時按著其他鍵,就會是 Control

這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)

  • Send Escape if you tap Caps Lock alone.
@albulescu
albulescu / download.go
Created March 25, 2016 09:44
golang download file with progress
package main
/**
* @website http://albulescu.ro
* @author Cosmin Albulescu <cosmin@albulescu.ro>
*/
import (
"bytes"
"fmt"
@tabula-rasa
tabula-rasa / ckupload.go
Created November 20, 2015 19:25
Golang handler for Ckeditor image upload
package controllers
import (
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"
"path/filepath"
@kujiy
kujiy / git-bash.exe-args
Last active April 20, 2023 13:55
How to open a specific folder with git-bash.exe from a command line(shell)
With argument
"C:\Program Files\Git\git-bash.exe" "--cd=%1"
Direct
"C:\Program Files\Git\git-bash.exe" "--cd="C:\YOUR\FOLDER\"