Skip to content

Instantly share code, notes, and snippets.

@bizz84
bizz84 / main.dart
Last active May 3, 2024 13:07
Simple Emil & Password auth flow with Flutter & Firebase UI
import 'package:firebase_auth/firebase_auth.dart' hide EmailAuthProvider;
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_ui_auth/firebase_ui_auth.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:simple_auth_flutter_firebase_ui/firebase_options.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
@spig
spig / install_cups+airprint_centos7.md
Created February 15, 2018 14:52 — forked from jpawlowski/install_cups+airprint_centos7.md
Install and configure CUPS 2.1.2 on CentOS 7 (LXC running on Proxmox VE) host including AirPrint

Basic setup, e.g. enable ssh

yum -y install epel-release
yum -y upgrade
yum -y install openssh-server net-tools iputils psmisc less which man mc bash-completion bash-completion-extras bash-argsparse bind-utils traceroute htop mtr
echo "export HISTTIMEFORMAT='%F %T  '" > /etc/profile.d/history.sh
echo "export HISTIGNORE='ls -l:pwd:date:'" >> /etc/profile.d/history.sh
echo "export HISTCONTROL=ignoredups" >> /etc/profile.d/history.sh
systemctl enable sshd
systemctl start sshd
@arrieta
arrieta / lexer.cpp
Last active May 3, 2024 13:06
Simple C++ Lexer
// A simple Lexer meant to demonstrate a few theoretical concepts. It can
// support several parser concepts and is very fast (though speed is not its
// design goal).
//
// J. Arrieta, Nabla Zero Labs
//
// This code is released under the MIT License.
//
// Copyright 2018 Nabla Zero Labs
//
@CustomPhase
CustomPhase / MidiReader.cs
Last active May 3, 2024 13:04
MidiReader.cs
using UnityEngine;
using System.Collections;
using NAudio.Midi;
using System.IO;
using System.Linq;
public class MidiReader : MonoBehaviour {
public MidiFile midi;
@pbnj
pbnj / .tmux.conf
Last active May 3, 2024 13:04
Toggle-able Terminal in Tmux
bind-key -n 'C-\' run-shell -b ${HOME}/.local/bin/tmux-toggle-term
@Alexflex
Alexflex / HDFS.md
Last active May 3, 2024 13:02
HDFS

Лабораторная работа. Распределенная файловая система HDFS

Цель работы

Изучение основных операций для работы с распределенной файловой системой HDFS.

Задачи работы

  • подготовка окружения
  • запуск shell-клиента
  • изучение основных shell-команд

Подготовка рабочего окружения

Работа на сервере

Для подключения к серверу в локальной сети кафедры необходимо использовать один из возможных ssh-клиентов. Например, putty.

@dodola
dodola / ACM学习计划
Created August 14, 2013 02:14
ACM学习计划
ACM大量习题题库
ACM大量习题题库
现在网上有许多题库,大多是可以在线评测,所以叫做Online Judge。除了USACO是为IOI准备外,其余几乎全部是大学的ACM竞赛题库。
USACO
http://ace.delos.com/usacogate
美国著名在线题库,专门为信息学竞赛选手准备

Linux上でFSP Twinsの電圧情報等を取得する

CP2112でPMBusが繋がっているのでそれを叩くとよい

Linux Kernel 3.15以上であればカーネルにドライバがあるので特に苦労することはなく/dev/i2c-*に現れる

遊んでたらカーネルごとハングしたのでドライバおかしいかもしれない(5.4.0-97-generic)

基本的にPMBus

@alexchexes
alexchexes / chatgpt_ui_fix.user.js
Last active May 3, 2024 13:01
ChatGPT web-interface width fix (and other UI improvements)
// ==UserScript==
// @name ChatGPT CSS fixes
// @version 2024-02-11
// @updateURL https://gist.github.com/alexchexes/d2ff0b9137aa3ac9de8b0448138125ce/raw/chatgpt_ui_fix.user.js
// @downloadURL https://gist.github.com/alexchexes/d2ff0b9137aa3ac9de8b0448138125ce/raw/chatgpt_ui_fix.user.js
// @namespace http://tampermonkey.net/
// @description Adjusts width of side bar and messages of the chatGPT web interface
// @author alexchexes
// @match https://chat.openai.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=openai.com
@pinheaded
pinheaded / cog_ext.py
Last active May 3, 2024 12:59
a basic cog + extension example for discord.py v2
from discord import app_commands
from discord.ext import commands
# all cogs inherit from this base class
class ExampleCog(commands.Cog):
def __init__(self, bot):
self.bot = bot # adding a bot attribute for easier access
# adding a command to the cog
@commands.command(name="ping")