Skip to content

Instantly share code, notes, and snippets.

View noroot's full-sized avatar

noroot noroot

View GitHub Profile
noroot /
Created July 5, 2021 12:28 — forked from jpswade/
Devops Best Practices Checklist

Find the original here article here: Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, Andrew Shafer did a talk called "Agile Infrastucture" addressing issues around involving more of the company in the same disciplines as programmers.

In 2009, Patrick Debois created "DevOpsDays" conference to help to bring it to light. However, it wouldn't begin to trend until about 2010, when people would begin to describe it as a standalone discipline.

Today, DevOps goes beyond just developers, systems administration and infrastructure, its about [dev, ops, agile, cloud

noroot / snow.rb
Created December 31, 2018 20:09
Snow in terminal with Ruby
ruby -e 'CS=`stty size`.scan(/\d+/)[1].to_i;S=["2744".to_i(16)].pack("U*");a={};puts "\033[2J";loop{a[rand(CS)]=0;a.each{|x,o|;a[x]+=1;print "\033[#{o};#{x}H \033[#{a[x]};#{x}H#{S} \033[0;0H"};$stdout.flush;sleep 0.1}'
noroot / hosts
Created December 17, 2018 12:41 — forked from zchee/hosts
/etc/hosts to block shock sites etc.
# This hosts file is brought to you by Dan Pollock and can be found at
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost> localhost localhost.localdomain broadcasthost
::1 localhost
noroot / http.interceptor.ts
Created November 27, 2017 01:24
Angular 4 JWT Authorization Bearer
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { HttpClient, HttpHeaders, HttpInterceptor, HttpHandler, HttpRequest, HttpEvent } from '@angular/common/http';
import { Post } from './content/post';
export class CchainHttpInterceptor implements HttpInterceptor {
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
noroot / sql
Created October 17, 2017 11:20
Replace all strings across database
create procedure replace_all(find varchar(255),
replce varchar(255),
indb varcv=char(255))
DECLARE currtable varchar(100);
DECLARE alltables CURSOR FOR SELECT t.tablename, c.column_name
FROM information_schema.tables t,
information_schema.columns c
WHERE t.table_schema=indb
AND c.table_schema=indb
noroot / fibonacci-generator.js
Created June 20, 2017 22:17
Javascript Fibonacci sequence examples with generators
function *fib() {
var temp, num1 = 0, num2 = 1;
while (1) {
yield num1;
temp = num1;
num1 = num2;
num2 += temp;
noroot / fibinacci.js
Created June 20, 2017 22:15
Javascript Fibonacci sequence example
var f = function () {
let p = 0, n = 1,t;
return function () {
t = p;
p = n;
n += t;
return t;
noroot / gist:3a1eacde67e281488c11ac495399a025
Created May 12, 2017 06:36 — forked from ryansobol/gist:5252653
15 Questions to Ask During a Ruby Interview

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

noroot / init.lua
Created June 22, 2016 03:26
Mjonir configuration
local application = require "mjolnir.application"
local hotkey = require "mjolnir.hotkey"
local window = require "mjolnir.window"
local fnutils = require "mjolnir.fnutils"
local hints = require ""
local appfinder = require "mjolnir.cmsj.appfinder"
local tiling = require "mjolnir.tiling"
-- hotkey.bind({"cmd", "alt", "ctrl"}, "D", function()
-- local win = window.focusedwindow()
noroot / keys.cs
Created March 18, 2016 23:49
SendKeys example C#
private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
private static extern bool SetForegroundWindow(IntPtr hWnd);
public void Start()
IntPtr zero = IntPtr.Zero;
for (int i = 0; (i < 60) && (zero == IntPtr.Zero); i++)