Skip to content

Instantly share code, notes, and snippets.

View talentlessguy's full-sized avatar
🏖️
Existing

v1rtl talentlessguy

🏖️
Existing
View GitHub Profile
@talentlessguy
talentlessguy / patch.dsl
Created November 14, 2023 18:16
Patch for ASUS ROG G16 2023
DefinitionBlock ("", "SSDT", 1, "CUSTOM", "CSC3551", 0x00000001)
{
External (_SB_.PC00.SPI0, DeviceObj)
External (_SB_.PC00.SPI0.SPK1, DeviceObj)
Scope (_SB.PC00.SPI0)
{
Name (_DSD, Package ()
{
ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),

Keybase proof

I hereby claim:

  • I am talentlessguy on github.
  • I am v1rtl (https://keybase.io/v1rtl) on keybase.
  • I have a public key ASCF80TAiuLcWpzKYrt5DESQZsbSBSMBzd28bd9HGHD2hAo

To claim this, I am signing this object:

@talentlessguy
talentlessguy / gist:b243a9250cd4a2073df27ff2d7664cd3
Last active June 9, 2022 16:41
did:3:kjzl6cwe1jw14b7ju7sn3393fgw8m02wqlhxh8hfvoee5qch7y3hjsl7m9ddjyh
did:3:kjzl6cwe1jw14b7ju7sn3393fgw8m02wqlhxh8hfvoee5qch7y3hjsl7m9ddjyh
@talentlessguy
talentlessguy / 26_1.py
Last active June 18, 2021 19:20
26 задания ЕГЭ
# https://inf-ege.sdamgia.ru/problem?id=27423
f = open("26.txt")
lines = f.readlines()
[S, N] = list(map(int, lines[0].split(" ")))
files = list(map(int, lines[1:]))
@talentlessguy
talentlessguy / page.js
Last active May 30, 2020 11:59
SSR example for react-link-previewer
Page.getInitialProps = async ({ query }) => {
try {
const res = await fetch(`https://og-service.herokuapp.com/?link=${query}`)
const json = await res.json()
return { json }
catch (e) {
return { error: e }
}
@talentlessguy
talentlessguy / README.md
Created May 17, 2020 15:25
Next.js + Django + Nginx HTTPS setup

Next.js + Django + HTTPS setup

  1. Install certbot:
sudo apt-get install certbot python3-certbot-nginx
  1. Update your config with this:
@talentlessguy
talentlessguy / Outline.jsx
Last active May 15, 2020 15:26
Trying to reach that instance of effect inside React code
import { OutlineEffect } from 'postprocessing'
import { forwardRef, useMemo, useImperativeHandle } from 'react'
import { useThree } from 'react-three-fiber'
const Outline = forwardRef((props: OutlineEffect, ref) => {
const { scene, camera } = useThree()
const effect = useMemo(() => new OutlineEffect(scene, camera, props), [props])
useImperativeHandle(ref, () => effect, [effect])
return null
@talentlessguy
talentlessguy / view_counter.lua
Created May 14, 2020 09:55
Page view counter for KVDB
-- example KVdb script
-- HTML output
kvdb.header["content-type"] = "text/html"
-- read HTTP form variable and set key
if kvdb.var.slug then
local count = kvdb.get(kvdb.var.slug)
local action = kvdb.var.action
@talentlessguy
talentlessguy / deploy.fish
Created May 8, 2020 10:49
Simple rsync deploy script
echo Deploying to $SSH_SERVER by $SSH_USER...
rsync -r --delete -v -e ssh (pwd)/dist/* $SSH_USER@$SSH_SERVER:/home/$SSH_USER/www/
@talentlessguy
talentlessguy / Figure.tsx
Created April 2, 2020 12:35
Epic 3D rotating text
import React, { Suspense, useContext, useEffect, useState } from 'react'
import dynamic from 'next/dynamic'
import { useFrame, Canvas, Dom } from 'react-three-fiber'
import { useRef } from 'react'
import * as THREE from 'three'
import Text from './Text'
import { ColorContext } from '../lib/context'
const Controls = dynamic(() => import('./Controls'), {
ssr: false