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
.theme-one-dark-ui { | |
.syntax--variable { | |
color: inherit; | |
} | |
.syntax--this { | |
color: #e06c75; | |
} | |
} |
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
import { deleteAt, updateObjectAt, swap } from '../../lib/farr' | |
export function defaultDataReducer(name, initialData = null) { | |
const initialState = { | |
[name]: initialData, | |
isFetching: true, | |
isFetched: false, | |
isRequested: false | |
} |
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
async function foo (bar) { | |
return bar + ' baz' | |
} | |
foo('test').then(console.log) |
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
import sqlalchemy as sa | |
from sqlalchemy.ext.declarative import as_declarative, declared_attr | |
from sqlalchemy.orm import relationship, sessionmaker | |
engine = sa.create_engine('sqlite://') | |
Session = sessionmaker(bind=engine) | |
@as_declarative() |
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
[ | |
{ | |
"key": "ctrl+1", | |
"command": "workbench.action.focusFirstEditorGroup" | |
}, | |
{ | |
"key": "ctrl+2", | |
"command": "workbench.action.focusSecondEditorGroup" | |
}, | |
{ |
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
context.evaluateScript("var console = { log: function(...args) { _consoleLog(args.join(' ')) } }") | |
let consoleLog: @convention(block) (String) -> Void = { message in | |
print("console.log: " + message) | |
} | |
context.setObject(unsafeBitCast(consoleLog, to: AnyObject.self), forKeyedSubscript: "_consoleLog" as (NSCopying & NSObjectProtocol)!) |
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
function compress(signal, threshold, ratio, makeup) { | |
return signal.map(x => { | |
let amp = Math.abs(x) | |
let sign = Math.sign(x) | |
if (amp > threshold) { | |
amp = (amp - threshold) * ratio + threshold | |
} | |
return sign * (amp * makeup) | |
}) | |
} |
OlderNewer