Skip to content

Instantly share code, notes, and snippets.

@arvindpdmn
arvindpdmn / JS.Done.Right.2.md
Last active May 4, 2024 10:19
JavaScript Done Right! (DOM, Events, Best Practices)

JavaScript Done Right!
Devopedia, Oct 2018

0. Introduction

In this meetup, we'll talk about DOM access and manipulation. This can be done in plain JavaScript using the new APIs introduced in ES6. It can also be done using jQuery. We will look at both approaches. We leave it to developers to choose what suits them.

As a study reference, look at the following cheat sheets:

@mmercedes
mmercedes / valheim_debian_server_setup.md
Last active May 4, 2024 10:16
Guide for creating a dedicated valheim server on debian

recommened you do this from within tmux since the steamcmd utility creates its own repl

Install SteamCMD

taken from here

$ sudo useradd -m steam
$ sudo apt update && sudo apt-get install lib32gcc1 -y
$ sudo su - steam
$ mkdir ~/Steam && cd ~/Steam
$ curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
@klein-artur
klein-artur / Selectables.swift
Created July 8, 2023 00:13
SwiftUI Selectable List
struct Selectables<Data, ID: Hashable, Content>: View where Content: View {
let data: [Data]
@Binding var selectedIds: [ID]
let id: KeyPath<Data, ID>
let content: (Data, Binding<Bool>) -> Content
init(_ data: [Data], selectedIds: Binding<[ID]>, id: KeyPath<Data, ID>, @ViewBuilder content: @escaping (Data, Binding<Bool>) -> Content) {
self.data = data
self._selectedIds = selectedIds
self.id = id
backup
@rjescobar
rjescobar / extend-trial-jetbrains-windows.bat
Created August 31, 2021 02:53
JetBrains IDE trial reset windows
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 4, 2024 10:05
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@agerwick
agerwick / find-my-ip-address
Created October 29, 2012 00:43
command line tool for finding your public IP address
#!/bin/sh
dig myip.opendns.com @resolver1.opendns.com +short
@dody87
dody87 / command_only_show_my_ip_mac
Last active May 4, 2024 09:55
Simple command to show your IP and nothing else on MacOS
# Step 1: open terminal.
# Step 2: nano ~/.bash_profile
# Step 3: Add the following code below
alias my-ip='ifconfig | grep "inet " | grep -v 127.0.0.1 | cut -d\ -f2'
# Step 4: save file and restart terminal.
@tosh
tosh / system.md
Created April 29, 2024 17:25
system.md

I have a parquet file named ah.parquet.

It contains Apple Health data and has the following columns:

  • type: Nullable(String)
  • value: Nullable(String)
  • start: Nullable(DateTime64(6))
  • end: Nullable(DateTime64(6))
  • created: Nullable(DateTime64(6))