Skip to content

Instantly share code, notes, and snippets.

@fnky
fnky / ANSI.md
Last active June 1, 2024 23:15
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@p30virus
p30virus / Build_Custom.bat
Created March 20, 2023 16:40
Unreal Engine Source Build Reduced Size
./Setup.bat
-exclude=WinRT
-exclude=Mac
-exclude=MacOS
-exclude=MacOSX
-exclude=osx
-exclude=osx64
-exclude=osx32
-exclude=Android
-exclude=IOS
@Klerith
Klerith / configurar-node-ts.md
Last active June 1, 2024 23:10
Node con TypeScript - TS-Node-dev simplificado

Node con TypeScript - TS-Node-dev (preferido)

  1. Instalar TypeScript y demás dependencias
npm i -D typescript @types/node ts-node-dev rimraf
  1. Inicializar el archivo de configuración de TypeScript ( Se puede configurar al gusto)
npx tsc --init --outDir dist/ --rootDir src
@weihungchin
weihungchin / myDir.directive.ts
Last active June 1, 2024 23:09
Structural Directive Multiple Inputs - Angular
import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core';
@Directive({ selector: '[myDir]'})
export class MyDirective {
@Input() set myDir(text: string) {
console.log("text:", text);
}
@Input() set myDirGreet(greet: string) {
@freckletonj
freckletonj / run_block.el
Created June 1, 2024 22:57
Run blocks of code in python interpreter using keybinding
(defun search-unique (marker)
"Search for the first and only occurrence of MARKER.
Return the position if found, or nil if not found or multiple occurrences exist."
(let ((first-pos nil)
(count 0))
(save-excursion
(goto-char (point-min))
(while (search-forward marker nil t)
(setq count (1+ count))
(when (= count 1)
@AndrewMast
AndrewMast / disable_vanguard.vbs
Last active June 1, 2024 23:08
Commands to disable Riot Vanguard when you aren't playing Valorant
' Disables Vanguard from starting when you boot your computer
Call CreateObject("Shell.Application").ShellExecute("cmd.exe", "/c ""sc config vgc start= disabled & sc config vgk start= disabled""", "", "runas")
@cpq
cpq / Hash.md
Created January 24, 2014 14:35
What is a hash and how does it work

What is a hash and how does it work

Let us start from a practical example. Imagine we are writing a traffic monitoring application. The purpose of application would be to calculate a number of bytes sent by each IP address. To do that, let create a structure that does that accounting:

struct ipstat {

uint32_t ip; /* Source IP address */

@just-jeb
just-jeb / embed-gist-dark-theme.css
Last active June 1, 2024 23:02
Dark theme gist embed for blog
<style>
/* https://github.com/lonekorean/gist-syntax-themes */
@import url('https://cdn.rawgit.com/lonekorean/gist-syntax-themes/d49b91b3/stylesheets/idle-fingers.css');
@import url('https://fonts.googleapis.com/css?family=Open+Sans');
body {
font: 16px 'Open Sans', sans-serif;
}
body .gist .gist-file {
border-color: #555 #555 #444
@gabe565
gabe565 / change-arc-icon.md
Last active June 1, 2024 23:02
Change Arc Browser Icon

Change Arc Browser Icon

arc

A collection of commands that change the Arc Browser icon on macOS.

Commands

Theme Command
Candy Arc defaults write company.thebrowser.Browser currentAppIconName candy
@Klerith
Klerith / Navbar.js
Last active June 1, 2024 23:01
Un NavBar de Bootstrap rápido para el curso de React de cero a experto
import { Link, NavLink } from 'react-router-dom';
export const Navbar = () => {
return (
<nav className="navbar navbar-expand-sm navbar-dark bg-dark">
<Link
className="navbar-brand"
to="/"