Skip to content

Instantly share code, notes, and snippets.

@mkocabas
mkocabas / coco.sh
Created April 9, 2018 09:41
Download COCO dataset. Run under 'datasets' directory.
mkdir coco
cd coco
mkdir images
cd images
wget http://images.cocodataset.org/zips/train2017.zip
wget http://images.cocodataset.org/zips/val2017.zip
wget http://images.cocodataset.org/zips/test2017.zip
wget http://images.cocodataset.org/zips/unlabeled2017.zip
@onatcipli
onatcipli / go_router_example.dart
Last active April 24, 2024 08:34
go_router_example.dart
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
main() {
CustomNavigationHelper.instance;
runApp(const App());
}
class App extends StatelessWidget {
const App({Key? key}) : super(key: key);
@Anjum48
Anjum48 / fresh_install.sh
Last active April 24, 2024 08:33
Instructions for a fresh Ubuntu 22.04 install
sudo apt update && sudo apt upgrade -y
sudo apt -y install build-essential git zsh python3-pip gnome-shell-extension-manager openssh-server curl nodejs htop mdadm ffmpeg lm-sensors npm tree
sudo apt -y install linux-headers-$(uname -r)
sudo apt-key del 7fa2af80
# Latest driver download
# https://www.nvidia.co.uk/download/driverResults.aspx/205541/en-uk
wget https://uk.download.nvidia.com/XFree86/Linux-x86_64/535.54.03/NVIDIA-Linux-x86_64-535.54.03.run
@abernier
abernier / Readme.md
Last active April 24, 2024 08:33
Link anatomy
@tatumroaquin
tatumroaquin / archlinux-qemu-kvm.md
Last active April 24, 2024 08:32
QEMU-KVM Installation for Arch Linux

Arch Linux QEMU-KVM

install all necessary packages

sudo pacman -S virt-manager virt-viewer qemu qemu-arch-extra \
edk2-ovmf vde2 ebtables dnsmasq bridge-utils openbsd-netcat libguestfs

enable libvirt daemon

@IdrisCytron
IdrisCytron / I2C_LCD_driver.py
Created September 17, 2019 08:19
Raspberry Pi I2C LCD driver.
# -*- coding: utf-8 -*-
# i2c bus (0 -- original Pi, 1 -- Rev 2 Pi)
I2CBUS = 1
# LCD Address
ADDRESS = 0x27
import smbus
from time import sleep
@IdrisCytron
IdrisCytron / RaspberryPiKeypadPassword.py
Last active April 24, 2024 08:31
Interface keypad using Raspberry Pi and develop simple password application.
from gpiozero import DigitalInputDevice, DigitalOutputDevice, Buzzer
from time import time, sleep
import I2C_LCD_driver
col1 = DigitalOutputDevice(17)
col2 = DigitalOutputDevice(18)
col3 = DigitalOutputDevice(27)
col4 = DigitalOutputDevice(22)
row1 = DigitalInputDevice(25, pull_up=None, active_state=True)
row2 = DigitalInputDevice(12, pull_up=None, active_state=True)
package org.slive.net;
import java.net.UnknownHostException;
import java.util.regex.Pattern;
/**
* <pre>
* IP地址范围:
* 0.0.0.0255.255.255.255,包括了mask地址。
*
@chamalis
chamalis / compress-mp4.sh
Last active April 24, 2024 08:28
Compress video files recursively, using x264, placing the output files into the same folder with an appropriate filename (filename_scaled.mp4). First argument is the top-level directory to scan. It avoid overriding already compressed files. Change the filetype (e.g mp4) at the beginning of the script.
#!/bin/bash
FILETYPE=mp4
if [ "$#" -ne 1 ]; then
echo "Usage: <path-to-compress.mp4> target-top-level-directory"
exit
fi
# for all the mp4 except the already scaled ones
@MuhammadSaim
MuhammadSaim / rarreg.key
Last active April 24, 2024 08:28
Step 1: Create a file called rarreg.key Step 2: Paste into the file the raw content of this gist Step 3: Go to Winrar install directory (by default => c:\ProgramFiles\WinRAR\ ) Step 4: Paste the rarreg.key into WinRAR directory Step 5: Enjoy
RAR registration data
WinRAR
Unlimited Company License
UID=4b914fb772c8376bf571
6412212250f5711ad072cf351cfa39e2851192daf8a362681bbb1d
cd48da1d14d995f0bbf960fce6cb5ffde62890079861be57638717
7131ced835ed65cc743d9777f2ea71a8e32c7e593cf66794343565
b41bcf56929486b8bcdac33d50ecf773996052598f1f556defffbd
982fbe71e93df6b6346c37a3890f3c7edc65d7f5455470d13d1190
6e6fb824bcf25f155547b5fc41901ad58c0992f570be1cf5608ba9