Skip to content

Instantly share code, notes, and snippets.

View kral2's full-sized avatar
☁️

Çetin ARDAL kral2

☁️
View GitHub Profile
@devops-adeel
devops-adeel / aad_oidc_grp.tf
Last active October 11, 2023 15:30
Terraform snippet to setup AzureAD Auth Method.
locals {
aad_group = var.aad_group
application = var.application_name
mount_accessor = var.mount_accessor
}
data "azuread_group" "default" {
display_name = local.aad_group
}
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 24, 2024 18:21
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@mwpastore
mwpastore / 00README.md
Last active April 18, 2024 06:21
Lightning Fast WordPress: Caddy+Varnish+PHP-FPM

README

This gist assumes you are migrating an existing site for www.example.com — ideally WordPress — to a new server — ideally Ubuntu Server 16.04 LTS — and wish to enable HTTP/2 (backwards compatibile with HTTP/1.1) with always-on HTTPS, caching, compression, and more. Although these instructions are geared towards WordPress, they should be trivially extensible to other PHP frameworks, other FastCGI backends, and even non-FastCGI backends (using proxy in lieu of fastcgi in the terminal Caddyfile stanza).

Quickstart: Use your own naked and canonical domain names instead of example.com and www.example.com and customize the Caddyfile and VCL provided in this gist to your preferences!

These instructions target Varnish Cache 4.1, PHP-FPM 7.0, and Caddy 0.10. (I'm using MariaDB 10.1 as well, but that's not relevant to this guide.)

@dcode
dcode / GitHub Flavored Asciidoc (GFA).adoc
Last active April 20, 2024 13:55
Demo of some useful tips for using Asciidoc on GitHub

GitHub Flavored Asciidoc (GFA)

@squarism
squarism / iterm2.md
Last active April 23, 2024 11:45
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@mo6020
mo6020 / homebrew.sh
Last active November 21, 2015 22:56
#!/usr/bin/env bash
# Ed Morgan [ed@edmorgan.info]
# version 1.2
# 11/09/2015
# Install Hombrew first!
# Make sure we’re using the latest Homebrew
echo "Updating brews..."
brew update
@danjellesma
danjellesma / centos-7-vmware-template.md
Last active January 29, 2018 16:14
CentOS 7 VMware Customization

Created on: June 26, 2015

Last Updated: July 14, 2015

Synopsis: CentOS 7 on vSphere 5.5 does not clone out correctly using normal cloning methods. Running these fixes allows VMware to deploy from a CentOS 7 template with proper customizations.

Failure to perform these actions can result in :

  • Naming failure inside the VM
  • DNS Registration Failure
@kral2
kral2 / send-myip-gmail.ps1
Created October 18, 2014 16:43
Get IPv4 and mail it with gmail in powershell
# Quick powershell script to :
# Get the IPv4 and send it using gmail smtp server. Handy when there is no local SMTP server available
# !! Warning !! You need to provide your credentials in plain text ...
$date = (get-date).ToString()
# Get IPv4. Quick filter with -like "1*" to exclude IPv6. There should be a better way to do it ...
$IP = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -filter "ipenabled=true" |
Where { $_.IPAddress -like "1*"} |
Select -ExpandProperty IPAddress | select -First 1
@vladimirtsyupko
vladimirtsyupko / gist:10964772
Created April 17, 2014 08:32
Git force pull to overwrite local files
git fetch --all
git reset --hard origin/master
git pull origin master