Skip to content

Instantly share code, notes, and snippets.

@superseb
superseb / README.md
Last active April 24, 2024 05:03
Generate self signed certificates for Rancher 2.x

Generate self signed certificates for Rancher 2.x

Generate certificates

docker run -v $PWD/certs:/certs \
  -e SSL_SUBJECT=test.example.com \
  -e SSL_DNS=test.example.com,test2.example.com \
  -e SSL_IP=10.0.0.1 \
 superseb/omgwtfssl
@dideler
dideler / bot.rb
Last active April 17, 2024 08:40
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
@ngpestelos
ngpestelos / remove-docker-containers.md
Last active March 5, 2024 20:45
How to remove unused Docker containers and images

May 8, 2018

I wrote this four years ago, so instead use this command:

$ docker rmi $(docker images -q -f dangling=true)
@pavankjadda
pavankjadda / How to create Spring Boot app as Ubuntu service.md
Created September 27, 2019 04:16
How to create Spring Boot app as Ubuntu service?

How to create Spring Boot app as Ubuntu service?

  1. Create service named employee using vi command
    sudo vim /etc/systemd/system/employee.service
    
  2. Copy paste the following content into the file and make sure to change the ExecStart command arguments
    [Unit]
    Description=Employee Spring Boot application service
    
    
@wadey
wadey / twitter-entities.js
Created June 17, 2010 17:50
JavaScript parser for Tweet Entities
/*
* twitter-entities.js
* This function converts a tweet with "entity" metadata
* from plain text to linkified HTML.
*
* See the documentation here: http://dev.twitter.com/pages/tweet_entities
* Basically, add ?include_entities=true to your timeline call
*
* Copyright 2010, Wade Simmons
* Licensed under the MIT license
@innovia
innovia / kubernetes_add_service_account_kubeconfig.sh
Last active January 29, 2024 23:00
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi
@crazycode
crazycode / RULE.md
Last active November 14, 2023 08:25
安装Gerrit2以及使用说明

代码提交要求

  • 一个Commit对应一个修改点(除非是在项目初始阶段或是升级BSP时)。
  • 不要随便修改文件的属性。Windows 修改过的文件属性会变成755,上传代码时请注意修改成文件的原属性,可以用git whatchanged 来查看自己commit修改的文件。 缩进格式跟原文件保持一致。
  • 不要修改跟提交内容无关的代码。

Git commit 注释要求

  • 设置GIT使用vim来编辑commit,请不要使用-m参数 (git config –global core.editor vim)。
@techgaun
techgaun / readme.md
Created February 5, 2017 04:44
OpenSSH 7.4 on Ubuntu 16.04

Installing OpenSSH 7.4 on Ubuntu 16.04

sudo apt install -y build-essential libssl-dev zlib1g-dev
wget "http://mirrors.evowise.com/pub/OpenBSD/OpenSSH/portable/openssh-7.4p1.tar.gz"
tar xfz openssh-7.4p1.tar.gz
cd openssh-7.4p1
./configure
make
sudo make install
@spikegrobstein
spikegrobstein / nginx.conf
Last active September 22, 2023 04:19
nginx config for proxying requests for plex over a hostname-based virtualhost.
upstream plex-upstream {
# change plex-server.example.com:32400 to the hostname:port of your plex server.
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx.
server plex-server.example.com:32400;
}
server {
listen 80;
# server names for this server.
301 https://github.com/zxdrive/imouto.host