Skip to content

Instantly share code, notes, and snippets.

View Riey's full-sized avatar
🏫
I'm studying and working at the same time, so I may be slow to respond.

Riey

🏫
I'm studying and working at the same time, so I may be slow to respond.
  • South Korea
  • 06:29 (UTC +09:00)
View GitHub Profile
@Riey
Riey / init.sh
Created November 10, 2021 06:45
Install Nix Flake
#!/usr/bin/env bash
# Before this script, target device must mounted as /mnt
nix-env -iA nixos.nixUnstable nixos.gh nixos.git
gh auth login
mkdir -pv /mnt/etc
@Riey
Riey / .envrc
Created October 18, 2021 02:32
Nix direnv template
use flake
@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;
#!/bin/bash
set -ex
if [ -z "$1" ]; then
exit 1
fi
STAT=$(mktemp)
INFO=$(ffprobe -v error -select_streams v:0 -show_entries stream=width,height,r_frame_rate -of csv=s=x:p=0 "$1")
@Riey
Riey / main.java
Created January 28, 2021 12:26
jeditor
// Java Program to create a text editor using java
import java.awt.*;
import javax.swing.*;
import java.io.*;
import java.awt.event.*;
import javax.swing.plaf.metal.*;
import javax.swing.text.*;
class editor extends JFrame implements ActionListener {
// Text component
@Riey
Riey / PKGBUILD
Last active January 16, 2021 08:21
kime-git-pkgbuild
# Maintainer: riey <creeper844@gmail.com>
pkgname=kime-git
pkgver=0.4.1.184.gc9740f9
pkgrel=1
pkgdesc="Korean IME"
url="https://github.com/Riey/kime"
conflicts=('kime')
provides=('kime')
depends=('gtk3' 'cairo' 'libxkbcommon' 'libxcb' 'pango')
@Riey
Riey / PKGBUILD
Last active January 15, 2021 15:40
kime-bin-pkgbuild
# Maintainer: riey <creeper844@gmail.com>
pkgname=kime-bin
pkgver=0.4.1
pkgrel=1
pkgdesc="Korean IME"
url="https://github.com/Riey/kime"
conflicts=('kime')
provides=('kime')
depends=('gtk3' 'cairo' 'libxcb')
#include <cstdint>
#include <optional>
#include <string>
#include <vector>
#include <iostream>
using utf8 = std::u8string_view;
using utf8_iter = std::u8string_view::const_iterator&;
#define CONT_MASK 0b00111111
@Riey
Riey / cm-2020.rs
Last active December 25, 2020 07:19
use time::{Date, Weekday};
fn main() {
let n = std::env::args().nth(1).unwrap().parse().unwrap();
let current_year = 2020;
let mut native = 0;
let mut bridge = 0;
for i in 0..n {
@Riey
Riey / vec_decl.rs
Last active November 8, 2020 17:06
주간문제 HashMap
use std::slice::SliceIndex;
use std::ptr::NonNull;
use std::ops::{Deref, DerefMut, Index, IndexMut};
use std::iter::FromIterator;
// 필드는 참고용이며 꼭 이렇게 안해도됨
pub struct Vec<T> {
ptr: NonNull<T>,
len: usize,
cap: usize,