Skip to content

Instantly share code, notes, and snippets.

@rxaviers
rxaviers / gist:7360908
Last active July 4, 2024 21:11
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@Panthro
Panthro / enable-swap.sh
Last active March 14, 2019 15:39
enable swap (4GB) and tweak it for a server
#Allocate the file
fallocate -l 4G /swapfile
#Give right permissions
chmod 600 /swapfile
#make it a swap file
mkswap /swapfile
#turn swap on
swapon /swapfile
#mount it at every boot
echo "/swapfile none swap sw 0 0" >> /etc/fstab
#!/usr/bin/env python
# usage ./extract_tampermonkey_script.py "/home/<user>/.config/<browser>/Default/Local Extension Settings/<extension_id>"
# i.e.: ./extract_tampermonkey_script.py "/home/foo/.config/google-chrome-beta/Default/Local Extension Settings/gcalenpjmijncebpfijmoaglllgpjagf"
#
import leveldb
import sys
import re
import json
import codecs
@d0whc3r
d0whc3r / rancher-backup.sh
Created March 24, 2019 12:36
Rancher 2 backup script
#!/bin/bash
RANCHER_SERVER_NAME=$(docker ps -a --format "{{.Image}} {{.Names}}" | grep -i "rancher/rancher" | cut -d' ' -f2)
TODAY_DATE=$(date +%Y%m%d)
RANCHER_COPY_NAME=rancher-data-${TODAY_DATE}
CREDENTIALS_PATH=~/secrets
BACKUP_PATH=~/backup
RANCHER_BACKUP_FILE=rancher-data-backup-${TODAY_DATE}.tar.gz
USE_GDRIVE=0
if [ "$1" = "--gdrive" ]; then
@Panthro
Panthro / rancher-backup.sh
Created May 21, 2019 11:02
Rancher2 backup on Google Drive
#!/bin/bash
#RANCHER_SERVER_NAME=$(docker ps -a --format "{{.Image}} {{.Names}}" | grep -i "rancher/rancher" | cut -d' ' -f2)
RANCHER_SERVER_NAME=rancher-server
TODAY_DATE=$(date +%Y%m%d)
RANCHER_COPY_NAME=rancher-data-${TODAY_DATE}
CREDENTIALS_PATH=~/secrets
BACKUP_PATH=~/backup
RANCHER_BACKUP_FILE_BASE=rancher-data-backup
RANCHER_BACKUP_FILE=${RANCHER_BACKUP_FILE_BASE}-${TODAY_DATE}.tar.gz
USE_GDRIVE=0
@intech
intech / broker.js
Last active September 8, 2021 07:22
// broker.js
"use strict";
const { ServiceBroker } = require("moleculer");
const Sequelize = require("./middlewares/sequelize");
const broker = new ServiceBroker({
middlewares: [Sequelize()]
});
broker.createService({
name: "service",
@ravenscroftj
ravenscroftj / minimal_continue_groq_config.md
Created April 28, 2024 08:46
Minimal Groq + Continue.Dev Recipe

Minimal continue.dev Groq Config

{
  "models": [
    {
      "title":"Groq Llama 8b",
      "provider":"openai",
      "model": "llama3-8b-8192",
      "apiBase": "https://api.groq.com/openai/v1",
 "apiKey": "",