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.

import enum
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
driver = webdriver.Remote(
command_executor='http://localhost:9999',
desired_capabilities={
"debugConnectToRunningApp": 'false',
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
driver = webdriver.Remote(
command_executor='http://localhost:9999',
desired_capabilities={
"debugConnectToRunningApp": 'false',
"app": r"C:/Users/Public/Desktop/Launch SentrySuite.lnk"
})

Indirmek icin

$ brew install ansible

yeni inventory file

$ vi ~/hosts

[do]
134.122.x.x
@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

from bs4 import BeautifulSoup
import requests
def checkUrl(url):
r = requests.get(url)
soup = BeautifulSoup(r.text, 'html.parser')
types = set()
for item in soup.find_all(itemtype=True):
types.add(item.get('itemtype'))
for t in types:
@kevsersrca
kevsersrca / snmp.go
Created January 8, 2020 14:05
go snmp
package main
import (
"bytes"
"flag"
"fmt"
"math/big"
"os"
"regexp"
"strconv"
@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):
def currently_playing(self):
'''
Returns the record for the currently playing track,
or None if nothing is playing
'''
try:
if self.is_playing():
title = self.browser.find_element_by_class_name('title').text
album_detail = self.browser.find_element_by_css_selector('.detail-album > a')
album_title = album_detail.text