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
[CmdletBinding()] | |
param ( | |
[Parameter()] | |
[string] | |
$user = "mika76" | |
) | |
$URL = "https://api.github.com/users/$user/starred" | |
$PAGE = 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
import { computed, Comment, Fragment, Text } from 'vue' | |
/** | |
* Determines whether a slot is empty for Vue 3: https://github.com/vuejs/vue-next/issues/3056 | |
* @param {Function} slot - The slot $slot.name | |
* @returns {Boolean} | |
*/ | |
// Adapted from https://github.com/vuejs/vue-next/blob/ca17162e377e0a0bf3fae9d92d0fdcb32084a9fe/packages/runtime-core/src/helpers/renderSlot.ts#L77 |
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 { useSlots } from 'vue'; | |
export default function useHasSlot() { | |
const slots = useSlots(); | |
return function hasSlot(name) { | |
return slots[name] && !isEmptySlot(slots[name]()); | |
}; | |
} | |
function isEmptySlot(items) { |
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"?> | |
<Project InitialTargets="" DefaultTargets="All" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> | |
<PropertyGroup> | |
<AssemblyFile>$(MSBuildThisFileDirectory)\..\packages\MSBuild.Extension.Pack\tools\net40\MSBuild.ExtensionPack.TaskFactory.PowerShell.dll</AssemblyFile> | |
</PropertyGroup> | |
<UsingTask TaskFactory="PowershellTaskFactory" TaskName="CreateDatabaseTask" AssemblyFile="$(AssemblyFile)"> | |
<ParameterGroup> | |
<ScriptsDirectory Required="true" ParameterType="System.String" /> | |
<Server Required="true" ParameterType="System.String" /> |
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 a JavaScript proxy for a super low code REST client */ | |
// via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg | |
// also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3 | |
// also see https://github.com/fastify/manifetch | |
// also see https://github.com/flash-oss/allserver | |
// and https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb | |
const createApi = (url) => { | |
return new Proxy({}, { | |
get(target, key) { |
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
void function(global){ | |
if ('DataView' in global && 'ArrayBuffer' in global) { | |
return; | |
} | |
var hide = (function(){ | |
// check if we're in ES5 | |
if (typeof Object.getOwnPropertyNames === 'function' && !('prototype' in Object.getOwnPropertyNames)) { | |
var hidden = { enumerable: false }; |
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
// Read FOMS (Russian Health Card) http://www.openscdp.org/scsh3/index.html | |
// with emulator | |
// Romam Kharin <romiq.kh@gmail.com>, 2014 | |
// based on explore.js | |
function SimFOMS () { | |
this.fsel = 0; // 0 - none, num - num | |
this.data0201 = new ByteString("", HEX); |
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 reduce = require("./reduce"); | |
/** | |
* Performs right-to-left function composition. The rightmost function may have | |
* any arity; the remaining functions must be unary. | |
* compose(f, g)(x) >> f(g(x)) | |
* | |
* @example | |
* const doubleNegative = compose(x => x * -1, x => x * 2); | |
* doubleNegative(5); // -10 |
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
<template> | |
<div | |
ref="muuriel" | |
class="muuri" | |
> | |
<div | |
class="muuri-item" | |
v-for="field in value" | |
:muurikey="field[muurikey]" |
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
# Turn on Notifications | |
do shell script "defaults -currentHost write com.apple.notificationcenterui doNotDisturb -bool FALSE; defaults -currentHost delete com.apple.notificationcenterui doNotDisturbDate; osascript -e 'quit application \"NotificationCenter\" ' && killall usernoted" -- this set 'Do not disturb' to false in the pref | |
# Show Desktop | |
do shell script "defaults write com.apple.finder CreateDesktop -bool true; killall Finder" | |
# Show all windows | |
tell application "System Events" | |
set visible of (every process) to true | |
end tell |
NewerOlder