Skip to content

Instantly share code, notes, and snippets.

View sarkis's full-sized avatar

Sarkis Varozian sarkis

View GitHub Profile

Keybase proof

I hereby claim:

  • I am sarkis on github.
  • I am sarkis (https://keybase.io/sarkis) on keybase.
  • I have a public key ASCXx9tYx_blpa34KtAvPv7eBvDEDihkjBNUfyG5DId7VAo

To claim this, I am signing this object:

@sarkis
sarkis / uninstall_intellij_idea.md
Last active June 12, 2018 04:07
Uninstall InelliJ IDEA Community on macOS
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
#!/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 / jq-filter.sh
Created January 8, 2019 04:55 — forked from micahhausler/jq-filter.sh
GitHub collaborator finder
# 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)'
@sarkis
sarkis / main.tf
Last active November 30, 2020 21:00
Terraform S3 website redirect (http and https) using S3, CloudFront, ACM (Example redirects (http/https)://www.example.com -> https://example.com)
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"

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 / gist:82bf4f6c5907a3b3eedf903404a99cff
Created June 20, 2019 16:44 — forked from charlax/gist:38ecd925a8bcb8cadcf5
Fix Unable to find 'openssl/opensslconf.h'
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
@sarkis
sarkis / README.md
Created July 3, 2019 15:31 — forked from devinrhode2/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

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 / UbuntuCFinit.yaml
Created October 8, 2019 15:50 — 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.
#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 October 17, 2019 18:36 — forked from ubergesundheit/readme.md
systemd traefik.service

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: