Skip to content

Instantly share code, notes, and snippets.

@ramzesenok
ramzesenok / CustomSwipeActions.swift
Created March 20, 2022 17:19
SwiftUI custom swipe actions cause there are none outside of the List
struct ContentView: View {
@State var titles = ["Cell #1", "Cell #2", "Cell #3", "Cell #4"]
var body: some View {
NavigationView {
ScrollView {
VStack(spacing: 0) {
ForEach(self.titles, id: \.self) { title in
HStack {
Text(title)
term description reference
Phase ADNI phase link
ID Record ID link
RID Record ID link
PTID Patient ID link
SITEID Site ID link
V
@jeffochoa
jeffochoa / 1.ProcessClass.php
Last active April 23, 2024 21:22
Understanding Laravel pipelines
<?php
namespace App\Features;
use App\Features\FirstTask;
use App\Features\SecondTask;
use Illuminate\Pipeline\Pipeline;
// *Naming things is hard* ... So, this is a class called `ProcessClass` that `run()` some text ¯\_(ツ)_/¯
class ProcessClass
@MightyPork
MightyPork / usb_hid_keys.h
Last active April 23, 2024 21:20
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/
@evantoli
evantoli / GitConfigHttpProxy.md
Last active April 23, 2024 21:19
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@lavantien
lavantien / modern-software-engineering-resources.md
Last active April 23, 2024 21:17
Modern Software Engineering Resources

Modern Software Engineering

Knowledge and Education should be open and free. Hierarchy and Exploitation must be abolished.

  • Z. (down) Notes below. Avoid funnel sales, if you spent money, there's something wrong. Also don't forget good OpSec, self defense gears, and physical/mental strength.
  • A. (go) Development Environment.
  • B. (go) Complementary Subjects (Linguistics, English, Security, OpSec, Psychology, Anthropology, History, Philosophy, Economics, Business, Defense, Cooking, Xenology, Self Defense).
  • C. (go) Fundamentals of Science and Technology (Logic, Physics (Classical/Quantum Mechanics, Thermodynamics, Electricity, Relativity, Electronics, Electromagnetism, Optoelectronic, Semiconductor, Fusion), Mathematics (Calculus, Linear Algebra, Statistics, Applied Math), Game Theory, Biology, Medical, and Their Applications).
  • D. ([go](#d-computer-science-and-competitiv
@lumynou5
lumynou5 / youtube-commenter-names.user.js
Last active April 23, 2024 21:17
Make YouTube display the names of commenters instead of their handles.
// ==UserScript==
// @name YouTube Commenter Names
// @version 1.5.17
// @description Make YouTube display the names of commenters instead of their handles.
// @author Lumynous
// @license MIT
// @match https://www.youtube.com/*
// @match https://studio.youtube.com/*
// @noframes
// @downloadURL https://gist.github.com/lumynou5/74bcbab54cd9d8fcd3c873fffbac5d3d/raw/youtube-commenter-names.user.js
@catalinmiron
catalinmiron / README.md
Created April 16, 2024 20:36
Expo app.json Apple Privacy Manifest

About

The privacy details that you may need to add for Apple Privacy Manifest.

This config plugin it's already available from expo >=50.0.17 (Part of this PR by aleqsio)

Tip

Read more about Privacy Manifest File from Apple docs

@CesarCapillas
CesarCapillas / add-by-id.sh
Last active April 23, 2024 21:14
SOLR bash recipes for creating, deleting or truncating collections, monitoring and searching.
#!/bin/bash
COLLECTION=${2:-zylk}
SERVER=${3:-localhost}
PORT=${4:-8983}
if [ -z "$1" ]; then
# Usage
echo 'Usage: add-by-id.sh <id> [<collection> <solr-server=localhost> <port=8383>]'
else
curl -X POST "http://${SERVER}:${PORT}/solr/${COLLECTION}/update?commit=true" -H "Content-Type: text/xml" --data-binary "<add><doc><field name='id'>$1</field><field name='url'>$1</field></doc></add>"
@Diegiwg
Diegiwg / !_example.py
Last active April 23, 2024 21:07
Script that automatically generates styling classes to apply to NiceGUI elements, using the Tailwind system
from Typography import Typography
from Backgrounds import Backgrounds
from Sizing import Sizing
from nicegui import ui
# STYLE LIB
s_title = (
Typography()
.text_color("text-teal-600")