Skip to content

Instantly share code, notes, and snippets.

@CatalanCabbage
CatalanCabbage / dvsj-in-about-you.tsx
Created February 15, 2024 06:46
WIP, about you component that gets data from your browser and eerily shows your data
import React, {useEffect, useRef, useState} from 'react';
import './About.css';
let textOptions = {
cookieEnabled: {
true: '',
false: 'You\'ve turned cookies off? Wow. ',
}, platform: {
win: 'Chillin\' on your Windows'
}, deviceMemory : {
@abdullahkady
abdullahkady / guide.md
Created October 14, 2018 08:52
Glut installation guide for linux (ubuntu 16.04)

Summary:

  • Installation
  • Imports
  • Compiling

Install glut libraries using apt

$ sudo apt-get install freeglut3 freeglut3-dev
@tripathi-suraj
tripathi-suraj / NodeJs.md
Last active May 4, 2024 02:38
NodeJs Interview Questions

1.What is Nodejs?

Node.js is an extremely powerful framework developed on Chrome’s V8 JavaScript engine that compiles the JavaScript directly into the native machine code. Node.js is perfect for data-intensive applications as it uses an asynchronous, event-driven model. You can use I/O intensive web applications like video streaming sites.

How Nodejs Works

2.What is Node.js Process Model?

Node.js runs in a single process and the application code runs in a single thread and thereby needs less resources than other platforms. All the user requests to your web application will be handled by a single thread and all the I/O work or long running job is performed asynchronously for a particular request. So, this single thread doesn't have to wait for the request to complete and is free to handle the next request. When asynchronous I/O work completes then it processes the request further and sends the response.

3.How do

@TheDrHax
TheDrHax / autosave.lua
Last active May 4, 2024 02:38 — forked from Hakkin/autosave.lua
MPV script that periodically saves "watch later" data during playback
-- autosave.lua
--
-- Periodically saves "watch later" data during playback, rather than only saving on quit.
-- This lets you easily recover your position in the case of an ungraceful shutdown of mpv (crash, power failure, etc.).
--
-- You can configure the save period by creating a "lua-settings" directory inside your mpv configuration directory.
-- Inside the "lua-settings" directory, create a file named "autosave.conf".
-- The save period can be set like so:
--
-- save_period=60
@anhtran
anhtran / commands.sql
Last active May 4, 2024 02:37
Cách tạo cấu hình cho tiếng Việt trong PostgreSQL (stopwords, ispell)
CREATE TEXT SEARCH DICTIONARY public.vietnamese (
TEMPLATE = pg_catalog.simple,
STOPWORDS = vietnamese
);
CREATE TEXT SEARCH CONFIGURATION public.vietnamese (
COPY = pg_catalog.english
);
ALTER TEXT SEARCH CONFIGURATION public.vietnamese
@IanVaughan
IanVaughan / uninstall_gems.sh
Created June 9, 2012 20:37
Uninstall all rbenv gems
#!/usr/bin/env bash
uninstall() {
list=`gem list --no-versions`
for gem in $list; do
gem uninstall $gem -aIx
done
gem list
gem install bundler
}
@bradtraversy
bradtraversy / terminal-commands.md
Last active May 4, 2024 02:37
Common Terminal Commands

Common Terminal Commands

Key Commands & Navigation

Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:

  • Up Arrow: Will show your last command
  • Down Arrow: Will show your next command
  • Tab: Will auto-complete your command
  • Ctrl + L: Will clear the screen
@safa-dayo
safa-dayo / sd-webui-google-colab-setup.sh
Last active May 4, 2024 02:33
Stable Diffusion web UI(最新版)をGoogle Colabで起動するためのコマンド。こちらのコマンドを自身のGoogle Colabノートブックにコピーした後、利用したいモデルや拡張機能、LoRAなどにチェックを入れた上で実行ボタンを押すことで、設定した内容でStable Diffusion web UIが起動します。
#@title Stable Diffusion web UI(最新版)をGoogle Colabで起動するためのコマンド
#@markdown ## このColabノートブックについて
#@markdown [Stable Diffusion web UI](https://github.com/AUTOMATIC1111/stable-diffusion-webui) をGoogle Colabで起動するためのノートブックとなります。
#@markdown 利用したいモデルや拡張機能、LoRAなどにチェックを入れた上で実行ボタンを押すことで、設定した内容でStable Diffusion web UIが起動します。
#@markdown また各項目には公式ページへのリンクをつけています。利用の際は公式ページよりライセンスなどを確認した上でご利用ください。
### Stable Diffusion web UIインストール

JavaScript Interview Questions

Q1: Explain equality in JavaScript ☆

Answer: JavaScript has both strict and type–converting comparisons:

  • Strict comparison (e.g., ===) checks for value equality without allowing coercion
  • Abstract comparison (e.g. ==) checks for value equality with coercion allowed