Skip to content

Instantly share code, notes, and snippets.

@Klerith
Klerith / custom_product_field.dart
Created March 22, 2023 19:35
Pantalla de Producto y Custom Product Field
import 'package:flutter/material.dart';
class CustomProductField extends StatelessWidget {
final bool isTopField; // La idea es que tenga bordes redondeados arriba
final bool isBottomField; // La idea es que tenga bordes redondeados abajo
final String? label;
final String? hint;
final String? errorMessage;
@ryanorsinger
ryanorsinger / installing_anaconda_on_mac.md
Last active May 13, 2024 14:43
Installing Homebrew and Anaconda

Installing Homebrew and Anaconda on a Mac

Install Homebrew

Run the following command on your terminal to install Homebrew. Homebrew is a package manager for Macs and is used to install useful development tools and software.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install Anaconda through Homebrew

  1. Run brew install --cask anaconda to install Anaconda
@LeviSnoot
LeviSnoot / neofetch_ascii.md
Created October 19, 2023 14:48
A guide for using jp2a and jp2a2neofetch.py to create ASCII art for neofetch.

To convert an image to ASCII art, use jp2a. I found that using the Docker image was the most portable way to do this, especially as it doesn't require you to build the binary manually.

Example command:

docker run -t --rm -v "$(pwd)":/app talinx/jp2a file.ext --color-depth=4 --width=35

Command breakdown

  • docker run tells docker to run an application.
@rvrsh3ll
rvrsh3ll / windows-keys.md
Created February 18, 2024 22:44
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

@esgn
esgn / dl_from_wfs.py
Created December 29, 2022 13:20
Download GPKG from WFS example
import sys
try:
from osgeo import ogr, osr, gdal
except:
sys.exit('ERROR: cannot find GDAL/OGR modules')
# Set the driver (optional)
wfs_drv = ogr.GetDriverByName('WFS')

Swiggy

Machine Coding

  • Form input validations in vanilla js for a credit card payment page

Grofers

import requests
import os
from lxml import etree
# remove old clients from deployment server
deployment_server = os.getenv('SPLUNK_DS')
splunk_username = os.getenv('SPLUNK_DS_USER')
splunk_password = os.getenv('SPLUNK_DS_PASS')
ds_auth=(splunk_username, splunk_password)
@zorji
zorji / auto-ts-ignore.ts
Created July 16, 2021 03:41
A script to auto add // @ts-ignore to lines with TypeScript compilation error
/**
* A script to auto add // @ts-ignore to lines with TypeScript compilation error
* Example usage:
* $ npx tsc > compilation-errors.log
* $ npx ts-node auto-ts-ignore.ts compilation-errors.log
*/
import { readFile, writeFile } from 'fs/promises'
const errorLogFile = process.argv[2]
@tool
extends EditorScenePostImport
class MeshInstanceList:
var mesh: Mesh
var aabb: AABB
var transforms: Array
# Converts geometry node instances into MultiMeshInstances
func gn_instances_to_mm(parent: Node, scene: Node):
@jsok
jsok / sqlite3_test.c
Created June 15, 2012 14:34
sqlite3 C example
#include <stdio.h>
#include <sqlite3.h>
int main(void)
{
sqlite3 *db;
sqlite3_stmt *stmt;
sqlite3_open("expenses.db", &db);