Skip to content

Instantly share code, notes, and snippets.

@arunbsar
arunbsar / how-to-install-openssl-1.1.1-on-centos-7.md
Created May 11, 2022 09:44
How to install openssl 1.1.1 on CentOS 7

How To Install OpenSSL 1.1.1 on CentOS 7

This tutorial goes through how to install openssl 1.1.1 on CentOS 7, since the yum repo only installs up to openssl 1.0.

Requirements

Upgrade the system

yum -y update
@arunbsar
arunbsar / background.js
Created August 19, 2021 08:51 — forked from danharper/background.js
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
#!/bin/bash
set -eu
_UID=$(id -u)
GID=$(id -g)
# give lxd permission to map your user/group id through
grep root:$_UID:1 /etc/subuid -qs || sudo usermod --add-subuids ${_UID}-${_UID} --add-subgids ${GID}-${GID} root
# set up a separate key to make sure we can log in automatically via ssh
# with $HOME mounted
@arunbsar
arunbsar / kubectl.md
Last active November 7, 2019 16:21
kubectl shortcuts

kubectl shortcuts i use in .bashrc

alias k="kubectl"
alias kg="kubectl get"
alias kc="kubectl create"
alias kgp="kubectl get pods"
export ks="-n kube-system"
export all="--all-namespaces"
export y="-o yaml"
export j="-o json"
@arunbsar
arunbsar / gist:c63660b76f3cd5794c916ce703a0a549
Last active November 24, 2018 06:38
While Laravel Eloquent class performs standard timestamp management, this script will work in ALL cases (such as migrations which are using the basic insert command). In addition, this script provides the ability to override the format being used to store timestamps.
$dt=new DateTime;$model->created_at=$dt->format('m-d-y H:i:s');
/*
* This block of code could be added to your models (or you can create a new model which contains these and extend from your
* model. Each section will make sure the created_at and updated_at timestamp fields are updated in the database.
*/
class YourModel extends Eloquent....
public static function boot() {
public $timestamps = false;