Skip to content

Instantly share code, notes, and snippets.

@kabili207
kabili207 / Rclone systemd service.md
Last active April 20, 2024 15:54
Rclone systemd user service

rclone systemd service

Preparation

This service will use the same remote name you specified when using rclone config create. If you haven't done that yet, do so now.

Next, create the mountpoint for your remote. The service uses the location ~/mnt/<remote> by default.

mkdir ~/mnt/dropbox
@harveyconnor
harveyconnor / a-mongodb-replica-set-docker-compose-readme.md
Last active April 20, 2024 15:54
MongoDB Replica Set / docker-compose / mongoose transaction with persistent volume

This will guide you through setting up a replica set in a docker environment using.

  • Docker Compose
  • MongoDB Replica Sets
  • Mongoose
  • Mongoose Transactions

Thanks to https://gist.github.com/asoorm for helping with their docker-compose file!

@tfogo
tfogo / howtogif
Created April 8, 2014 13:19
How to convert videos to gif using ffmpeg and gifsicle
How to convert a video file to an animated GIF on Linux:
Install required software:
apt-get install ffmpeg gifsicle imagemagick:
Convert the video file to a series of small images:
mkdir /tmp/gif/
ffmpeg -i YOURVIDEOFILE.mp4 -r 10 /tmp/gif/out%04d.gif
Combine these images together into a GIF animation:
gifsicle –delay=10 –loop /tmp/gif/*.gif > animation.gif
Optimise the GIF animation so the file size is smaller:
@ficapy
ficapy / hshy_checkin.py
Last active April 20, 2024 15:50
练手python脚本,登陆Discuz论坛打卡签到
# -*- coding: utf-8 -*-
import requests
import hashlib
import re
username = '' ###账号###
password = ''###密码###
UA = "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) \
Chrome/27.0.1453.116 Safari/537.36"
headers = {
@hakre
hakre / dl-file.php
Created January 2, 2012 21:41
Wordpress login to download uploaded files
<?php
/*
* dl-file.php
*
* Protect uploaded files with login.
*
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in
*
* @author hakre <http://hakre.wordpress.com/>
* @license GPL-3.0+
@ayebrian
ayebrian / vmware.md
Last active April 20, 2024 15:42
VMware ESXi 8 / vCenter 8 / Workstation 17 8 license key 2024

Free VMware license keys, they should work. It works for all cores on your host system(ESXi).

vCenter Server 8 Standard

Key Tested
4F282-0MLD2-M8869-T89G0-CF240
0F41K-0MJ4H-M88U1-0C3N0-0A214

ESXi 8

Key Tested
@Klerith
Klerith / configurar-node-ts.md
Last active April 20, 2024 15:42
Node con TypeScript - TS-Node-dev simplificado

Node con TypeScript - TS-Node-dev (preferido)

  1. Instalar TypeScript y demás dependencias
npm i -D typescript @types/node ts-node-dev rimraf
  1. Inicializar el archivo de configuración de TypeScript ( Se puede configurar al gusto)
npx tsc --init --outDir dist/ --rootDir src
class GildedRose
def initialize(items)
@items = items
end
def update_quality()
@items.each do |item|
if item.name != "Aged Brie" and item.name != "Backstage passes to a TAFKAL80ETC concert"
if item.quality > 0
if item.name != "Sulfuras, Hand of Ragnaros"
@zeburek
zeburek / api.md
Last active April 20, 2024 15:41
Чек-лист проверок API

Чек-лист API тестов

  • Корректность структуры данных
  • POST запросы
    • Заполнены все поля валидными данными
    • Заполнены только обязательные поля
    • Заполнены не все обязательные поля
    • Не заполнено ни одно поле
    • Валидация данных в полях (корректные и некорректные данные)
    • Пустой JSON
  • Дата создания объекта
@vasanthk
vasanthk / System Design.md
Last active April 20, 2024 15:40
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?