Skip to content

Instantly share code, notes, and snippets.

@mikegrima
mikegrima / edit_brave_dictionary.md
Last active December 12, 2024 19:40
Edit Brave Browser Dictionary

Fix Brave Browser Dictionary

If you have ever mistakenly added a word to the Brave browser dictionary, you need to manually edit the Custom Dictionary.txt file.

As of March 2020, the Brave UI lacks a feature to do this.

Where is the file?

This will depend on your OS. Google for where this is on your OS.

The file on macOS is at: ~/Library/Application\ Support/BraveSoftware/Brave-Browser/Default/Custom\ Dictionary.txt.

@gelldur
gelldur / .clang-format
Last active December 12, 2024 19:40
My clang format file. In sample.cpp is sample output
# Checkout config tool: https://zed0.co.uk/clang-format-configurator/
# Or http://cf.monofraps.net/
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# https://github.com/01org/parameter-framework/blob/master/.clang-format
# Tested on: clang-format version 6.0.1
# Common settings
BasedOnStyle: WebKit
@lucalves
lucalves / xcrun_simctl_cheatsheet.md
Last active December 12, 2024 19:39
CheatSheet to manage iOS simulators through simctl.

Managing iOS Simulators

List all simulators created

$ xcrun simctl list --json

Delete old and unavailable simulators

$ xcrun simctl delete unavailable
@abir-taheer
abir-taheer / instagram-follower-following.js
Last active December 12, 2024 19:30
"This is our community, this is our family, these are our friends." https://www.youtube.com/watch?v=gk7iWgCk14U&t=425s
if (window.location.origin !== "https://www.instagram.com") {
window.alert(
"Hey! You need to be on the instagram site before you run the code. I'm taking you there now but you're going to have to run the code into the console again.",
);
window.location.href = "https://www.instagram.com";
console.clear();
}
const fetchOptions = {
credentials: "include",
@mykolaharmash
mykolaharmash / ColorSlider.swift
Last active December 12, 2024 19:27
Color Slider Component (SwiftUI)
// A Color Slider that is similar to one in
// iOS 18+ when configuring a tinted Home Screen
// Full video-walktrough on building this component: https://youtu.be/VFVyN5hNW24
import SwiftUI
fileprivate let SLIDER_HEIGHT = 34.0
fileprivate let KNOB_DIAMETER = SLIDER_HEIGHT + 4.0
struct ColorSlider: View {
@lats
lats / claim_all_the_things.js
Last active December 12, 2024 19:25
Tampermonkey script to claim all of the items within a Bundle on Itch.io
// ==UserScript==
// @name Activate all Itch.io Bundle downloads
// @version 1
// @include https://itch.io/bundle/download/*
// @include https://*.itch.io/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
// @grant none
// ==/UserScript==
$(document).ready(function() {
@hristogochev
hristogochev / VoyagerSystemBars.kt
Created September 15, 2024 19:36
Voyager system bars workaround
// You can invoke LocalSystemBarsWindowInsets.current to get the correct window insets.
// You may need to pass this as a parameter to Scaffold if you use it, luckily Scaffold accepts custom WindowInsets.
val LocalSystemBarsWindowInsets = compositionLocalOf { WindowInsets(0.dp, 0.dp, 0.dp, 0.dp) }
// Wrap your main App function call with this one to access the system bars everywhere
@Composable
fun WithVoyagerSystemBars(content: @Composable () -> Unit) {
val systemBarsWindowInsets = WindowInsets.systemBars
CompositionLocalProvider(LocalSystemBarsWindowInsets provides systemBarsWindowInsets) {
@tehplague
tehplague / .Renovate configuration example.md
Last active December 12, 2024 19:21
Renovate example configuration for TYPO3

Example Configuration for Renovate in TYPO3 Projects (as shown at #T3CRR24)

This Gist provides an example configuration for Renovate, designed to automate updates in TYPO3 projects.
Note: This configuration is a starting point and should be adjusted to fit your specific requirements. The update behavior, in particular, likely has room for improvement depending on your workflow.

Key Assumptions

  1. Git Hosting: The example assumes the use of either GitLab or GitHub for managing TYPO3 projects.
  2. Shared Configuration: A shared GitLab project (gitlab/renovate-config) is used to store general configuration files (.json). This setup allows reusing shared rules across all TYPO3 projects.
  3. Project-Specific Configuration: The renovate.json file must reside in the TYPO3 project repository you wish to update. This file references the shared configuration and defines project-specific overrides.
@VictorTaelin
VictorTaelin / dps_sup_nodes.md
Last active December 12, 2024 19:21
Accelerating Discrete Program Search with SUP Nodes

Fast Discrete Program Search 2

I am investigating how to use Bend (a parallel language) to accelerate Symbolic AI; in special, Discrete Program Search. Basically, think of it as an alternative to LLMs, GPTs, NNs, that is also capable of generating code, but by entirely different means. This kind of approach was never scaled with mass compute before - it wasn't possible! - but Bend changes this. So, my idea was to do it, and see where it goes.

Now, while I was implementing some candidate algorithms on Bend, I realized that, rather than mass parallelism, I could use an entirely different mechanism to speed things up: SUP Nodes. Basically, it is a feature that Bend inherited from its underlying model ("Interaction Combinators") that, in simple terms, allows us to combine multiple functions into a single superposed one, and apply them all to an argument "at the same time". In short, it allows us to call N functions at a fraction of the expected cost. Or, in simple terms: why parallelize when we can share?

A

@jgiraldo16
jgiraldo16 / gist:691a0ee0bcf1210649e93e1bb84e83b0
Created February 16, 2017 05:48
Departamentos y Municipios de Colombia
//DEPARTAMENTOS
INSERT INTO departamentos (id_departamento, descripcion)
VALUES
(1,'Amazonas'),
(2,'Antioquia'),
(3,'Arauca'),
(4,'Atlántico'),
(5,'Bolívar'),
(6,'Boyacá'),
(7,'Caldas'),