Skip to content

Instantly share code, notes, and snippets.

View Hoffs's full-sized avatar
🦩
doom

Ignas Hoffs

🦩
doom
  • Lithuania
View GitHub Profile
@Hoffs
Hoffs / vim-shortcuts.md
Created January 17, 2020 20:10 — forked from tuxfight3r/vim-shortcuts.md
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)
@Hoffs
Hoffs / sort.js
Last active September 22, 2019 09:51
sorts wolt restarurant cards by delivery price descending, class names probably change, so :(
listClass = '.ListPage__list___24Dl6';
priceClass = 'WideVenueBanner__roughDelivery___2K1oP';
function sortByPrice(aNode, bNode) {
const aText = aNode.getElementsByClassName(priceClass)[0].innerText;
const bText = bNode.getElementsByClassName(priceClass)[0].innerText;
return aText.localeCompare(bText);
}
function sortCards() {
[
{
"key": "ctrl+p",
"command": "-workbench.action.quickOpen"
},
{
"key": "ctrl+p",
"command": "-workbench.action.quickOpenNavigateNextInFilePicker",
"when": "inFilesPicker && inQuickOpen"
},
@Hoffs
Hoffs / tetris.bat
Last active July 31, 2024 03:40
Tetris in batch
@echo off
color 4F
title Tetris by
setlocal enabledelayedexpansion
mode con: cols=32 lines=35
set "hashBar=############"
set "ESpace= "
set "LowestYFig=1"
@Hoffs
Hoffs / roulette.py
Created May 18, 2017 18:00
Double up doesn't work
import random
allbank = 0
alliter = 0
allmax = 0
itt = 0
it = 10000
for i in range(0, it):
itt += 1
@Hoffs
Hoffs / qnm.js
Last active May 15, 2017 18:52
questionnaire no more
var count = $(".answer").length;
var i = 0;
$(".answer").each(function () {
i++;
$(this).find('.answer-item').not('[type=hidden]').children('input').prop('checked', true);
if (i == count) {
$('button:contains("Tęsti"), button:contains("Pateikti")').trigger('click');
}
});
@Hoffs
Hoffs / register.php
Created April 3, 2017 21:11
HotNeighbour/views/site/register.php
<?php
/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model app\models\LoginForm */
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
$this->title = 'Register';
$this->params['breadcrumbs'][] = $this->title;
@Hoffs
Hoffs / login.php
Created April 3, 2017 21:10
HotNeighbour/views/site/login.php
<?php
/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model app\models\LoginForm */
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
$this->title = 'Login';
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `hndatabase`
--
-- --------------------------------------------------------
--
# App
using System;
using ClassLibrary1;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{