Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 9, 2024 17:46
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@tristanm
tristanm / README.md
Last active May 9, 2024 17:44
Migrating a Rails project from MySQL to PostgreSQL

Migrating a Rails project from MySQL to PostgreSQL

This brief guide is written from my own experience with migrating a large (~5GB) MySQL database to PostgreSQL for a Rails project.

No warranties, guarantees, support etc. Use at your own risk and, as always, ENSURE YOU MAKE BACKUPS FIRST!

I chose [pgloader][1] because it's extremely fast. YMMV.

  1. Replace mysql2 gem with pg in Gemfile.
  2. Update config/database.yml for PostgreSQL. I used [Rails' template][2] as a starting point.
@SimonCropp
SimonCropp / ClientConsole
Created May 19, 2011 02:34
non blocking client server with httplistener
using System;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
namespace ClientConsole
{
static class Program
{
@volosincu
volosincu / arch-linux-uefi-install.md
Last active May 9, 2024 17:38
Arch linux UEFI installation guide

Arch Linux UEFI installation guide

1) Partitioning

a) create partitions using a tool like gdisk, cfdisk .... (more about partitioning )

b) after partifioning we must build the filesystems on the devices (format partitions) using mkfs

   
 mkfs.vfat -F 32 /dev/sdX1 // format efi-boot partition as FAT 32 
@conorbranagan
conorbranagan / gist:4513828
Last active May 9, 2024 17:37
Linux System Metrics

Linux System Metrics

CPU

  • system.cpu.idle: % Idle CPU
  • system.cpu.system: % System CPU
  • system.cpu.user: % User CPU

Disk

@CMCDragonkai
CMCDragonkai / Sampling.md
Last active May 9, 2024 17:36
Python/Arduino: Accelerometer Plotting & Sampling Problems

Sampling

Sampling is somewhat complicated issue.

Firstly data is being emitted over a serial port at an arbitrary amount per second.

This data needs to be read from the serial port.

@wojteklu
wojteklu / clean_code.md
Last active May 9, 2024 17:36
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@CagriAldemir
CagriAldemir / oxford_3000.json
Created May 25, 2021 23:06
Oxford 3000 Word TR-EN JSON File
[
{
"tr": "bir",
"en": "a"
},
{
"tr": "terk etmek",
"en": "abandon"
},
{
@rponte
rponte / using-uuid-as-pk.md
Last active May 9, 2024 17:34
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes