REST API response format based on some of the best practices
# References: | |
# https://cmake.org/cmake/help/latest/command/add_custom_target.html | |
# https://samthursfield.wordpress.com/2015/11/21/cmake-dependencies-between-targets-and-files-and-custom-commands/ | |
# https://gist.github.com/socantre/7ee63133a0a3a08f3990 | |
# https://stackoverflow.com/questions/24163778/how-to-add-custom-target-that-depends-on-make-install | |
# https://stackoverflow.com/questions/30719275/add-custom-command-is-not-generating-a-target | |
# https://stackoverflow.com/questions/26024235/how-to-call-a-cmake-function-from-add-custom-target-command | |
# https://blog.csdn.net/gubenpeiyuan/article/details/51096777 | |
cmake_minimum_required(VERSION 3.10) |
#!/bin/bash | |
# | |
# rar2zip conversion script | |
# Based on: https://shkspr.mobi/blog/2016/12/converting-rar-to-zip-in-linux/ | |
# | |
# Usage: rar2zip.sh file [file ...] | |
echo "Converting RARs to ZIPs" | |
# Use RAM disk for temporary files. |
type Set struct { | |
list map[int]struct{} //empty structs occupy 0 memory | |
} | |
func (s *Set) Has(v int) bool { | |
_, ok := s.list[v] | |
return ok | |
} |
Note
to active Office without crack, just follow https://github.com/WindowsAddict/IDM-Activation-Script,
you wiil only need to run
irm https://massgrave.dev/ias | iex
#!/bin/sh | |
set -e | |
# hibereboot: A 'hibernate & reboot' one-shot hack script for systemd-based hosts | |
# | |
# Place this script somewhere in your $PATH and run it (as root) to hibernate and reboot. | |
# For full automation, allow the script to be run with passwordless-sudo: | |
# | |
# > /etc/sudoers | |
# yourusername ALL=(ALL) SETENV:NOPASSWD: /path/to/hibereboot |
In this document I describe my setup about how to add a menu shortcut that will hibernate and reboot the system into a different OS (in my case, Windows), and then restore linux on the next reboot.
For this, I'll be using Arch Linux with systemd-boot as my boot manager, but in practice any bootloader that handles the LoaderEntryOneShot (a.k.a. BootNext) efivar should work.
NOTE It is advisable to not do this with window's fast boot feature active, since alternating the hibernation of two systems can cause shared partitions to get corrupted. However, if additional steps are taken in order to ensure the shared partition are unmounted before reboot, or no partitions are shared between the two OSs, this can be made to work with fastboot enabled which should give quite a boost in Windows' startup time.
import "sort" | |
ages := map[string]int{ | |
"a": 1, | |
"c": 3, | |
"d": 4, | |
"b": 2, | |
} | |
names := make([]string, 0, len(ages)) |
This is a request to add the CA root certificate for Honest Achmed's Used Cars and Certificates. The requested information as per the CA information checklist is as follows: | |
1. Name | |
Honest Achmed's Used Cars and Certificates | |
2. Website URL | |
www.honestachmed.dyndns.org |