This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from base64 import b64encode as _b64encode, b64decode as _b64decode | |
| from typing import Type | |
| from django.db.models import Model | |
| from django.shortcuts import get_object_or_404 | |
| _encoding = "utf-8" | |
| def decode_base64(value: str) -> str: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useCallback, useEffect, useState } from 'react'; | |
| const Imanok = ({ callback }) => { | |
| const expected = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65]; | |
| const [keys, setKeys] = useState([]); | |
| const onKeyDown = useCallback( | |
| event => { | |
| const newKeys = [...keys]; | |
| newKeys.push(event.keyCode); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Url to test on: https://the-internet.herokuapp.com/tinymce | |
| function selectorTest() { | |
| const iframeDocument = document.querySelector('iframe').contentDocument | |
| const textNode = iframeDocument.querySelector('#tinymce p') | |
| const text = textNode.firstChild | |
| let selection = iframeDocument.getSelection() | |
| // Remove all existing ranges first | |
| selection.removeAllRanges() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| declare -a months=( | |
| "01_Januari" | |
| "02_Februari" | |
| "03_Maart" | |
| "04_April" | |
| "05_Mei" | |
| "06_Juni" | |
| "07_Juli" | |
| "08_Augustus" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git --no-pager diff --name-only develop | tr '\n' ',' | sed 's/\(.*\),/\1 /' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Find the partition called EFI | |
| diskutil list | grep 'EFI' | awk '{print $(NF)}' | sed 's/s[0-9]/s1/' | |
| sudo mkdir /Volumes/EFI | |
| sudo mount -t msdos /dev/disk0s1 /Volumes/EFI # Replace disk0s1 with actual EFI partition | |
| # Delete boot entries | |
| cd /Volumes/EFI/EFI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| server_name sub.marcelblijleven.com; | |
| location / { | |
| proxy_pass http://localhost:3000/; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
| update_config=1 | |
| country=NL | |
| network={ | |
| ssid="SSID" | |
| psk="PASSWORD" | |
| key_mgmt=WPA-PSK | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class User { | |
| email:string | |
| password:string | |
| hasLoyaltyCard: boolean | |
| constructor(email:string, password:string, hasLoyaltyCard?:boolean) { | |
| this.email = email | |
| this.password = password | |
| this.hasLoyaltyCard = !!hasLoyaltyCard | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class User { | |
| email:string | |
| password:string | |
| hasLoyaltyCard: boolean | |
| constructor(email:string, password:string, hasLoyaltyCard?:boolean) { | |
| this.email = email | |
| this.password = password | |
| this.hasLoyaltyCard = !!hasLoyaltyCard | |
| } |
NewerOlder