Skip to content

Instantly share code, notes, and snippets.

@zacwest
zacwest / ios-font-sizes.swift
Last active May 6, 2024 13:04
iOS default font sizes - also available on https://www.iosfontsizes.com
let styles: [UIFont.TextStyle] = [
// iOS 17
.extraLargeTitle, .extraLargeTitle2,
// iOS 11
.largeTitle,
// iOS 9
.title1, .title2, .title3, .callout,
// iOS 7
.headline, .subheadline, .body, .footnote, .caption1, .caption2,
]
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active May 6, 2024 13:04
国内的 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+

@kmafeni04
kmafeni04 / lapis-new.sh
Last active May 6, 2024 13:03
Lapis project initialisation script
#!/bin/bash
echo "What would you like to name the project?:"
read -r project_name
mkdir "$project_name"
cd "$project_name" || return
luarocks init --lua-version=5.1
luarocks install lapis
luarocks install etlua
@akatakritos
akatakritos / create-aspnet-core-identity-schema.sql
Created June 5, 2018 03:19
Script to create the ASPNET core Identity tables
USE [HobbyDB]
GO
/****** Object: Table [dbo].[AspNetRoleClaims] Script Date: 6/4/2018 10:18:03 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[AspNetRoleClaims]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[AspNetRoleClaims](

不用 bootcamp 來安裝 Windows 7 並擁有額外分割區的方法

實踐時所用的環境

  • Mac OS X Mavericks (10.9.x)
  • Mac mini
  • [GPT fdisk][] (0.8.10)
  • Windows 7

行前須知

@ahmadawais
ahmadawais / sendy-install-digital-ocean.md
Last active May 6, 2024 13:02
Install Sendy on DigitalOcean 2022

You can open the Marketplace tab and search for the current LAMP stack.

We will use the LAMP stack on a Basic plan for 5$/month.

php -v

# if php 8 then
@ahmadshobirin
ahmadshobirin / set locale and timezone indonesia in laravel.md
Last active May 6, 2024 13:01
set locale and timezone indonesia in laravel

Open File App\Providers\AppServiceProvider

Change method boot

use Carbon\Carbon;


public function boot()
{
	config(['app.locale' => 'id']);
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active May 6, 2024 13:00
crack activate Office on mac with license file
@nebhead
nebhead / CustomUSBName.md
Last active May 6, 2024 12:57
Instructions for Adding Custom Naming for Arduino USB Device

The following is capturing instructions on how to add custom naming for an Arduino Leonardo (or generic pro-micro) for my Arcade Controller device. I wanted to have a simple record so that when I inevitably come back to this someday I can recall how I accomplished this. Reference was taken from the following YouTube video (https://youtu.be/hoCOq9Ngp44?t=1156) at approximately 19m16s.

WINDOWS Instructions:

Create a new set of folders: ~\Documents\Arduino\hardware\daemonbite\avr

Copy everything from C:\Program Files (x86)\Arduino\hardware\arduino\avr to this new folder.

@robatron
robatron / fallout-1-high-res-patch-mac-osx.md
Last active May 6, 2024 12:55
How to get the Fallout 1 (and Fallout 2) high-resolution patch working for Mac OS X

Fallout 1 (and Fallout 2) Hi-Res Patch for Mac OS X

Fallout 1 was originally designed to run at 640x480 resolution. I wanted to run the Mac OS X version of Fallout on my MacBook 11", which has a 1366x768 display. There is a [high resolution patch][hi-res], but it only supports the Windows version of Fallout.

Turns out that the OS X version of Fallout runs through Wine, so we can get this patch working with just a few configuration changes:

Note for Fallout 2 users: The process for Fallout 2 is essentially the same, with a different patch, and some minor pathing differences. Other than that, the process is exactly the same!

Install Wine