Skip to content

Instantly share code, notes, and snippets.

View uurtech's full-sized avatar
✈️
Works

Ugur KAZDAL uurtech

✈️
Works
View GitHub Profile
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 3, 2024 12:59
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@jgrodziski
jgrodziski / docker-aliases.sh
Last active April 30, 2024 17:46
Useful Docker Aliases
############################################################################
# #
# ------- Useful Docker Aliases -------- #
# #
# # Installation : #
# copy/paste these lines into your .bashrc or .zshrc file or just #
# type the following in your current shell to try it out: #
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash
# #
# # Usage: #
@xameeramir
xameeramir / default nginx configuration file
Last active April 27, 2024 12:35
The default nginx configuration file inside /etc/nginx/sites-available/default
# Author: Zameer Ansari
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@arxdsilva
arxdsilva / working_directory.go
Last active February 12, 2024 13:30
How to get the current working directory in golang
package main
// More info on Getwd()
// https://golang.org/src/os/getwd.go
//
import(
"os"
"fmt"
"log"
)
@ichadhr
ichadhr / jekyll-post-thor.md
Last active February 8, 2024 10:27
Jekyll create post with command

CREATE JEKYLL POSTS FROM THE COMMAND LINE

I got tired on creating new files manually for each new post a write so I put together this little command line task with Thor.

It creates a new file in the _posts directory with today’s date, parses the parameters to command as the post’s title and adds that as a slug to the new file. It then writes a default yaml template to the file (as specified in the script).

Running thor jekyll:new New and shiny post will for example create the file _posts/2012-12-28-new-and-shiny-post.markdown, populate it with an yaml template and finally open the file in my favorite editor.

HOW TO

Add the following to your Gemfile:

@anamorph
anamorph / check_unattached_EIPs.sh
Created January 8, 2024 08:59
[aws] List all the Unattached Elastic IP addresses in all of the Opted-In Regions
#!/bin/sh
# id: check_unattached_EIPs.sh
# author: nicolas david - nicolas@openlab.fr
#
## version history:
# ----------------------------------------------------------------------------
# v1.0 nicolas@ Initial Version
#
# ----------------------------------------------------------------------------
@uurtech
uurtech / test.js
Created January 3, 2024 20:28
Js Object Countries with Flag Emoji
const countries = [
{ name:"Åland Islands" ,code:"+358", flag: "🇦🇽" },
{ name:"Albania" ,code:"+355", flag: "🇦🇱" },
{ name:"Algeria" ,code:"+213", flag: "🇩🇿" },
{ name:"American Samoa" ,code:"+1684", flag: "🇦🇸" },
{ name:"Andorra" ,code:"+376", flag: "🇦🇩" },
{ name:"Angola" ,code:"+244", flag: "🇦🇴" },
{ name:"Anguilla" ,code:"+1264", flag: "🇦🇮" },
{ name:"Antigua & Barbuda" ,code:"+1268", flag: "🇦🇬" },
{ name:"Argentina" ,code:"+54", flag: "🇦🇷" },
@vikas5914
vikas5914 / log.js
Last active December 12, 2023 14:09
Custom Logger Library with winston
const { createLogger, format, transports } = require('winston')
const moment = require('moment')
// set default log level.
const logLevel = 'info'
var logger = createLogger({
level: logLevel,
levels: {
fatal: 0,
@jibs
jibs / gcloud-port-forward.md
Created April 25, 2015 15:57
port forwarding with a google cloud instance

Google cloud's ssh command lets you pass standard ssh flags. To, for example, forward local port 8088 to port 8088 on a vm instance, all you need to do is:

gcloud compute  ssh --ssh-flag="-L 8088:localhost:8088"  --zone "us-central1-b" "example_instance_name"

Now browsing to localhost:8088 works as it would with standard ssh.

@rtgibbons
rtgibbons / logger.js
Created November 7, 2013 13:51
Logger Library with winston
var app = require(process.cwd() + '/app');
var winston = require('winston');
var _ = require('lodash');
// Set up logger
var customColors = {
trace: 'white',
debug: 'green',
info: 'green',
warn: 'yellow',