Skip to content

Instantly share code, notes, and snippets.

View Hecatoncheir's full-sized avatar
:octocat:
Focusing

Vitaliy Vostrikov Hecatoncheir

:octocat:
Focusing
View GitHub Profile
@darianmorat
darianmorat / 1 - settings.jsonc
Last active November 4, 2024 21:05
Visual Studio Code v1.91.1
{
// ===================
// THEME CONFIGURATION
// ===================
// Light-themes
// ------------
// "vim.highlightedyank.color": "#2f2f2f25",
// "vim.highlightedyank.textColor": "#000000",
// "editor.fontWeight": "600",
@rokiden
rokiden / fedora_to_usb.sh
Created August 31, 2023 13:19
Script for converting Fedora LiveCD to LiveUSB with persistence
#!/bin/bash
# Script for converting Fedora (and maybe other dracut-based) LiveCD to LiveUSB
# with persistence. Only UEFI boot supported. Tested with Fedora 37.
#
# Usage:
# ./fedora_to_usb.sh path/to/mounted/livecd /dev/sdX
#
# Result USB partitioning:
# GPT, 2 partitions:
# - "EFI" (vfat 256MB) for GRUB and kernel
@Integralist
Integralist / Go vs Rust - syntax differences.md
Last active October 7, 2024 21:48
[Go vs Rust: syntax differences] #go #golang #rust #rustlang #syntax

The following examples are written from the perspective of an engineer who writes code using the Go programming language, and so you'll find that I've written notes about how Rust is different and I don't really cover the why or how of the example Go code. Additionally, the Go examples are far from exhaustive because I'm using this as a 'scratch pad' for my Rust learnings.

Error Handling

Go example

@nhancv
nhancv / w_circle_crop.dart
Last active August 28, 2023 13:10
Flutter crop circles, background image, draggable, transparent hole
import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:nft/services/safety/base_stateful.dart';
import 'package:nft/widgets/p_appbar_transparency.dart';
import 'package:path_provider/path_provider.dart';
@eseidel
eseidel / main.dart
Created May 26, 2020 15:16
Boid (bird-like flocking) simulation, inspired by https://www.youtube.com/watch?v=bqtqltqcQhw
import 'dart:ui';
import 'package:flutter/material.dart';
import 'dart:math';
const double kBoidVelocity = 5.0;
const double kBoidScale = 2.0;
const int kBoidCount = 100;
const double kBoidMaxAvoidSteerSpeed = .1;
// Angles above maxAlignAngle are treeted the same (caps the turn speed).
package main
import (
"fmt"
"github.com/dgrijalva/jwt-go"
"github.com/go-redis/redis/v7"
"github.com/twinj/uuid"
"net/http"
"os"
"strconv"
@cdaven
cdaven / Spacemacs on Windows 10.md
Last active May 14, 2024 08:48
Setting up Spacemacs on Windows 10

Install Emacs First

Download emacs-w64 and extract somewhere, e.g. a tools or apps folder like C:\Users\<user>\tools\emacs.

Select Emacs' Home

Emacs and many other applications store its configuration in the user's "home" folder. Translated directly from the Unix world, that is %UserProfile% (C:\Users\<user>), but Windows prefers %AppData% instead (C:\Users\<user>\AppData\Roaming).

For simplicity's sake, override this by specifying the HOME environment variable explicitly. Emacs and some other applications (e.g. MinGW) lets this override the default.

@graphicbeacon
graphicbeacon / index.html
Last active May 20, 2020 14:13
WebAssembly in Dart for web example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="scaffolded-by" content="https://github.com/google/stagehand" />
<title>webassembly_example</title>
<link rel="stylesheet" href="styles.css" />
@baybatu
baybatu / create-rabbitmq-exchange-queue-using-rest-api.sh
Created April 2, 2019 06:35
Create RabbitMQ queue and exchange with binding using REST API
# create exchange
curl -i -u guest:guest -H "content-type:application/json" \
-XPUT -d'{"type":"fanout","durable":true}' \
http://localhost:15672/api/exchanges/%2f/my.exchange.name
# create queue
curl -i -u guest:guest -H "content-type:application/json" \
-XPUT -d'{"durable":true,"arguments":{"x-dead-letter-exchange":"", "x-dead-letter-routing-key": "my.queue.dead-letter"}}' \
http://localhost:15672/api/queues/%2f/my.queue
@MarcinusX
MarcinusX / main.dart
Created March 21, 2019 19:36
Ripple effect transition
import 'package:flutter/material.dart';
import 'package:rect_getter/rect_getter.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Fab overlay transition',