Skip to content

Instantly share code, notes, and snippets.

View Beyarz's full-sized avatar
💎
Searching for Ruby gems

Beyar Beyarz

💎
Searching for Ruby gems
  • Sweden
  • 17:49 (UTC +01:00)
View GitHub Profile
@KRTirtho
KRTirtho / vs-code.settings.json
Created October 17, 2020 16:22
Excluding file watchers & search indexing in unintended folders and files in Visula
//Add following lines of code to exclude the files & folders which aren't important for watchers to look for changes...
{
//exludes fies & folders in search indexing
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/env": true,
"**/venv": true
},
//exludes fies & folders for watcher service
@pesterhazy
pesterhazy / indexeddb-problems.md
Last active November 13, 2024 00:54
The pain and anguish of using IndexedDB: problems, bugs and oddities

This gist lists challenges you run into when building offline-first applications based on IndexedDB, including open-source libraries like Firebase, pouchdb and AWS amplify (more).

Note that some of the following issues affect only Safari. Out of the major browsers, Chrome's IndexedDB implementation is the best.

Backing file on disk (WAL file) keeps growing (Safari)

When this bug occurs, every time you use the indexeddb, the WAL file grows. Garbage collection doesn't seem to be working, so after a while, you end up with gigabytes of data.

Random exceptions when working with a large number of indexeddb databases (Safari)

I was drawn to programming, science, technology and science fiction
ever since I was a little kid. I can't say it's because I wanted to
make the world a better place. Not really. I was simply drawn to it
because I was drawn to it. Writing programs was fun. Figuring out how
nature works was fascinating. Science fiction felt like a grand
adventure.
Then I started a software company and poured every ounce of energy
into it. It failed. That hurt, but that part is ok. I made a lot of
mistakes and learned from them. This experience made me much, much
@youngchief-btw
youngchief-btw / HTTP --> HTTPS.js
Last active December 8, 2021 00:13
HTTP --> HTTPS enforcement in Javascript
// HTTP --> HTTPS
if (location.protocol === "http:") {
location.replace(window.location.href.replace("http:", "https:"));
}
@presidenten
presidenten / cloudSettings
Last active February 11, 2021 11:32
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-02-11T11:32:47.366Z","extensionVersion":"v3.4.3"}
#!/usr/bin/env python
import sys, os, time
import tweepy
keys = dict(
consumer_key='_YOUR_CONSUMER_KEY',
consumer_secret='_YOUR_SECRET_KEY',
access_token='_YOUR_ACCESS_TOKEN',
access_token_secret='_YOUR_ACCESS_TOKEN_SECRET'
)
@Programator2
Programator2 / windows_boot_recovery.md
Last active September 16, 2024 19:13
This gist shows how to recover Windows 10 boot problems after cloning a harddrive (error code 0xc000000e)

Prerequisites

This guide applies to UEFI systems with GPT drives. It was tested on Windows 10 April 2018 edition, but it should also work on Windows 8 and newer releases (maybe even 7).

The problem

Occurs after an original drive from which the system drive was cloned is connected to the system at boot.

Error code 0xc000000e with message The boot selection failed because a required device is inaccessible.

@Almenon
Almenon / gist:1ad4a4d42ef1f8eb007d1289a6fcac0e
Last active January 14, 2021 18:01
boot problem notes
========================================================
= BACKSTORY
========================================================
I got a new SSD for my windows 10 home desktop computer recently. I used macrium to clone the HDD -> SSD and changed bios to boot from SSD.
But when I tried cleaning the HDD I somehow corrupted something in the windows boot process (no idea how it happened, I never even touched my SSD).
When I start windows I get error code 0xc000000e (A required device isn't connected or can't be accessed), so I have to go into recovery mode.
Most people online fix this by using bootrec, or worst case scenario bootsect. Nothing works for me.
@JasonTrue
JasonTrue / searchkick_and_elasticsearch_guidance.md
Last active July 17, 2024 10:01
Searchkick and Elastic Search guidance

Resources:

https://github.com/ankane/searchkick

Indexing

By default, simply adding the call 'searchkick' to a model will do an unclever indexing of all fields (but not has_many or belongs_to attributes).

In practice, you'll need to customize what gets indexed. This is done by defining a method on your model called search_data

def search_data

How to upgrade to Purescript 0.12

Before we begin, the type search in Pursuit is a great way to search for the functions you need.

Reset your tooling by deleting the bower_components/, .psci_modules/, .pulp-cache/, .psc-package/ and output/ folders. Then run psc-package build --only-dependencies.

Import changes and effects

Using sed or your other favourite global replace tool to search and replace all occurences in the list