Skip to content

Instantly share code, notes, and snippets.

/*
* 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
@rxaviers
rxaviers / gist:7360908
Last active April 28, 2024 15:52
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@daveh
daveh / Container.php
Last active April 28, 2024 15:51
Dependency Injection in PHP (code to accompany https://youtu.be/TqMXzEK0nsA)
<?php
class Container
{
private array $registry = [];
public function set(string $name, Closure $value): void
{
$this->registry[$name] = $value;
}
@Khaadahmed
Khaadahmed / index.html
Created April 28, 2024 15:44
Pure CSS Gradient Background Animation
<div class="d-flex flex-column justify-content-center w-100 h-100">
<div class="d-flex flex-column justify-content-center align-items-center">
<h1 class="fw-light text-white m-0">Pure CSS Gradient Background Animation</h1>
<div class="btn-group my-5">
<a href="https://codepen-api-export-production.s3.us-west-2.amazonaws.com/zip/PEN/pyBNzX/1578778289271/pure-css-gradient-background-animation.zip" class="btn btn-outline-light" aria-current="page"><i class="fas fa-file-download me-2"></i> SOURCE CODE</a>
<a href="https://codepen.io/P1N2O/full/pyBNzX" class="btn btn-outline-light">FULL SCREEN <i class="fas fa-expand ms-2"></i></a>
</div>
<a href="https://manuel.pinto.dev" class="text-decoration-none">
<h5 class="fw-light text-white m-0">โ€” Pen by Manuel Pinto โ€”</h5>
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 28, 2024 16:07
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory