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
-- Automator Quick Action | |
-- ----------------------------------------------- | |
-- Workflow receives no input | |
-- Set keyboard shortcut for Services/General/... | |
on run {input, parameters} | |
tell application "iTerm" | |
if it is running then | |
if (count of windows) is 0 then | |
create window with default profile | |
end if |
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
if vim.g.vscode then | |
-- VSCode extension | |
else | |
-- ordinary Neovim | |
end | |
-- Use system clipboard | |
vim.opt.clipboard = "unnamedplus" | |
-- Enable case-insensitive search |
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
tell application "System Preferences" | |
set current pane to pane "com.apple.preference.keyboard" | |
end tell | |
tell application "System Events" | |
if UI elements enabled then | |
tell application process "System Preferences" | |
repeat until exists tab group 1 of window "Keyboard" | |
delay 0.5 | |
end repeat |
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
<html> | |
<style> | |
body{background:#111;margin:0;padding:0;font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif;font-weight:300}.gif{position:absolute;left:0;top:0;height:100%;width:100%;background-size:cover;background-repeat:no-repeat;background-position:center;z-index:-1}.full{position:absolute;left:0;top:0;height:100%;width:100%}.container{display:flex;flex-direction:column;justify-content:center}.refresh{color:#fff;display:flex;line-height:144px;justify-content:center;font-size:60px}.refresh a{background-image:url(https://images-na.ssl-images-amazon.com/images/I/41JYhXXa+rL._SX328_BO1,204,203,200_.jpg);display:inline-block;width:100px;height:144px;background-size:cover;margin-left:30px}div{text-align:center}.text{font-size:30px;width:700px;padding:10px;background:none;border:#fff 1px solid;border-radius:1000px;outline:none;text-align:center;margin-top:120px;color:#fff;font-weight:100}.text::placeholder{color:rgba(255,255,255,0.4)}.sent{color:#fff;margin-top:18px;font-size:20px;opacity:0}@keyframes hide{fr |
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 datetime import datetime, timedelta | |
import time | |
import requests | |
import sys | |
import os | |
second = 1000 | |
minute = second * 60 | |
hour = minute * 60 | |
day = hour * 24 |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using NuGet; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ |
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
param( | |
[string] $logfile | |
) | |
$nonProtocolRegex = "^(?!.*PROTOCOL).*$" | |
$protocolRegex = "^.*(send|receive):(.*)" | |
function Format-Json([Parameter(Mandatory, ValueFromPipeline)][String] $json) { | |
$indent = 0; | |
($json -Split '\r\n' | |
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
# Usage | |
# Python repro.py <VSTEST folder> <ProjectPattern> <TestFilter> | |
# | |
# Uncomment the two lines for test output | |
# Log paths are hardcoded at D:\logs | |
# | |
# Logs will be cleared after every successful run | |
# (What's the point of having the logs when it didn't repro?) | |
import subprocess |
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
# Usage: ./codecount.sh css js html | |
lines=0 | |
for var in "$@" | |
do | |
count=0 | |
count=$( find ./ -regex ".*\.$var" | ( while read line; do | |
count=`wc -l $line` |
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
# Copy your .NET standard project files to an empty .NET core project and build it | |
# Save the error log to a file (eg. builderrors.log) | |
# | |
# Usage: | |
# python portable_packages.py builderrors.log packages.config | |
# | |
# NOTE: NOT ALL ASSEMBLIES IN .NET STANDARD ARE SUPPORTED BY .NET CORE | |
import re | |
import sys |