Skip to content

Instantly share code, notes, and snippets.

View rhazdon's full-sized avatar
:fishsticks:
Casting

Djordje Atlialp rhazdon

:fishsticks:
Casting
View GitHub Profile
# Start G-Code
G21 ;Use metric values
G90 ;Absolute positioning
M82 ;Set extruder to absolute mode
M107 ;Start with the fan off
G28 X0 Y0 ;Move X/Y to min endstops
G28 Z0 ;Move Z to min endstops
G1 Z5 ;Go away from board
G1 X130 Y15 Z0.5 ;Go to toilette
@rhazdon
rhazdon / postgres_queries_and_commands.sql
Created October 26, 2019 20:27 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@rhazdon
rhazdon / Device.swift
Created September 14, 2018 17:42 — forked from imkevinxu/Device.swift
iOS device checks for OS version and screen size in Swift
//
// Device.swift
// imHome
//
// Created by Kevin Xu on 2/9/15. Updated on 6/20/15.
// Copyright (c) 2015 Alpha Labs, Inc. All rights reserved.
//
import Foundation
@rhazdon
rhazdon / Dockerfile
Created April 28, 2018 23:22 — forked from yefim/Dockerrun.aws.json
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
# Example Dockerfile
FROM hello-world
@rhazdon
rhazdon / default.conf
Created April 21, 2018 11:46 — forked from cbmd/default.conf
nginx config - dynamic virtual hosts
server {
index index.php;
set $basepath "/var/www";
set $domain $host;
# check one name domain for simple application
if ($domain ~ "^(.[^.]*)\.dev$") {
set $domain $1;
set $rootpath "${domain}";
@rhazdon
rhazdon / consul.lua
Created April 21, 2018 11:46 — forked from gmr/consul.lua
Dynamic Nginx upstream nodes using Consul
module("resty.consul", package.seeall)
_VERSION = '0.1.0'
function service_nodes(service)
local http = require "resty.http"
local json = require "cjson"
local hc = http:new()
local upstream = ""
@rhazdon
rhazdon / web-servers.md
Created October 24, 2017 09:46 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@rhazdon
rhazdon / Solarized High Contrast Dark.itermcolors
Created May 12, 2017 10:23 — forked from heisters/Solarized High Contrast Dark.itermcolors
Solarized High Contrast Dark theme for iTerm2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.19370138645172119</real>
<key>Green Component</key>
<real>0.15575926005840302</real>

Keybase proof

I hereby claim:

  • I am rhazdon on github.
  • I am rhazdon (https://keybase.io/rhazdon) on keybase.
  • I have a public key ASDuCA-7LCxWJpQS_lPVJ6vdGMDsnzO6ZB6aL3T623KWQAo

To claim this, I am signing this object:

@rhazdon
rhazdon / mattermost-theme.md
Last active January 2, 2017 09:23
Mattermost Theme

#222222,#EEEEEE,#111111,#EEEEEE,#EEEEEE,#555555,#111111,#289ED4,#97BD3E,#E0B333,#97BD3E,#ffffff,#ffffff,#333333,#F80,#fff2bb,#2389d7,#2f81b7,#26a970,#ffffff,github