Skip to content

Instantly share code, notes, and snippets.

View electron0zero's full-sized avatar
🎯
Focusing

Suraj Nath electron0zero

🎯
Focusing
View GitHub Profile
@LeZuse
LeZuse / stats_logger.rb
Last active June 21, 2021 13:53
Puma plugin for stats logging on Heroku
Puma::Plugin.create do
def production?
ENV.fetch('RACK_ENV', 'development') == 'production'
end
def log(msg)
if production?
Rails.logger.info msg
else
puts msg
kubectl -n kube-system create sa jenkins
kubectl create clusterrolebinding jenkins --clusterrole cluster-admin --serviceaccount=<namespace>:jenkins
@abayer
abayer / Jenkinsfile
Created February 15, 2017 15:17
An example Declarative Pipeline Jenkinsfile for Feb 15 2017 demo
// A Declarative Pipeline is defined within a 'pipeline' block.
pipeline {
// agent defines where the pipeline will run.
agent {
// This also could have been 'agent any' - that has the same meaning.
label ""
// Other possible built-in agent types are 'agent none', for not running the
// top-level on any agent (which results in you needing to specify agents on
// each stage and do explicit checkouts of scm in those stages), 'docker',
@electron0zero
electron0zero / keybase.md
Created February 10, 2017 02:07
my keybase verification

Keybase proof

I hereby claim:

  • I am electron0zero on github.
  • I am electron0zero (https://keybase.io/electron0zero) on keybase.
  • I have a public key ASA_iB5JeTWzhJt6cf3US-TRIzzsYJgx9nf_EsypEhY4sgo

To claim this, I am signing this object:

@osowski
osowski / incept-minikube.sh
Last active April 16, 2020 23:28
Install Minikube, Kubectl, and Virtualbox on Ubuntu
#Installing VirtualBox
echo "Installing VirtualBox........................"
sudo apt-get install virtualbox
#Installing kubectl https://kubernetes.io/docs/getting-started-guides/kubectl/
echo "Installing kubectl..........................."
wget https://storage.googleapis.com/kubernetes-release/release/v1.4.4/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin/kubectl
@bhtucker
bhtucker / prediction_variance.ipynb
Created November 12, 2016 22:21
Demo of some ideas for detecting noisy groups of observations in a multiclass classification setting
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@polbins
polbins / README.md
Last active June 20, 2022 02:50
Android Studio as default Git Diff Tool

Create Android Studio Command-line Launcher

  1. Open Android Studio
  2. Go to: Tools > Create Command-line Launcher
  3. Leave as default, Press OK

Configure Git to use Android Studio as default Diff Tool

  1. Add the following lines to your .gitconfig
@passiondroid
passiondroid / RuntimePermissionHelper.java
Last active February 26, 2021 05:51
Android Runtime Permission Helper class
import android.Manifest;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.util.Log;
@skylord123
skylord123 / gist:892b6e30b724b81a8a48
Created November 11, 2015 05:38
Linux machine to chromcast server
Following is taken from: https://plus.google.com/111475821387295047208/posts/KDEfS6S2hyk
-------------------------
How to turn your Linux machine into a Chromecast Server
Stream YouTube, Netflix, Hulu, Etc. from your smartphone or tablet onto your server or laptop. ...without buying Chromecast hardware...
Prerequisite- Install Google Chrome on your Desktop. Install Chromecast application onto your portable device.
@protrolium
protrolium / ffmpeg.md
Last active May 2, 2024 12:02
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with: