Skip to content

Instantly share code, notes, and snippets.

View fish895623's full-sized avatar
🏠
Working from home

fish895623

🏠
Working from home
  • ViewMTechnology
  • Korea
View GitHub Profile
@royvandam
royvandam / CMakeLists.txt
Created July 2, 2012 14:11
Adds an uninstall target to the CMAKE generated Makefile.
##
# Add uninstall target
# Requirements: Copy the uninstall.cmake file to the appropriate CMAKE_MODULE_PATH.
#
add_custom_target(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_MODULE_PATH}/uninstall.cmake"
)
@sighingnow
sighingnow / Makefile
Last active June 20, 2024 08:40
Detect operating system in Makefile.
# Detect operating system in Makefile.
# Author: He Tao
# Date: 2015-05-30
OSFLAG :=
ifeq ($(OS),Windows_NT)
OSFLAG += -D WIN32
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
OSFLAG += -D AMD64
endif
@varqox
varqox / install_debian_with_debootstrap_howto.md
Last active June 14, 2024 02:58
Instructions how to install Debian using debootstrap
@ahromis
ahromis / docker-compose.yml
Last active February 16, 2024 14:48
Gogs docker-compose.yml
version: '2'
services:
postgres:
image: postgres:9.5
restart: always
environment:
- "POSTGRES_USER=${POSTGRES_USER}"
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}"
- "POSTGRES_DB=gogs"
volumes:
@dungsaga
dungsaga / deobfuscate-odttf-in-xps.js
Last active April 3, 2024 09:37
deobfuscate odttf file (extracted from M$ XPS file)
const purpose = "Purpose: deobfuscate odttf file (extracted from M$ XPS file)"
const usage = "Usage: node deobfuscate-odttf-in-xps.js <guid-obfuscated-font-file.odttf> [<output-file.ttf>]"
const obfuscatedStartOffset = 0 //start of obfuscated bytes in font file
const obfuscatedEndOffset = 32 //start of obfuscated bytes in font file
const guidSize = 32 // length of GUID string (only hex characters included)
const fs = require('fs')
const path = require('path')
1. Install oh-my-zsh
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
2. Clone necessary plugins.
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
3. Add plugins to ~/.zshrc as
plugins = ( [plugins...] zsh-autosuggestions zsh-history-substring-search zsh-syntax-highlighting)
@fnky
fnky / ANSI.md
Last active June 20, 2024 11:37
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@superboum
superboum / LICENCE.txt
Last active May 29, 2024 19:09
Install Debian with Debootstrap + Grub EFI
MIT LICENSE
Copyright 2018 Quentin Dufour
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH

Example of jatJar task using Gradle Kotlin DSL:

val mainClass = "com.github.daggerok.Main" // replace it!

tasks {
  register("fatJar", Jar::class.java) {
    archiveClassifier.set("all")
    duplicatesStrategy = DuplicatesStrategy.EXCLUDE
 manifest {
@Beneboe
Beneboe / how-to-setup-verified-commits.md
Last active June 18, 2024 17:16
How to Setup Verified Commits on Github