Skip to content

Instantly share code, notes, and snippets.

@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@skippednote
skippednote / setup-tor.md
Last active April 28, 2024 16:09
Setup Tor on macOS

Setup One: Buy a Mac if you don't have one.

Setup Two: Install Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Setup Three:

@diegoliv
diegoliv / webflow.html
Last active April 28, 2024 16:09
Lenis + Webflow (with anchor links workaround)
<script src="https://cdn.jsdelivr.net/gh/studio-freight/lenis@v0.2.26/bundled/lenis.js"></script>
<script>
if (!document.querySelector("html").classList.contains('w-editor')){
const lenis = new Lenis({
duration: 1.2,
easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)), // https://www.desmos.com/calculator/brs54l4xou
direction: 'vertical', // vertical, horizontal
gestureDirection: 'vertical', // vertical, horizontal, both
smooth: true,
@janispritzkau
janispritzkau / sungrow_sh10rt_modbus.yaml
Created August 9, 2022 09:48
Modbus Registers for Sungrow SH10RT Hybrid Inverter
input_registers:
- name: protocol_number
data_type: uint32
address: 4950
- name: protocol_version
data_type: uint32
address: 4952
- name: arm_software_version
data_type: string
address: 4954
/*
* This script fetches all color styles from a Figma team/document.
*
* Dependencies:
*
* - node-fetch
*
* Due to a limitation in the Figma /styles endpoint, we need to use a
* document for actually using the colors in a color grid 🙄That's why
* we're both fetching from /styles and /files below.
@vegard
vegard / kernel-dev.md
Last active April 28, 2024 16:02
Getting started with Linux kernel development

Getting started with Linux kernel development

Prerequisites

The Linux kernel is written in C, so you should have at least a basic understanding of C before diving into kernel work. You don't need expert level C knowledge, since you can always pick some things up underway, but it certainly helps to know the language and to have written some userspace C programs already.

It will also help to be a Linux user. If you have never used Linux before, it's probably a good idea to download a distro and get comfortable with it before you start doing kernel work.

Lastly, knowing git is not actually required, but can really help you (since you can dig through changelogs and search for information you'll need). At a minimum you should probably be able to clone the git repository to a local directory.

@intergalacticspacehighway
intergalacticspacehighway / FlatListGapExample.jsx
Created February 28, 2023 01:14
Add gap in FlatList items with numColumns
import {Dimensions, FlatList, View} from 'react-native';
const screenWidth = Dimensions.get('window').width;
const numColumns = 2;
const gap = 5;
const availableSpace = screenWidth - (numColumns - 1) * gap;
const itemSize = availableSpace / numColumns;
const renderItem = ({item}) => {
@ymmt2005
ymmt2005 / howto-tech-docs.md
Last active April 28, 2024 15:57
技術文書の書き方

技術文書の書き方

このメモは、私(@ymmt2005)が長年にわたってソフトウェアプロダクト開発に関わってきて 2022年現在こうしたほうが良いと考えているベストプラクティスです。

科学的な分析等に基づくわけではない経験則であるため、今後も随時見直すことがありますし、 ここに書いてあることが常に正しいわけでもあらゆるソフトウェア開発に適するわけでもありません。

しかしながら、実務経験が豊富で、モダンな技術スタックに明るいエンジニアの経験則は一定の 役に立つのではないかと考えて記します。

@jamescarlos
jamescarlos / cache_backup.sh
Created May 27, 2015 10:21
Backup unRAID cache drive
#!/bin/bash
LogFile=/var/log/cache_backup.log
BackupDir=/mnt/disk6/cache_backup
echo `date` "Starting cache drive backup to " $BackupDir >> $LogFile
#Stop plugin services located in /etc/rc.d/
# enter in plugins to stop here, if any
# /etc/rc.d/rc.plexmediaserver stop >> $LogFile