Skip to content

Instantly share code, notes, and snippets.

View kevsersrca's full-sized avatar
🚀
Working from home

kev kevsersrca

🚀
Working from home
View GitHub Profile

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

How to increase ulimit in Linux:

  • Step 1 (ulimit): open the sysctl.conf and add this line fs.file-max = 65536

      vi /etc/sysctl.conf   
    

    add following at end of file in above file:

      fs.file-max = 65536
    

save and exit.

@kevsersrca
kevsersrca / headlessChrome.md
Created April 20, 2020 11:27 — forked from gasparrobi/headlessChrome.md
headless chrome from terminal in osX

1. set an alias for chrome:

alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"

2. To remote control your chrome headless:

chrome --headless --disable-gpu --remote-debugging-port=9222

@kevsersrca
kevsersrca / error_logging.py
Created December 23, 2019 14:52 — forked from alchemyst/error_logging.py
Error loging decorator
import logging
import sys
import functools
logging.basicConfig(level=logging.DEBUG)
LOGGER = logging
def log_if_exception(message):
def decorator(function):
@kevsersrca
kevsersrca / kubectl
Created December 3, 2019 06:20 — forked from Nurlan199206/kubectl
Kubernetes команды примеры
kubernetes commands
kubectl get pods && kubectl get services --all-namespaces
kubectl get nodes - список нодов
kubectl taint nodes --all node-role.kubernetes.io/master- - запуска подов на мастере.
kubectl get pod redis --watch
@kevsersrca
kevsersrca / index.js
Created November 25, 2019 08:55 — forked from smithclay/index.js
"Hello World" AWS Lambda + Terraform Example
// 'Hello World' nodejs6.10 runtime AWS Lambda function
exports.handler = (event, context, callback) => {
console.log('Hello, logs!');
callback(null, 'great success');
}
@kevsersrca
kevsersrca / goQueryTest.go
Created October 22, 2019 12:28 — forked from salmoni/goQueryTest.go
Parsing HTML in Go/Golang using goQuery to extract data from only one of multiple tables. Demonstrates nested Find statements.
package main
import (
"fmt"
"log"
"strings"
"github.com/PuerkitoBio/goquery"
)
package main
import (
"fmt"
"math/rand"
"net/http"
"net/url"
"time"
)
@kevsersrca
kevsersrca / read_line.go
Created August 27, 2019 08:09 — forked from kendellfab/read_line.go
Golang --> Read file line by line.
func readLine(path string) {
inFile, _ := os.Open(path)
defer inFile.Close()
scanner := bufio.NewScanner(inFile)
scanner.Split(bufio.ScanLines)
for scanner.Scan() {
fmt.Println(scanner.Text())
}
}
@kevsersrca
kevsersrca / client.go
Created July 19, 2018 07:25 — forked from spikebike/client.go
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)