Skip to content

Instantly share code, notes, and snippets.

View sebastianwd's full-sized avatar
:electron:
busy

Sebastian L. sebastianwd

:electron:
busy
View GitHub Profile
@sebastianwd
sebastianwd / gist:88b1e9f3a3eec2b2eed778c0b6cedd62
Last active February 20, 2024 04:48
remove docker scout junk
docker scout cache prune
https://github.com/docker/scout-cli/issues/42
wsl --shutdown
diskpart
select vdisk file="C:\Users\USER\AppData\Local\Docker\wsl\data\ext4.vhdx"
attach vdisk readonly
compact vdisk
detach vdisk
https://github.com/docker/for-win/issues/244
@sebastianwd
sebastianwd / snippet.css
Created December 27, 2020 07:54
cool radiant for background
background: radial-gradient(circle at 0% 0, #2d3c7a, transparent 20.71%),
radial-gradient(
circle at 0.7% 95%,
#5e2b4c,
${(props) => props.theme.colors.background.main} 20.71%
);
@sebastianwd
sebastianwd / setup-api.md
Created April 28, 2020 17:19
Welcome file

Everything I Know About UI Routing

Definitions

  1. Location - The location of the application. Usually just a URL, but the location can contain multiple pieces of information that can be used by an app
    1. pathname - The "file/directory" portion of the URL, like invoices/123
    2. search - The stuff after ? in a URL like /assignments?showGrades=1.
    3. query - A parsed version of search, usually an object but not a standard browser feature.
    4. hash - The # portion of the URL. This is not available to servers in request.url so its client only. By default it means which part of the page the user should be scrolled to, but developers use it for various things.
    5. state - Object associated with a location. Think of it like a hidden URL query. It's state you want to keep with a specific location, but you don't want it to be visible in the URL.
async function foo () {
const dep1 = await asyncProcess1();
const dep2 = await asyncProcess2();
console.log(dep1, dep2);
}
async function bar () {
Promise
.all([asyncProcess1(), asyncProcess2()])
type .\.nvmrc | %{$_ -replace "v",""} | %{nvm install $_}
type .\.nvmrc | %{$_ -replace "v",""} | %{nvm use $_}
import { useEffect, useState } from 'react'
import queryString from 'query-string'
const getSearchParams = () => {
const [searchParams, setSearch] = useState({})
useEffect(() => {
setSearch(document.location.search ? queryString.parse(document.location.search) : {})
}, [document.location.search])
@sebastianwd
sebastianwd / delete_foreign_key_tables.sql
Last active November 19, 2019 15:46
Delete foreign key tables
Declare @Table Varchar(50)
Declare @TABLES Table
(
TABLE_NAME VARCHAR(50)
)
INSERT INTO @TABLES
https://codesandbox.io/s/github/sebastianwd/ghostfm-react-native
Imports iTextSharp.text.pdf.parser
Imports iTextSharp.text.pdf.security
Imports Org.BouncyCastle.Pkcs
Imports System.Security.Cryptography.X509Certificates
Imports System.Security.Cryptography
Imports Org.BouncyCastle.Crypto
Public Sub Firmar_PDF(sourcePath As String, destPath As String, certificatePath As String, _
keyPassword As String, reason As String, location As String)
If (File.Exists(destPath)) Then