Skip to content

Instantly share code, notes, and snippets.

View archangel-irk's full-sized avatar
:octocat:

Konstantin Melnikov archangel-irk

:octocat:
View GitHub Profile
@archangel-irk
archangel-irk / export-notes.applescript
Created August 7, 2020 21:30 — forked from kyoh86/export-notes.applescript
Export notes from Note.app to PDF files.
-- 対象のフォルダの一番上を選択している状態から始める
set targetFolder to "aaa"
tell application "Notes"
activate
repeat with theFolder in every folder
if name of theFolder = targetFolder then
repeat with theNote in every note of theFolder
tell application "System Events"
key code 126
@archangel-irk
archangel-irk / gist:d59801d1f25f23913c28efd5070005db
Created September 3, 2019 06:21 — forked from stereokai/gist:36dc0095b9d24ce93b045e2ddc60d7a0
CSS rounded corners with gradient border
.rounded-corners-gradient-borders {
width: 300px;
height: 80px;
border: double 4px transparent;
border-radius: 80px;
background-image: linear-gradient(white, white), radial-gradient(circle at top left, #f00,#3020ff);
background-origin: border-box;
background-clip: content-box, border-box;
}
import hoistStatics from 'hoist-non-react-statics';
import React from 'react';
/**
* Allows two animation frames to complete to allow other components to update
* and re-render before mounting and rendering an expensive `WrappedComponent`.
*/
export default function deferComponentRender(WrappedComponent) {
class DeferredRenderWrapper extends React.Component {
constructor(props, context) {
// ES6 9.2.3.2 Function.prototype.bind(thisArg , ...args)
function FunctionBind(this_arg) { // Length is 1.
if (!IS_CALLABLE(this)) throw MakeTypeError(kFunctionBind);
var boundFunction = function () {
// Poison .arguments and .caller, but is otherwise not detectable.
"use strict";
// This function must not use any object literals (Object, Array, RegExp),
// since the literals-array is being used to store the bound data.
if (!IS_UNDEFINED(new.target)) {
return %NewObjectFromBound(boundFunction);