Skip to content

Instantly share code, notes, and snippets.

const numFeatures = 100;
const numPolygons = 5;
const numRings = 10;
const numPoints = 10000;
console.time('populate storage');
const features = [];
for (let i = 0; i < numFeatures; i++) {
@nikolat
nikolat / UkagakaAdventCalendar2021-12-04.md
Last active April 16, 2024 08:16
伺か Advent Calendar 2021 12月4日の記事

GitHubでゴーストを公開する際にはBOTにネットワーク更新用ファイルを作ってもらおう

伺か Advent Calendar 2021 4日の記事です。
昨日のななっちさんの記事「ななろだについてだべる」に続きましてDonがお送りします。

結論

今日はこれだけ覚えて帰ってください。
GitHubにはネットワーク更新用ファイル(updates.txt)を作ってくれるBOTがいる。
(正確には「updates.txtを自動作成するGitHub Actionsが存在する」)

@nikolat
nikolat / UkagakaAdventCalendar2021-12-11.md
Created December 11, 2021 10:24
伺か Advent Calendar 2021 12月11日の記事

GitHubでゴーストを公開する際にはファイルの文字コードをUTF-8に統一しよう

伺か Advent Calendar 2021 11日の記事です。
前回(4日)の記事に続いてGitHub関連の記事をDonがお送りします。

結論

GitHubを使うときはテキストファイルの文字コードをUTF-8に統一しよう!

どうして文字コードをUTF-8に統一しないといけないの?

@nikolat
nikolat / github-ukagaka-dev.md
Last active April 16, 2024 08:15
ネットワーク更新とNAR作成まわり

ネットワーク更新とNAR作成まわりについて

YAYAとGitHubを使うことを想定したターゲット狙い撃ちの記事

ネットワーク更新

homeurlの設定

On_homeurl

@sundowndev
sundowndev / GoogleDorking.md
Last active April 16, 2024 08:14
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"
@mjbalcueva
mjbalcueva / calendar.tsx
Last active April 16, 2024 08:12
shadcn ui calendar custom year and month dropdown
"use client"
import * as React from "react"
import { buttonVariants } from "@/components/ui/button"
import { ScrollArea } from "@/components/ui/scroll-area"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { cn } from "@/lib/utils"
import { ChevronLeft, ChevronRight } from "lucide-react"
import { DayPicker, DropdownProps } from "react-day-picker"
@mss
mss / zoom-pulse-prop-media-role-phone-wrapper-installer.sh
Last active April 16, 2024 08:11
Make the Ubuntu Zoom client automatically switch Bluetooth headset profiles to HSP/HFP
#!/bin/bash
# This is a hack to make Bluetooth headests like the jabra Evolve 65 actually
# work as a headset with the Linux (Ubuntu/Debian) Zoom client without having
# to switch manually from A2DP to the HSP/HFP profile.
#
# This is done by injecting an environment variable which makes PulseAudio
# recognize the application as a telephony/voice application as described
# here:
# * https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/#profiles
# * https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/ApplicationProperties/#pa_prop_media_role
@Cortexelus
Cortexelus / udio.py
Last active April 16, 2024 08:11
Automate Udio (2024-04-13)
# AUTOMATE UDIO
# by DADABOTS dadabots.com
# was working on 2024-04-13
# tldr; get your login cookie, use it to automate udio from python
import requests
import json
from time import sleep
import re
@Era-Dorta
Era-Dorta / create-efi-keys.sh
Last active April 16, 2024 08:10
Sign kernel modules on Ubuntu, useful for Nvidia drivers in UEFI system
# VERY IMPORTANT! After each kernel update or dkms rebuild the modules must be signed again with the script
# ~/.ssl/sign-all-modules.sh
# Place all files in ~/.ssl folder
mkdir ~/.ssl
cd ~/.ssl
# Generate custom keys with openssl
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -subj "/CN=Owner/"
@chatton
chatton / SendStringOverSocket.java
Last active April 16, 2024 08:10
Example of sending a String through a Socket in Java.
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
public class Client {
public static void main(String[] args) throws IOException {
// need host and port, we want to connect to the ServerSocket at port 7777
Socket socket = new Socket("localhost", 7777);
System.out.println("Connected!");