Skip to content

Instantly share code, notes, and snippets.

View springeye's full-sized avatar

springeye springeye

View GitHub Profile
@skyzyx
skyzyx / homebrew-gnubin.md
Last active July 13, 2024 19:20
Using GNU command line tools in macOS instead of FreeBSD tools

macOS is a Unix, and not built on Linux.

I think most of us realize that macOS isn't a Linux OS, but what that also means is that instead of shipping with the GNU flavor of command line tools, it ships with the FreeBSD flavor. As such, writing shell scripts which can work across both platforms can sometimes be challenging.

Homebrew

Homebrew can be used to install the GNU versions of tools onto your Mac, but they are all prefixed with "g" by default.

All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc.

_Q_STRINGS = {
NIC_MS_AD_QUICK_STEP01: "Step",
NIC_MS_AD_QUICK_STEP02: "of",
NIC_MS_AD_QUICK_INTRO: "Introduction",
MISC_QSYNC_ERRMSG03: "Each job supports maximum 5 folder pairs.",
MISC_QSYNC_ERRMSG05: "The password should only contain 1-16 characters.",
MISC_QSYNC_ERRMSG08: "The time interval must be larger than 5 minutes.",
MISC_QSYNC_ERRMSG09: "The source and target paths are identical.",
MISC_QSYNC_ERRMSG11: "The specified paths are parent and child folders.",
MISC_QSYNC_ERRMSG12: "Please specify at least one pair of folders.",
anonymous
anonymous / config.yml
Created February 6, 2018 09:28
flexget config
#使用前请将注释删除以免出问题。#后面带汉字的就是注释
#如果不想启用 Web-UI 则删除本段代码
web_server:
bind: 0.0.0.0
port: 50001 #web-ui的监听端口
# ssl_certificate: '/etc/ssl/private/myCert.pem' #SSL证书位置,启用https的话,把前面的#号删除
# ssl_private_key: '/etc/ssl/private/myKey.key' #SSL证书位置,启用https的话,把前面的#号删除
web_ui: yes #启用web-ui
base_url: /flex #网址后缀
run_v2: yes #启动 V2 版本
@voidexp
voidexp / go-env-with-msys2.md
Last active February 19, 2024 19:44
Go development environment on Windows with MSYS2

Go development environment on Windows with MSYS2

Normally, it is sufficient to grab the Go MSI installer from the website in order to set up the toolchain. However, some packages that provide Go wrappers for C libraries rely on cgo tool, which in turn, needs the GCC toolchain in order to build the glue code. Also, 3rd-party dependencies are usually hosted on services like GitHub, thus Git is also needed. This mini-guide illustrates how to setup a convenient development environment on Windows using MSYS2.

@hoandang
hoandang / php-docker-ext
Created May 20, 2017 01:12
Complete list of php docker ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
@crazygit
crazygit / install_gnu_utilities.sh
Last active September 14, 2021 13:43
Use GNU Command Line Tools on macOS/OS X
# Refer: https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/
brew install coreutils
brew tap homebrew/dupes
brew install binutils
brew install diffutils
brew install ed --with-default-names
brew install findutils --with-default-names
brew install gawk
brew install gnu-indent --with-default-names
brew install gnu-sed --with-default-names
@mmrko
mmrko / save-load-docker-images.sh
Last active January 30, 2023 10:23 — forked from lalyos/save-all-images.sh
Script to (selectively) save/load multiple Docker images
#!/usr/bin/env bash
# Script to (selectively) save/load multiple Docker images to/from a directory.
# Run ./save-load-docker-images.sh for help.
set -e
directory=$PWD
filter=""
compress=0
@nick1m
nick1m / Package Control.sublime-settings
Last active January 25, 2021 20:51
Sublime Text 3 There are no packages available for installation
# Сначала оказалось, что лежал сайт (в конце ответа лежит решение позволяющее обойти и эту проблему),
# проверяем https://packagecontrol.io/channel_v3.json, но и после возобновления проблема не ушла.
# Добавляем в настройки плагинов для пользователя (Preferences > Package Settings > Package Control > Settings - User) каналы:
"channels":
[
"https://packagecontrol.io/channel_v3.json",
"https://web.archive.org/web/20160103232808/https://packagecontrol.io/channel_v3.json",
"https://gist.githubusercontent.com/nick1m/660ed046a096dae0b0ab/raw/e6e9e23a0bb48b44537f61025fbc359f8d586eb4/channel_v3.json"
@agrif
agrif / README.md
Last active September 6, 2022 07:32
my current ipxe setup

All of this should go into a directory that is available via HTTP and NFS. In variables.ipxe you can provide the HTTP root and NFS root paths, which are used later. Also there are some variables to set the default iscsi root (without the last part after the colon) and the initiator iqn. These are used to auto-fill the iscsi menu options.

You should tell iPXE to boot bootstrap.ipxe.

The bootstrap process reads a bunch of files and sets a bunch of variables. Of importance, it will read the file macs/XXXXXXX.ipxe

@Informatic
Informatic / Howto: iPXE+Windows7+iSCSI.markdown
Created June 30, 2013 05:26
Quick iPXE & Windows7-on-iSCSI howto

Quick Installation Howto

  1. Make sure you have successfuly set up iPXE, iSCSI target (iSCSI Enterprise Target on Debian works fine for me), TFTP server and some time to spend.
  2. Get yourself a NTFS-formatted USB stick.
  3. Copy contents of installation DVD into mentioned USB stick.
  4. Get a copy of wimboot and load it into your TFTP server.
  5. Copy boot/bcd, boot/boot.sdi, sources/boot.wim and bootmgr into TFTP root as well.
  6. Create the bootstrap script (included bootstrap.ipxe file) and boot your