Skip to content

Instantly share code, notes, and snippets.

View vharsh's full-sized avatar
🔵
playing with Bluetooth

Harsh Vardhan vharsh

🔵
playing with Bluetooth
View GitHub Profile
@palnabarun
palnabarun / README.md
Last active June 26, 2021 05:54
Part 1 of the Codebase walkthrough for Kubernetes API Internals

Kubernetes API Internals Codebase Walkthrough

The JSON file included in this gist gives a codebase walkthrough of the resource handling in the k8s apiserver.

The codebase walkthrough is created using CodeTour VS Code extension. To display the walkthrough in VS Code, use the JSON file using the Opening Tours functionality.

This is a multi-part walkthrough. See the part 2 of walkthrough [here][1]. 🎉

@zurohki
zurohki / dsdt.patch
Created August 2, 2020 07:47
DSDT patch for S3 suspend-to-RAM
--- a/dsdt.dsl 2020-08-01 17:44:50.799557442 +1000
+++ b/dsdt.dsl 2020-08-01 18:06:34.305329465 +1000
@@ -18,7 +18,7 @@
* Compiler ID " "
* Compiler Version 0x01000013 (16777235)
*/
-DefinitionBlock ("", "DSDT", 1, "LENOVO", "CB-01 ", 0x00000001)
+DefinitionBlock ("", "DSDT", 1, "LENOVO", "CB-01 ", 0x00000002)
{
External (_PR_.C000, UnknownObj)
@shivarajp
shivarajp / githubprivatereposetup.md
Created November 4, 2017 16:53
Jenkins Github private repository credentials setup

I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):

Detailed Instructions

For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.

Install Jenkins Plugins

get both the git and github plugin http://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin

@chourobin
chourobin / 0-bridging-react-native-cheatsheet.md
Last active April 11, 2024 15:02
React Native Bridging Cheatsheet
@csswizardry
csswizardry / README.md
Last active April 2, 2024 20:17
Vim without NERD tree or CtrlP

Vim without NERD tree or CtrlP

I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.

Fuzzy Search

There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:

:vs **/*<partial file name><Tab>
@tamas-molnar
tamas-molnar / kubectl-shortcuts.sh
Last active March 3, 2024 09:09
aliases and shortcuts for kubectl
alias kc='kubectl'
alias kclf='kubectl logs --tail=200 -f'
alias kcgs='kubectl get service -o wide'
alias kcgd='kubectl get deployment -o wide'
alias kcgp='kubectl get pod -o wide'
alias kcgn='kubectl get node -o wide'
alias kcdp='kubectl describe pod'
alias kcds='kubectl describe service'
alias kcdd='kubectl describe deployment'
alias kcdf='kubectl delete -f'
@fstab
fstab / MATRIX.md
Last active January 5, 2022 12:31
How to use matrix.org and vector.im as an IRC client

How to use matrix.org and vector.im as an IRC client

How to Join an IRC Channel on matrix.org

Join the room #freenode_<#channel>:matrix.org, replacing <#channel> with the name of the IRC channel. For example, in order to join the #prometheus IRC channel, join the room #freenode_#prometheus:matrix.org on matrix.org.

In vector.im, rooms can be joined with the directory symbol on the bottom left.

@nosmokingpistol
nosmokingpistol / Swagger Setup for Embedded Jetty Server.md
Last active November 8, 2023 11:13
Setup Swagger with an embedded Jetty Server

Swagger Setup for Embedded Jetty Server

In setting up a Jetty server with Jersey servlets, you may choose to use an embedded Jetty server setup. (See here for how to setup an embedded Jetty server). In this gist, we'll go through how to setup Swagger for this setup. I am using Swagger 1.5, Maven 3.3.3, Jersey 1.8, and Jetty 7.3. Make sure you add all dependencies to your pom.xml.

In the Swagger Core setup, the current official recommendations involve an Application class, or a web.xml, neither of which are used in an embedded Jetty server setup. To add Swagger to your embedded Jetty Server, you must do 3 things:

  1. Add the package scanning packages to your servlets which will serve your REST API.
  2. Add the Swagger package scanning servlet.
  3. P