View React tick tack toe.jsx
This file contains 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 React from 'react'; | |
import './App.css'; | |
import { useState } from 'react'; | |
import cloneDeep from "lodash-es/cloneDeep"; | |
import shuffle from "lodash-es/shuffle"; | |
class WinLocation { | |
constructor() { | |
this.posArray = []; |
View vlctv.sh
This file contains 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 | |
# On my machine VLC fails to connect to chromecast. If I specify the IP it fails to connect because of certificate errors. I can | |
# manually download the certificate but it is only valid for 2 days. This little script gets it all working. | |
# Set your ip address below and call this script with the filename. | |
CHROMECAST_IP=192.168.1.153 | |
gnutls-cli --save-cert=chromecast.pem --insecure $CHROMECAST_IP:8009 | |
mkdir -p ~/.local/share/vlc/certs | |
mv chromecast.pem ~/.local/share/vlc/certs |
View async.py
This file contains 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 asyncio | |
import time | |
loop = asyncio.new_event_loop() | |
def print_time(): | |
global start | |
end = time.time() | |
print(end - start) |
View sample.py
This file contains 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 time | |
from concurrent.futures import ThreadPoolExecutor | |
import random | |
start = 0 | |
def print_time(): | |
global start | |
end = time.time() | |
print(end - start) |