Skip to content

Instantly share code, notes, and snippets.

@lezuber
lezuber / LogseqImagesToAssetFolder.py
Last active May 31, 2023 06:50
Download Logseq repository images to local asset folder
#!/usr/bin/env python
# coding: utf-8
# What is this?
# This script is for logseq webapp users that want to switch to the local version.
# It will download all images that are linked inside your graph and store them in the local "/assets/" folder.
# Remarks
# 1. Only supports Markdown files (for now)
@Teraflopst
Teraflopst / 麦克米伦7000高频词(释义).txt
Last active January 19, 2025 13:57
麦克米伦7000高频词,列表 & 释义
a n. 字母A;第一流的;学业成绩达最高标准的评价符号 abbr. [物]安(ampere)
abandon n. 放任;狂热 vt. 遗弃;放弃
abbreviation n. 缩写;缩写词
ability n. 能力,能耐;才能
able adj. 能;[经管] 有能力的;能干的 n. (Able)人名;(伊朗)阿布勒;(英)埃布尔
abnormal adj. 反常的,不规则的;变态的
aboard prep. 在…上 adv. 在飞机上;[船] 在船上;在火车上
abolish vt. 废除,废止;取消,革除
abortion n. 流产,堕胎,小产;流产的胎儿;(计划等)失败,夭折
about prep. 关于;大约 n. 大致;粗枝大叶;不拘小节的人 adj. 在附近的;四处走动的;在起作用的 adv. 大约;周围;到处 n. (About)人名;(法)阿布
@aweary
aweary / App.js
Last active August 29, 2021 14:06
import React from "react";
import useMutableReducer from "./useMutableReducer";
const reducer = (draft, action, state) => {
switch (action) {
case "increment":
draft.count++;
break;
case "decrement":
draft.count--;
@jhwheeler
jhwheeler / language-learning-techniques.md
Last active May 7, 2025 12:50
Efficient and effective language learning techniques: Shadowing, Scriptorium, and Side-by-Side Reading.

Language Learning Techniques

Some of the techniques I've used to learn languages quickly and thoroughly:

  1. Shadowing

  2. Scriptorium

  3. Side-by-Side Reading

@sebmarkbage
sebmarkbage / Enhance.js
Last active February 10, 2025 06:23
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@bobbydavid
bobbydavid / app.js
Created May 8, 2012 23:46
socket.io in Express 3
var express = require('express')
, http = require('http')
, connect = require('connect')
, io = require('socket.io');
var app = express();
/* NOTE: We'll need to refer to the sessionStore container later. To
* accomplish this, we'll create our own and pass it to Express
* rather than letting it create its own. */
var sessionStore = new connect.session.MemoryStore();