Skip to content

Instantly share code, notes, and snippets.

@sirkha
sirkha / shell.nix
Last active April 28, 2024 02:53
gem5 shell env
with import <nixpkgs>{};
stdenv.mkDerivation rec {
name = "gem5-git";
env = buildEnv { name = name; paths = buildInputs; };
zlib-dev = lib.getDev zlib;
zlib-lib = lib.getLib zlib;
buildInputs = [
mercurial
git
gcc
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 28, 2024 02:51
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
@rohitprofc
rohitprofc / react-github-pages-publish.md
Created April 5, 2024 18:16
Commands and Setting for publishing a react application into github-pages

Publish React Applications to Github Pages

1. Create a React Application:

  • npx create-react-app <app_name>

  • cd <app_name>

  • npm start

2. Install gh-pages using npm:

@rohitprofc
rohitprofc / django.md
Last active April 28, 2024 02:47
Developing Django Applications

Django - A Web Development Framework in Python

Installing Django

  • pip install Django

This install Django globally on the system

Creating Django Project

@CocoaCaa
CocoaCaa / vscode-sawaratsuki-logo.css
Created April 27, 2024 15:50
Visual Studio Code with @sawaratsuki1004's custom logo
.editor-group-watermark {
max-width: 400px !important;
}
.editor-group-watermark > .letterpress {
aspect-ratio: 1920/1080 !important;
background-image:url('https://github.com/SAWARATSUKI/ServiceLogos/blob/c2cf29211b93efe48e5c34451bac5c56f979ab94/VisualStudioCode/VisualStudioCodeRound.png?raw=true') !important;
background-position: center;
}
@GendelfLugansk
GendelfLugansk / README.md
Last active April 28, 2024 02:45
Wrapper for expo-sqlite with async/await, migrations and transactions

Expo-sqlite - the right way

Why

With expo-sqlite it's not possible to execute few depending statements inside single transaction - db.transaction does not work with async/promise and tx.executeSql just enqueues sql statement but does not execute it.

Documentation

Database class has two methods - execute (to execute single statement without transaction) and transaction(cb) to execute few statements inside a transaction

@seoagentur-hamburg
seoagentur-hamburg / .htaccess
Last active April 28, 2024 02:44
UPDATE 2024/03: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.9 - 03/2024
# ----------------------------------------------------------------------
# @Author: Andreas Hecht
# @Author URI: https://seoagentur-hamburg.com
# License: GNU General Public License v2 or later
# License URI: http://www.gnu.org/licenses/gpl-2.0.html
########################################################################
@manzt
manzt / my-ts-monorepo.md
Last active April 28, 2024 02:44
A minimal setup for TypeScript monorepo libraries

My Minimal TypeScript Monorepo Setup for ESM Libraries

After a deep dive looking up best practices for TypeScript monorepos recently, I couldn't find anything that suited my needs:

  1. Publish individual (typed) packages to NPM with minimal config.
  2. Supports fast unit testing that spans the entire project (e.g., via Vitest)
  3. Ability to have an interactive playground to experiment with the API in a real-time (e.g., via Vite)

Most solutions point to TypeScript project references,

@nicholyx
nicholyx / command.sh
Created April 28, 2024 02:42 — forked from peterdemartini/command.sh
Exclude node_modules in timemachine
find `pwd` -type d -maxdepth 3 -name 'node_modules' | xargs -n 1 tmutil addexclusion
@peterdemartini
peterdemartini / command.sh
Last active April 28, 2024 02:42
Exclude node_modules in timemachine
find `pwd` -type d -maxdepth 3 -name 'node_modules' | xargs -n 1 tmutil addexclusion