Skip to content

Instantly share code, notes, and snippets.

View Southclaws's full-sized avatar
🌸
live laugh love'n my way to aesthetic nirvana

Barnaby Keene Southclaws

🌸
live laugh love'n my way to aesthetic nirvana
View GitHub Profile
@Southclaws
Southclaws / InputWithChips.tsx
Created July 21, 2021 19:58
InputWithChips renders what appears to be a single input field that contains small tag-like elements inside it known as "Chips". When the user types something and presses Enter, their text is turned into an element inside the interactive box which can be removed either by using backspace or by clicking a small "delete" inside the chip. It achiev…
import React, { Component, useState } from "react";
type Props = {
// The tags to show the component with when it's created
initialTags: string[];
// Callback to fire when the user adds a new tags
onAdd: (text: string) => void;
// Callback to fire when the user removes a tag either by backspace or click
@Southclaws
Southclaws / Typewriter.tsx
Created July 5, 2021 21:51
A little typewriter component - pass in a list of strings and it will type out the first one, backspace, move to the second and cycle through each string.
type TypeWriterProps = {
targets: string[];
};
type TypeWriterState = {
target: number;
text: string;
character: number;
increment: number;
pausedFor: number;
#include <a_samp>
#include <rotations.inc>
main() {}
// for debug
static PlayerText:MessageTextdraw[MAX_PLAYERS];
static bool:AP = false;
static TargetAlt = 1000; // 1000ft - low altitude cruise
@Southclaws
Southclaws / dakyskye-discord-guild.md
Created July 12, 2020 23:24
dakyskye's discord server rules

Welcome to dakyskye's Discord guild.

Rules:

  1. Be nice to guild members
  2. Respect each others opinion
  3. Don't post NSFW content in channels not marked as NSFW
  4. Don't spam
  5. Don't share pirated content nor random server invitation links or unsolicided ads

To propose a change to this message, make a pull request to this file: https://gist.github.com/dakyskye/cc1ee2ebef5b98c4fcf396e9694c0d24

The preferred way of invoking a system call is determined by the kernel at boot time, and evidently this box uses sysenter . On an older machine you may see int 0x80 being used instead. In case you are struggling to make sense of that jump (like I was the first time I saw it) you might be interested to learn that it's there because

#open.mp Individual Contributor License Agreement

Thank you for your interest in contributing to open.mp ("We" or "Us").

This contributor agreement ("Agreement") documents the rights granted by contributors to Us. To make this document effective, please sign it and send it to Us by electronic submission, following the instructions at https://cla-assistant.io/openmultiplayer/homepage. This is a legally binding document, so please read it carefully before agreeing to it. The Agreement may cover more than one software project managed by Us.

@Southclaws
Southclaws / uncrustify.cfg
Created January 12, 2019 20:18
Uncrustify configuration for the Pawn language.
# Uncrustify-0.68-59-5813ad32
#
# General options
#
# The type of line endings.
#
# Default: auto
newlines = auto # lf/crlf/cr/auto
@Southclaws
Southclaws / .gitlab-ci.yml
Created December 16, 2018 22:33
sampctl+gitlab=ci/cd 🎉
build:
image:
name: southclaws/sampctl:latest
entrypoint: [""]
tags: [pawn]
artifacts:
paths:
- gamemodes/barp.amx
cache:
paths:

A quick proposal example for a preprocessor.

Input file "some-sql.pwn":

stock doSomeSQL() {
    @SQL(mysql_pqueryf, 10, 20) {
        SELECT *
        FROM table
 WHERE x=y
@Southclaws
Southclaws / github-release-downloads.sh
Created July 3, 2018 13:27
Count total downloads from GitHub releases using the GitHub API v3 and a simple jq expression
#!/usr/bin/env sh
# https://jqplay.org/s/CpDPlGueMM
# usage: `github-release-downloads.sh Username/Repository`
curl -s https://api.github.com/repos/$1/releases |
jq '[.[].assets | .[].download_count] | add' -