Skip to content

Instantly share code, notes, and snippets.

View ilyar's full-sized avatar
👷‍♂️
open-to-work

ilyar

👷‍♂️
open-to-work
View GitHub Profile
@adrienbrault
adrienbrault / llama2-mac-gpu.sh
Last active December 5, 2024 17:40
Run Llama-2-13B-chat locally on your M1/M2 Mac with GPU inference. Uses 10GB RAM. UPDATE: see https://twitter.com/simonw/status/1691495807319674880?s=20
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
make clean
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
@frol
frol / AccountChangesFlow.tsx
Created September 25, 2021 19:06
Live Transactions visualization on NEAR mainnet
// https://youtu.be/2WXaosLThBY
import React, { useState, useEffect } from "react";
import ReactEcharts from "echarts-for-react";
import echarts from "echarts";
import { Tabs, Tab } from "react-bootstrap";
import StatsApi, { AccountsByDate } from "../../libraries/explorer-wamp/stats";
import { Props } from "./TransactionsByDate";
@siraben
siraben / forth.v
Last active April 16, 2023 04:50
Small-step operational semantics of Forth in Coq
Set Warnings "-notation-overridden,-parsing".
From Coq Require Import Arith.Arith.
From Coq Require Import Arith.EqNat.
From Coq Require Import Init.Nat.
From Coq Require Import Lia.
From Coq Require Import Lists.List.
Import ListNotations.
From PLF Require Import Maps.
From PLF Require Import Smallstep.
Import Nat.
@ElGatoLoco
ElGatoLoco / minting-native-tokens-on-cardano.sh
Created March 26, 2021 12:29
Mint native tokens on Cardano testnet using the node and cli that come with Daedalus
# This guide assumes that you're running MacOS and already have a fully synced Daedalus testnet wallet
# For mainnet some minor tweaks are required
# The line below assumes the default location for the testnet wallet at the time of writing this guide
# If your node socket is located somewhere else, you should be able to finding by inspecting the running processes on your machine
export CARDANO_NODE_SOCKET_PATH=~/Library/Application\ Support/Daedalus\ Testnet/cardano-node.socket
# Make testnet id available as environment variable; not needed for the mainnet
# This one is active at the time of writing this guide
export TESTNET_ID=1097911063
@k06a
k06a / ShardedToken.sol
Last active May 17, 2023 13:15
ShardedToken
contract ShardedToken {
using SafeMath for uint256;
address owner = msg.sender;
uint256 private _totalSupply;
mapping(address => ShardedToken.Extension) private extensions;
function register() public {
extensions[msg.sender] = new Token.Extension();
}
@niw
niw / Vagrantfile
Last active November 28, 2024 20:27
A simple Vagrantfile to setup Ubuntu desktop environment with Google Chrome and Japanese input
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.provider :virtualbox do |v|
v.gui = true
v.memory = 2048
end
# Currently "ubuntu/bionic64" on VirtualBox requires `type: "virtualbox"`
# to make synced folder works.
@ilyar
ilyar / smart_question.md
Last active March 2, 2025 19:43
SMART — an algorithm for formulating a question

by Bruno Murai

SMART — an algorithm for formulating a question

SMART / SMARTER — is a mnemonic abbreviation used in management and project management to define goals and set tasks. The first known use of the term is mentioned in the work of Paul J. Meyer in 1965 and later in November 1981 in the work Management Review by George T. Doran

This approach can be used to formulate questions, resulting in the following components:

  • Specific — My task... (explains what exactly needs to be achieved)
  • Measurable — It should result in... (explains the expected outcome)
@NaniteFactory
NaniteFactory / dllmain.go
Last active February 21, 2025 23:33
An implementation example of DllMain() entrypoint with Golang. $ go build --buildmode=c-shared -o my.dll && rundll32.exe my.dll Test
package main
//#include "dllmain.h"
import "C"
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active March 2, 2025 12:06
set -e, -u, -o, -x pipefail explanation
@kuzminT
kuzminT / html5-games-tips.md
Last active May 29, 2023 04:39
Tips for phaser.js and html5 game development