Skip to content

Instantly share code, notes, and snippets.

View adnanrahic's full-sized avatar
🥑
Channeling my inner Avocado at @kubeshop

Adnan Rahić adnanrahic

🥑
Channeling my inner Avocado at @kubeshop
View GitHub Profile
@megastef
megastef / test.html
Last active January 23, 2020 16:15
Log to Sematext From Web browser
<html>
<body>
<script>
(function () {
const sematextLogToken = 'c0e39f27-xxxx-xxxx-9f27-8818a4f0b59d'
var sematextUrl = `https://logsene-receiver.sematext.com/${sematextLogToken}/_bulk/`
var logBuffer = ''
let consoleLog = console.log
let lineCount = 0
const sessionId = /SESS\w*ID=([^;]+)/i.test(document.cookie) ? RegExp.$1 : false
@newhouse
newhouse / mediumUsersFollowedByCount.js
Last active January 6, 2024 00:43
Medium API: get number of followers for User
/**
* Example of how to get the number of followers for a Medium.com User.
*
*
* Related links:
* https://github.com/Medium/medium-api-docs/issues/30#issuecomment-227911763
* https://github.com/Medium/medium-api-docs/issues/73
*/
// LODASH
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 24, 2024 06:43
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@pasupulaphani
pasupulaphani / after_res_hooks.js
Last active May 1, 2024 20:37
Mongoose connection best practices
var db = mongoose.connect('mongodb://localhost:27017/DB');
// In middleware
app.use(function (req, res, next) {
// action after response
var afterResponse = function() {
logger.info({req: req}, "End request");
// any other clean ups
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream