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
const appNameMeta = document.querySelector('meta[name="cg:app:name"]'); | |
const appVersionMeta = document.querySelector('meta[name="cg:app:version"]'); | |
const appName = appNameMeta ? appNameMeta.content : "Unknown"; | |
const appVersion = appVersionMeta ? appVersionMeta.content : "Unknown"; | |
const versionOutput = `${appName} @ ${appVersion}`; | |
const envConfig = (() => { | |
const noEnvResponse = "No Env Config"; | |
const nextData = window.__NEXT_DATA__; | |
if (!nextData) return noEnvResponse; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.0</real> |
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
// Name: Fix Wallpaper | |
import "@johnlindquist/kit"; | |
/** | |
* Ensure you have a ~/Library/Desktop/Wallpaper.jpg file ready to go. | |
* | |
* The script requires sudo access, and assumes you have TouchID connected | |
* to `sudo` by prepending: | |
* ``` |
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
const delay = ms => new Promise(resolve => setTimeout(resolve, ms)); | |
const delays = [ | |
[200, 'should show second'], | |
[100, 'should show first'], | |
[300, 'should show third'] | |
] | |
async function processWithFor(array) { | |
for (const [ms, msg] of array) { |
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 | |
echo "MacBook Random Shutdown Fix" | |
# Check version | |
macOSMajorVersion=$(sw_vers -productVersion | cut -d. -f1) | |
macOSMinorVersion=$(sw_vers -productVersion | cut -d. -f2) | |
# Script currently only supports High Sierra and later | |
if [ "$macOSMajorVersion" != 10 ] || [ "$macOSMinorVersion" -lt 14 ]; then |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) |
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
{"lastUpload":"2019-07-18T00:51:46.044Z","extensionVersion":"v3.4.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
var Pretender = (function () { | |
'use strict'; | |
// This is just a placeholder for the build step | |
var createObject = Object.create; | |
function createMap() { | |
var map = createObject(null); | |
map["__"] = undefined; | |
delete map["__"]; |
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
// Welcome! require() some modules from npm (like you were using browserify) | |
// and then hit Run Code to run your code on the right side. | |
// Modules get downloaded from browserify-cdn and bundled in your browser. | |
const padStart = require('lodash/padStart'); | |
const dateFns = require('date-fns') | |
const displayValue = "44/1/1"; | |
convertDateDisplayToDateArray = (dateDisplay) => { | |
return dateDisplay.split('/').reverse().map(item => padStart(item, 2, 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
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.Web.Mvc.Html; | |
namespace UI.Extensions | |
{ | |
public static class HtmlHelperExtensions | |
{ |
NewerOlder