Skip to content

Instantly share code, notes, and snippets.

@bakerac4
bakerac4 / controllers.application.js
Last active May 6, 2024 10:41
Async/Await Loading Issue
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@malj
malj / html-import.js
Created December 7, 2022 13:25
<html-import src="path/to/file.html"></html-import>
export default class HTMLImport extends HTMLElement {
#abortController = new AbortController()
async connectedCallback() {
let src = this.getAttribute("src")
if (src === null) {
console.warn("<html-import> element requires attribute \"src\"")
this.remove()
return
}
@AndreyBelym
AndreyBelym / foo.js
Last active May 6, 2024 10:41
TestCafe import/export
export default function () {
return window.location.toString();
}
@tubackkhoa
tubackkhoa / imports.js
Created January 25, 2024 09:13
import
const glob = require('glob');
const util = require('util');
const globPromise = util.promisify(glob);
const importArr = [];
const exportArr = ['export default {'];
const paths = [
'node_modules/@tharsis/proto/dist/proto/evmos/**/*.js',
'node_modules/@tharsis/proto/dist/proto/ethermint/**/*.js',
import llama_cpp
import re
import json
# Model configuration
# tested with mistral, llama2, llama3, and phi3
model_path = "/path/to/model"
base_llm = llama_cpp.Llama(model_path, seed=42, n_gpu_layers=-1, n_ctx=4096, verbose=False, temperature=0.0)
@playerx
playerx / .env
Last active May 6, 2024 10:39
Script for importing batch data import from csv to MongoDB
MONGO_DB=
@Migaro106
Migaro106 / dexie-export-import.markdown
Created April 11, 2019 09:38
dexie-export-import
@justingorham
justingorham / README.md
Last active May 6, 2024 10:38
Generate plantUml from typescript default export

PlantUML diagrams

Use <br> instead of \n to ensure proper line breaking.

Make the default export of any .ts file in diagrams a UML string

@dukemai
dukemai / Selector.js
Created September 5, 2018 11:11
Redux Selector
export const mapStateToProps = {
Component: state => ({
}),
};
export const mapDispatchToProps = {
Component: dispatch => ({
}),