Skip to content

Instantly share code, notes, and snippets.

@Riey
Riey / shell.nix
Last active May 15, 2024 12:50
Install kakaotalk with nix
{
pkgs ? import <nixpkgs> {},
wineprefix ? "",
winearch ? "win32",
fonts ? "corefonts cjkfonts",
}:
let
exe = pkgs.fetchurl {
url = https://app-pc.kakaocdn.net/talk/win32/KakaoTalk_Setup.exe;
@mcarilli
mcarilli / nsight.sh
Last active July 19, 2024 09:31
Favorite nsight systems profiling commands for Pytorch scripts
# This isn't supposed to run as a bash script, i named it with ".sh" for syntax highlighting.
# https://developer.nvidia.com/nsight-systems
# https://docs.nvidia.com/nsight-systems/profiling/index.html
# My preferred nsys (command line executable used to create profiles) commands
#
# In your script, write
# torch.cuda.nvtx.range_push("region name")
# ...
@windoze
windoze / rx-asio.hpp
Created December 19, 2015 14:06
Boost.ASIO scheduler for RxCPP
#include "rxcpp/rx-scheduler.hpp"
// TODO: C++17 Networking TS
#ifdef WITHOUT_BOOST
// Standalone ASIO
#include <asio.hpp>
namespace asio_ns=::asio
namespace system_ns=::std
#else
// Boost.ASIO
@joepie91
joepie91 / vpn.md
Last active July 20, 2024 13:53
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@mik30s
mik30s / webcam_capture.cpp
Last active October 16, 2023 05:06
Simple C++ program to capture a webcam frame in Linux
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <linux/ioctl.h>
#include <linux/types.h>
#include <linux/v4l2-common.h>
#include <linux/v4l2-controls.h>
#include <linux/videodev2.h>
#include <fcntl.h>
#include <unistd.h>
@curtkim
curtkim / ubuntu install
Last active November 5, 2023 03:21
linux
[x]
docker run -ti --rm \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
firefox
[watch]
watch -n 1 docker ps
[script]