Skip to content

Instantly share code, notes, and snippets.

const puppeteer = require('puppeteer');
const moment = require('moment');
const process = require('process');
let browser;
(async () => {
browser = await puppeteer.launch();
const url = process.argv[2];
@tuxfight3r
tuxfight3r / vim-shortcuts.md
Last active April 16, 2024 12:27
VIM SHORTCUTS

VIM KEYBOARD SHORTCUTS

MOVEMENT

h        -   Move left
j        -   Move down
k        -   Move up
l        -   Move right
$        -   Move to end of line
0        -   Move to beginning of line (including whitespace)
@Artefact2
Artefact2 / README.md
Last active April 16, 2024 12:26
GGUF quantizations overview

Which GGUF is right for me? (Opinionated)

Good question! I am collecting human data on how quantization affects outputs. See here for more information: ggerganov/llama.cpp#5962

In the meantime, use the largest that fully fits in your GPU. If you can comfortably fit Q4_K_S, try using a model with more parameters.

llama.cpp feature matrix

See the wiki upstream: https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix

@JCSooHwanCho
JCSooHwanCho / FileIO.swift
Last active April 16, 2024 12:26
ps할 때 입력을 한꺼번에 받기 위한 유틸리티 클래스. fread의 swift 버전.
import Foundation
final class FileIO {
private let buffer:[UInt8]
private var index: Int = 0
init(fileHandle: FileHandle = FileHandle.standardInput) {
buffer = Array(try! fileHandle.readToEnd()!)+[UInt8(0)] // 인덱스 범위 넘어가는 것 방지
@dhh
dhh / linux-setup.sh
Last active April 16, 2024 12:25
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl docker.io \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@mikejolley
mikejolley / query.sql
Created April 26, 2016 09:37
WooCommerce - SQL to Delete users with no orders or posts
DELETE from wp_users where wp_users.ID not in (
SELECT meta_value FROM wp_postmeta WHERE meta_key = '_customer_user'
) AND wp_users.ID not in (
select distinct(post_author) from wp_posts
);
delete from wp_usermeta where wp_usermeta.user_id not in (select ID from wp_users);
using UnityEngine;
using System;
namespace Giacomelli.Framework
{
/// <summary>
/// TimeSpan Box Attribute - http://diegogiacomelli.com.br/unitytips-timespan-box-drawer
/// </summary>
[AttributeUsage(AttributeTargets.Field)]
public class TimeSpanBoxAttribute : PropertyAttribute
@dianjuar
dianjuar / Install update WordPress puglins directly.md
Last active April 16, 2024 12:21
Install update WordPress plugins without providing ftp access

Install WordPress plugins directly (without FTP)

Put this on your wp-config.php

/* That's all, stop editing! Happy blogging. */
define('FS_METHOD', 'direct');
@sindresorhus
sindresorhus / esm-package.md
Last active April 16, 2024 12:19
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@afsalrahim
afsalrahim / php_bbcode_parser.php
Last active April 16, 2024 12:18
A simple PHP BBCode Parser function
<?php
/**
* A simple PHP BBCode Parser function
*
* @author Afsal Rahim
* @link http://digitcodes.com/create-simple-php-bbcode-parser-function/
**/
//BBCode Parser function