Skip to content

Instantly share code, notes, and snippets.

http://bblog.com/ping.php
http://ping.bloggers.jp/rpc/
http://rpc.pingomatic.com/
http://topicexchange.com/RPC2
http://www.blogpeople.net/servlet/weblogUpdates
http://xping.pubsub.com/ping
http://rpc.twingly.com
http://api.feedster.com/ping
http://api.moreover.com/RPC2
http://api.moreover.com/ping
@metius
metius / select_kernel_boot_pop_os.md
Last active December 24, 2024 01:57
GUIDE - How to select a specific kernel version at boot in Pop_OS!

GUIDE - How to select a specific kernel version at boot in Pop_OS!

Pop OS uses their own implementation named kernelstub to handle the kernels, they did so to make it faster on load times (at least that's what their blog post says).

Their README page show certain information of how to use it, but there are some other things that are required to do, specially if you want to have a menu on boot, similar to grub.

Update a kernel

In case you just want to use a specific kernel and forget about other ones, you can execute this command to update the current configuration

@worldadventurer
worldadventurer / change-ssh-port.sh
Last active December 24, 2024 01:53
Change SSH Port - prompts on command line for new port number
#!/bin/bash
# Copied from https://github.com/FreePBXHosting/freepbx-scripts/tree/master/sshport
#
# To run the script, login as root via SSH and run the following command:
# bash <(curl -Ls https://gist.github.com/worldadventurer/842f1a10762cba0ce27dc8f99a835377/raw)
#
#############################################
# FreePBXHosting.com - @freepbxhosting #
# VERSION 1.6 UPDATED JUN 25 2015 #
# DESC: CHANGES SSH PORT AND RESTARTS SSH #
@Zearin
Zearin / python_decorator_guide.md
Last active December 24, 2024 01:45
The best explanation of Python decorators I’ve ever seen. (An archived answer from StackOverflow.)

NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.


Q: How can I make a chain of function decorators in Python?


If you are not into long explanations, see [Paolo Bergantino’s answer][2].

@vedantroy
vedantroy / demo.ts
Last active December 24, 2024 01:45
SQLite-backed key-value store with JS-like object manipulation and automatic JSON serialization.
import Database from 'better-sqlite3';
import { createDatabaseClient } from './proxy.ts';
// 1) Create an in-memory DB and your table(s).
const db = new Database(':memory:');
db.exec(`
CREATE TABLE users (
id TEXT PRIMARY KEY,
data JSON
);
@commonsensesoftware
commonsensesoftware / Cargo.toml
Last active December 24, 2024 01:35
JSON Streaming in Rust
[package]
name = "json-streaming"
version = "0.1.0"
edition = "2021"
[[bin]]
name = "streamjson"
path = "main.rs"
[dependencies]
@DanielMSchmidt
DanielMSchmidt / update-renovate.js
Created September 3, 2020 14:40
Generates renovate config to fix @types and package running out of sync
#!/usr/bin/env node
// Generates renovate config to fix @types and package running out of sync
// See https://github.com/renovatebot/renovate/issues/4893
const path = require("path");
const fs = require("fs");
// This script lies under scripts/update-renovate.js, therefore the ..
const renovatePath = path.resolve(__dirname, "../renovate.json");
@cyrenity
cyrenity / compile-and-install-freeswitch-1.10.x-on-ubuntu.md
Last active December 24, 2024 01:30
Install FreeSWITCH 1.10.x on Ubuntu 18.04 | 20.04 | 22.04 LTS

Installing FreeSWITCH 1.10.X on Ubuntu 18.04 | 20.04 | 22.04 LTS

Introduction

FreeSWITCH is a software defined telecom stack that runs on any commodity hardware. FreeSWITCH can handle voice, video and text communication and support all popullar VoIP protocols. FreeSWITCH is flexible and modular, and can be used in any way you can imagine

This guide demonstrates how to get it install FreeSWITCH and get it up and running on a Ubuntu 20.04 LTS machine

Prerequisites

To follow along with this guide, you need one Ubuntu 20.04 LTS server which has prerequisite packages installed and configured. In order to install required packages issue following command

@thisismydesign
thisismydesign / google-oauth.controller.ts
Last active December 24, 2024 01:30
OAuth2 in NestJS for social login (Google, Facebook, Twitter, etc) /1
import { Controller, Get, Req, Res, UseGuards } from '@nestjs/common';
import { Request, Response } from 'express';
import { GoogleOauthGuard } from './google-oauth.guard';
@Controller('auth/google')
export class GoogleOauthController {
constructor(private jwtAuthService: JwtAuthService) {}
@Get()
@UseGuards(GoogleOauthGuard)