Skip to content

Instantly share code, notes, and snippets.

@jamesktan
jamesktan / Shell Commands ePub
Last active April 18, 2024 12:28
Unzipping & Zipping ePub from Command Line
// To unzip the epub, move the ePub to a folder, cd to it then simply:
unzip MyEbook.epub
// To zip up an epub:
1. zip -X MyNewEbook.epub mimetype
2. zip -rg MyNewEbook.epub META-INF -x \*.DS_Store
3. zip -rg MyNewEbook.epub OEBPS -x \*.DS_Store
Some explanations necessary here. We start each line with two flags:
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 18, 2024 12:27
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@c22dev
c22dev / DEPSteps.md
Last active April 18, 2024 12:27
Remove MDM & DEP from an Apple Sillicon Mac (Sonoma)

How to make an MDM Mac shine like it's brand new ?

Works, as of 14/04/2024, on macOS 14.4.1 and lower (prob higher but idk)

This was made for Apple Sillicon Macs.

Restore Process

You need another Mac for this.

If you don't have one and have recovery locked, it's not possible.

@cayter
cayter / repository.ts
Last active April 18, 2024 12:26
Drizzle ORM Type-Safe Repository With PgTable
import { startSpan } from "@sentry/remix";
import type { StartSpanOptions } from "@sentry/types";
import {
type AnyColumn,
type AnyTable,
type BuildQueryResult,
type DBQueryConfig,
type DrizzleTypeError,
type Equal,
type ExtractTablesWithRelations,
@MichalAdorno
MichalAdorno / docker-compose.yml
Created November 1, 2019 15:31 — forked from zhunik/docker-compose.yml
docker-compose Postgres health-check
version: "3"
services:
postgress:
....
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
app:
@tdreyno
tdreyno / airports.json
Created December 13, 2012 18:50
JSON data for airports and their locations
This file has been truncated, but you can view the full file.
[
{
"code": "AAA",
"lat": "-17.3595",
"lon": "-145.494",
"name": "Anaa Airport",
"city": "Anaa",
"state": "Tuamotu-Gambier",
"country": "French Polynesia",
@skarllot
skarllot / net35-cf.md
Last active April 18, 2024 12:23
Build .NET Compact Framework 3.5

Install

Force MSBuild support

  • Copy files and directories from 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\*' to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5';
  • Copy files from 'C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\Debugger\BCL\*' to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\CompactFramework' directory;
  • Create 'RedistList' directory inside created 'CompactFramework' directory;
  • Create 'FrameworkList.xml' inside 'RedistList' directory and type the following:

rank by height:

  1. mid (mid-mount)
  2. flat (flat mount, non-angled insertion)
  3. low
  4. med
  5. tall

low, med and tall are likely angled insertion - I don't check that, but it's reasonable to assume. The lines between low, med and tall are blurred, don't expect consistency - look for specific height values if you need them (and make a PR if you can, I'd appreciate it!) For mid-mount, smd+tht means inner row pins are THT - otherwise, inner row pins are SMD, which might be noticeably harder to rework.

@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active April 18, 2024 12:22
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus