Skip to content

Instantly share code, notes, and snippets.

View rhiskey's full-sized avatar
📱
Master your craft

Vladimir Kiselev rhiskey

📱
Master your craft
View GitHub Profile
@dillionverma
dillionverma / ApplePayButton.tsx
Last active July 25, 2024 05:57
Apple Pay Button - How to make an Apple Pay button using React + NextJS + Typescript + Tailwindcss
// components/ApplePayButton.tsx
import { buttonVariants } from "@/components/ui/button";
import { cn, hasApplePay } from "@/lib/utils";
import { Icons } from "@/components/icons";
import Link from "next/link";
export const ApplePayButton = () =>
hasApplePay() && (
<Link
href="https://buy.stripe.com/00g7vD4Vu8zQb8k5kl?prefilled_promo_code=EARLYBIRD"
@nelson-liu
nelson-liu / filtering-twitter.md
Created May 27, 2023 20:16
Filter the Twitter /home to only show tweets with arxiv links.
  1. Download an ad blocker that supports EasyList filtering syntax. I personally use uBlock Origin.

  2. Add the following custom filter to the extension:

twitter.com##[aria-label="Timeline: Your Home Timeline"] article:not(:has-text(/arxiv.org/i))
@PurpleVibe32
PurpleVibe32 / vmwk17key-5000keys-unchecked.txt
Last active March 4, 2025 21:06
5000k+ vmware workstation pro 17 (untested)
Unavailable - VMWare took down my VMWare Workstation Pro 17 keys gist, so, to prevent legal issues i'll be taking this down too.
You can find evidence at https://gist.github.com/PurpleVibe32/30a802c3c8ec902e1487024cdea26251/forks
@alexzaitsev
alexzaitsev / DefaultLinkMovementMethod.java
Last active October 31, 2024 11:35
How to display HTML using Android Compose
/**
* Set this on a textview and then you can potentially open links locally if applicable
*/
public class DefaultLinkMovementMethod extends LinkMovementMethod {
private OnLinkClickedListener mOnLinkClickedListener;
public DefaultLinkMovementMethod(OnLinkClickedListener onLinkClickedListener) {
mOnLinkClickedListener = onLinkClickedListener;
}
@BLaZeKiLL
BLaZeKiLL / marchingcube.cpp
Created July 19, 2021 17:33
Marching Cubes Data
const int VertexOffset[8][3] = {
{0, 0, 0}, {1, 0, 0}, {1, 1, 0}, {0, 1, 0},
{0, 0, 1}, {1, 0, 1}, {1, 1, 1}, {0, 1, 1}
};
const int EdgeConnection[12][2] = {
{0, 1}, {1, 2}, {2, 3}, {3, 0},
{4, 5}, {5, 6}, {6, 7}, {7, 4},
{0, 4}, {1, 5}, {2, 6}, {3, 7}
};
@ransagy
ransagy / compile-ffmpeg-nvenc.sh
Last active March 16, 2025 05:49 — forked from Prototype-X/compile-ffmpeg-nvenc.sh
Script to build a static FFMpeg binary with NVENC support
#!/bin/bash
# This script will compile and install a static ffmpeg build with support for nvenc in ubuntu.
# See the prefix path and compile options if edits are needed to suit your needs.
# NOTE: This build is made to target Ubunutu 16.04 Data-Science Azure VMs - With nVidia 418.xx drivers and CUDA SDK 9.0.
# It also relies on a hack described in https://trac.ffmpeg.org/ticket/6431#comment:7 to make glibc dynamic still.
# Long story short, you need to edit your ffmepg's configure script to avoid failures on libm and libdl.
# in function probe_cc, replace the _flags_filter line to: _flags_filter='filter_out -lm|-ldl'
@ErikHellman
ErikHellman / LoginScreenWithCompose.kt
Created December 16, 2019 17:51
A simple demo of using Jetpack Compose to build a Login screen
package se.hellsoft.jetpackcomposeintro
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.Composable
import androidx.compose.Model
import androidx.compose.state
import androidx.compose.unaryPlus
import androidx.ui.core.*
import androidx.ui.foundation.shape.border.Border
@gamerxl
gamerxl / ue4-json-parsing.cpp
Last active January 27, 2025 08:24
How to parse a json response (e.g. a json array) in ue4 c++ context.
/**
* Include the PrivateDependencyModuleNames entries below in your project build target configuration:
* PrivateDependencyModuleNames.AddRange(new string[] { "Json", "JsonUtilities" });
*/
#include "Runtime/Online/HTTP/Public/Http.h"
#include "Serialization/JsonSerializer.h"
FHttpResponsePtr Response;
@gaearon
gaearon / index.html
Last active January 30, 2025 01:06
Add React in One Minute
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Add React in One Minute</title>
</head>
<body>
<h2>Add React in One Minute</h2>
<p>This page demonstrates using React with no build tooling.</p>
@Bilka2
Bilka2 / webhook.py
Last active February 27, 2025 18:31
Simple discord webhook with python
import requests # dependency
url = "<your url>" # webhook url, from here: https://i.imgur.com/f9XnAew.png
# for all params, see https://discordapp.com/developers/docs/resources/webhook#execute-webhook
data = {
"content" : "message content",
"username" : "custom username"
}