Skip to content

Instantly share code, notes, and snippets.

View Warkanlock's full-sized avatar
🎯
Focusing

txxnano Warkanlock

🎯
Focusing
View GitHub Profile
@gaearon
gaearon / 00-README-NEXT-SPA.md
Last active May 30, 2024 14:22
Next.js SPA example with dynamic client-only routing and static hosting

Next.js client-only SPA example

Made this example to show how to use Next.js router for a 100% SPA (no JS server) app.

You use Next.js router like normally, but don't define getStaticProps and such. Instead you do client-only fetching with swr, react-query, or similar methods.

You can generate HTML fallback for the page if there's something meaningful to show before you "know" the params. (Remember, HTML is static, so it can't respond to dynamic query. But it can be different per route.)

Don't like Next? Here's how to do the same in Gatsby.

@Warkanlock
Warkanlock / README.md
Created February 12, 2022 11:24 — forked from subfuzion/README.md
vim/neovim configuration

I recently switched over to neovim (see my screenshots at the bottom). Below is my updated config file.

It's currently synchronized with my .vimrc config except for a block of neovim-specific terminal key mappings.

This is still a work in progress (everyone's own config is always a labor of love), but I'm already extremely pleased with how well this is working for me with neovim. While terminal mode isn't enough to make me stop using tmux, it is quite good and I like having it since it simplifies my documentation workflow for yanking terminal output to paste in a markdown buffer.

These days I primarily develop in Go. I'm super thrilled and grateful for fatih/vim-go,

@Warkanlock
Warkanlock / SpaceVim.md
Created February 10, 2022 11:48 — forked from bespokoid/SpaceVim.md
SpaceVim cheatsheet #tools
@nandorojo
nandorojo / private-npm-in-gh-actions.md
Created August 3, 2021 23:52
Use private NPM packages in your GitHub actions

1 NPM_TOKEN

Add an NPM_TOKEN secret on GitHub. Get your secret key from the NPM dashboard.

2 Add a step to your action

- name: Authenticate with private NPM package
  run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
@sundowndev
sundowndev / GoogleDorking.md
Last active June 1, 2024 08:41
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@johnmcfarlane
johnmcfarlane / begin(C++).md
Last active May 20, 2024 08:44
Resources for C++ beginners
@unoexperto
unoexperto / patch_apk_for_sniffing.md
Last active May 13, 2024 04:15
How to patch Android app to sniff its HTTPS traffic with self-signed certificate

How to patch Android app to sniff its HTTPS traffic with self-signed certificate

  • Download apktool from https://ibotpeaches.github.io/Apktool/
  • Unpack apk file: java -jar /home/expert/work/tools/apktool.jar d net.flixster.android-9.1.3@APK4Fun.com.apk
  • Modify AndroidManifest.xml by adding android:networkSecurityConfig="@xml/network_security_config" attribute to application element.
  • Create file /res/xml/network_security_config.xml with following content:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config>
@tkaczenko
tkaczenko / main.cpp
Last active September 27, 2021 06:49
Чтение .wav файла (С++ / СPP) / Reading .wav file (C++ / CPP)
#include <iostream>
#include <cstdio>
#include <cmath>
#include "string.h"
#include "mem.h"
//Wav Header
struct wav_header_t
{
char chunkID[4]; //"RIFF" = 0x46464952
@willemo
willemo / passwordless-ssh.md
Last active November 22, 2022 12:46
Passwordless SSH/SFTP access to a server

Passwordless SSH/SFTP for dummies

To get SSH or SFTP access to a server without using a password you need to have a SSH key pair for each computer you want to be able to access the server from. In this document I’ll describe the steps you need to take to generate a key pair if you don’t have one already. If you do, you can use your public key(s) to get access to the server.

I'll also explain how to connect to your server using Cyberduck. Click here to skip to that part.

Disclaimer and stuff

This guide is written with newbies in mind, so I'm very thorough in describing the steps that you must take. This guide will not cover setting up the server side of this system. It assumes that there's a server running with SSH enabled.

@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real