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
extension View { | |
func border(width: CGFloat, edges: [Edge], color: Color) -> some View { | |
overlay(EdgeBorder(width: width, edges: edges).foregroundColor(color)) | |
} | |
} | |
struct EdgeBorder: Shape { | |
var width: CGFloat | |
var edges: [Edge] |
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
func timeFromNow(date: Date) -> String { | |
let dateTransformed = date.addingTimeInterval(TimeInterval(60)) | |
let diffComponents = Calendar.current.dateComponents([.day, .hour, .minute], from: Date.now, to: dateTransformed) | |
guard let day = diffComponents.day else { | |
print("error decoding time") | |
return "" | |
} | |
if day > 0 { |
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
/* | |
* Copyright (c) 2020 Razeware LLC | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
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
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from bs4 import BeautifulSoup | |
import sys | |
import os | |
import requests | |
import urllib3 | |
from urllib3.exceptions import InsecureRequestWarning | |
import time | |
from tqdm import trange |
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
cd path/to/your/app | |
php -S localhost:8000 |
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
using System; | |
using HoloToolkit.Unity; | |
using HoloToolkit.Unity.InputModule; | |
using UnityEngine; | |
public class ScanManager : MonoBehaviour, IInputClickHandler | |
{ | |
public TextMesh InstructionTextMesh; | |
public Transform FloorPrefab; | |
public Transform WallPrefab; |
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
for file in *.txt; do mv "$file" "${file%.txt}.py"; done |
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
mogrify -format png *.jpeg |
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
docker stop $(docker ps -a -q) | |
docker rm $(docker ps -a -q) |
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
nvidia-docker run --name digits -d -p 5000:5000 -v /opt/ped:/data/ped nvidia/digits |
NewerOlder