Skip to content

Instantly share code, notes, and snippets.

View inclyc's full-sized avatar

Yingchi Long inclyc

  • Institute of Computing Technology, CAS
  • Beijing
  • 10:27 (UTC +08:00)
View GitHub Profile
#!/bin/bash
# 遍历文件夹中的所有文件,将字符集从GB18030转换为UTF
# 参数:
# $1:源文件夹
# $2:目标文件夹
# 获取文件夹中的所有文件:
FILES=`find $1 -type f`
@nh2
nh2 / nixos-rootfs.nix
Last active November 16, 2024 04:08
Example of how to build a NixOS root file system
# Build with:
# NIX_PATH=nixpkgs=$HOME/src/nixpkgs nix-build --no-link '<nixpkgs/nixos>' -A config.system.build.tarball -I nixos-config=thisfile.nix
# You can also use
# -A config.system.build.toplevel
# to build something you can browse locally (that uses symlinks into your nix store).
{config, pkgs, ...}:
{
# We need no bootloader, because the Chromebook can't use that anyway.
boot.loader.grub.enable = false;
@cirrusUK
cirrusUK / ix
Created October 4, 2015 20:05
shell script for the ix pastebin
#!/usr/bin/env bash
# Examples:
# ix hello.txt # paste file (name/ext will be set).
# echo Hello world. | ix # read from STDIN (won't set name/ext).
# ix -n 1 self_destruct.txt # paste will be deleted after one read.
# ix -i ID hello.txt # replace ID, if you have permission.
# ix -d ID
ix() {