Skip to content

Instantly share code, notes, and snippets.

Sarkis Varozian sarkis

Block or report user

Report or block sarkis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sarkis
sarkis / dummy0.netdev
Created Dec 4, 2019 — forked from kquinsland/dummy0.netdev
How to get consul-agent and systemd.resolvd to co-exist peicefully and still be able to resolve *.consul hostsnames from within docker
View dummy0.netdev
# Creates a "dummy" network interface
# we'll configure this interface with a link-local address
# See: https://www.freedesktop.org/software/systemd/man/systemd.netdev.html
##
[NetDev]
Name=dummy0
Kind=dummy
@sarkis
sarkis / readme.md
Created Oct 17, 2019 — forked from ubergesundheit/readme.md
systemd traefik.service
View readme.md

systemd Service Unit for Traefik

Adapted from caddy systemd Service Unit

The provided file should work with systemd version 219 or later. It might work with earlier versions. The easiest way to check your systemd version is to run systemctl --version.

Instructions

We will assume the following:

@sarkis
sarkis / UbuntuCFinit.yaml
Created Oct 8, 2019 — forked from mmasko/UbuntuCFinit.yaml
Configure cfn-hup, cloudformation tools on ubuntu 18. Based on a gist from https://gist.github.com/kixorz/10194688. Written in YAML.
View UbuntuCFinit.yaml
#This script will install the cloudformation helper work on Ubuntu 18.
#Some values are hard coded. Make sure to update where needed, or add to the parameters section.
#This would probably work on other distros, but I have not tested yet. Try it out.
#Just make sure to change things like apt to yum if trying on another OS.
Parameters:
EnvironmentSize:
Type: String
Default: t3.nano
AllowedValues:
- t3.nano
@sarkis
sarkis / README.md
Created Jul 3, 2019 — forked from devinrhode2/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)
View README.md

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

@sarkis
sarkis / gist:82bf4f6c5907a3b3eedf903404a99cff
Created Jun 20, 2019 — forked from charlax/gist:38ecd925a8bcb8cadcf5
Fix Unable to find 'openssl/opensslconf.h'
View gist:82bf4f6c5907a3b3eedf903404a99cff
SWIG/_m2crypto.i:30: Error: Unable to find 'openssl/opensslv.h'
SWIG/_m2crypto.i:33: Error: Unable to find 'openssl/safestack.h'
SWIG/_evp.i:12: Error: Unable to find 'openssl/opensslconf.h'
SWIG/_ec.i:7: Error: Unable to find 'openssl/opensslconf.h'
error: command 'swig' failed with exit status 1
View Oh my zsh with autosuggestions & syntax-highlighting.md

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@sarkis
sarkis / main.tf
Last active Oct 3, 2019
Terraform S3 website redirect (http and https) using S3, CloudFront, ACM (Example redirects (http/https)://www.example.com -> https://example.com)
View main.tf
data "aws_route53_zone" "example_com" {
name = "example.com."
private_zone = false
}
resource "aws_acm_certificate" "example_com" {
domain_name = "example.com"
subject_alternative_names = ["www.example.com"]
validation_method = "DNS"
@sarkis
sarkis / jq-filter.sh
Created Jan 8, 2019 — forked from micahhausler/jq-filter.sh
GitHub collaborator finder
View jq-filter.sh
# Go to https://developer.github.com/v4/explorer/ and enter the graphql query with the query veriable:
# {"queryString": "your-githubuser-name"}
cat results.json |
jq '.data.user.repositories.edges[] | { Count: .node.collaborators.totalCount, Repo: .node.name} | select(.Count > 2)'
View gist:5fc9dab933334eb265da146747c1b220
#!/usr/bin/env python
import argparse
import boto3
import sys
import urllib.request
import subprocess
from glob import glob
from os.path import basename, dirname
@sarkis
sarkis / uninstall_intellij_idea.md
Last active Jun 12, 2018
Uninstall InelliJ IDEA Community on macOS
View uninstall_intellij_idea.md
sudo rm -rf /Applications/IntelliJ\ IDEA\ CE.app
sudo rm -rf ~/Library/Preferences/IdeaIC2018.1
sudo rm -rf ~/Library/Caches/IdeaIC2018.1
sudo rm -rf ~/Library/Application\ Support/IdeaIC2018.1
sudo rm -rf ~/Library/Logs/IdeaIC2018.1
You can’t perform that action at this time.