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
@littlefuntik
littlefuntik / timeouts.go
Last active December 19, 2024 14:33
Go lang request timeouts example, DialContext, context.WithTimeout, http.Client, http.NewRequestWithContext
package main
import (
"context"
"io/ioutil"
"log"
"net"
"net/http"
"time"
)
@ishad0w
ishad0w / sources.list
Created April 30, 2020 16:55
Ubuntu 20.04 LTS (Focal Fossa) -- Full sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
@Nurlan199206
Nurlan199206 / kubectl
Last active February 10, 2025 07:37
Kubernetes команды примеры
kubernetes commands
=============================================certificates renew======================================
kubeadm certs check-expiration
kubeadm certs renew all
and restart etcd, kube-apiserver, kube-scheduler, kube-control-manager on the all control planes
import random
import time
import timeit
from math import floor
import matplotlib.pyplot as draw
import scipy.io
import numpy as np
import cProfile
@alchemyst
alchemyst / error_logging.py
Created September 23, 2018 12:05
Error loging decorator
import logging
import sys
import functools
logging.basicConfig(level=logging.DEBUG)
LOGGER = logging
def log_if_exception(message):
def decorator(function):
@salmoni
salmoni / goQueryTest.go
Last active October 13, 2024 12:20
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 (
"strings"
"net/http"
"fmt"
"time"
"io/ioutil"
"net/url"
)
@vhanla
vhanla / vpress.ps1
Created May 18, 2018 04:21
PowerShell script to help maintain git on Vuepress's built directory
# This script allows to maintain a github hosted page
# First: make sure to clone or init your git in the destination directory
# this script will make a backup of the .git directory
# once vuepress has built again (replacing all things in destination directory)
# this script will restore the original .git directory
# Finally you can git add . & commit as you wish
# so .git directory will always be the latest one
cls
Write-Host "Vuepress git tool v1.0"
@barisesen
barisesen / cumsum.m
Created March 28, 2018 22:30
matlab cumsum function source code !
function X = cumSumFunc(image)
[m,n] = size(image);
X = zeros(m,n);
X(1,:) = image(1,:);
for i=2:m
for j=1:n
X(i,j) = image(i,j) + X(i-1,j);
end
end
end
@kurtbrose
kurtbrose / gitlab-ci.yml
Created February 6, 2018 17:15
gitlab auto devops template
# This file is a template, and might need editing before it works on your project.
# Auto DevOps
# This CI/CD configuration provides a standard pipeline for
# * building a Docker image (using a buildpack if necessary),
# * storing the image in the container registry,
# * running tests from a buildpack,
# * running code quality analysis,
# * creating a review app for each topic branch,
# * and continuous deployment to production
#