Skip to content

Instantly share code, notes, and snippets.

View smith558's full-sized avatar
🇬🇧

Stanislav (Stanley) Modrak smith558

🇬🇧
View GitHub Profile
@smith558
smith558 / texcount.md
Last active December 2, 2023 12:00
LaTex word count

Integrating texcount directly into a LaTeX document to display a live word count requires a bit of setup. Here's a basic method to do this:

Step 1: Enable Shell Escape

First, make sure that shell escape is enabled in your LaTeX compiler. This is necessary because the document will need to run external commands (texcount in this case).

  • For pdflatex, you can enable shell escape by compiling with the -shell-escape option (e.g. pdflatex -shell-escape yourfile.tex).
  • If you're using an editor like TeXShop or Overleaf (for Overleaf, yourfile.tex file must be named output.tex), check their respective settings or documentation on how to enable shell escape.

Step 2: Define a New Command in Your LaTeX Document

@smith558
smith558 / ssh-git-github.md
Last active October 9, 2023 11:04
Generate SSH key on Ubuntu

Here's a simplified guide to generate an SSH key on Ubuntu and link it with Git and a GitHub profile:

  1. Generate SSH Key:

    ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

    When prompted, press Enter to accept the default file path and filename.

@smith558
smith558 / main.dart
Created August 31, 2023 20:01
NavigationRail with enlarged labels shows incorrect hover area in Material 3 [re-opened]
import 'package:english_words/english_words.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@smith558
smith558 / specification.md
Last active January 4, 2023 11:44
Git Style Standard

A Simple Git Style Standard

Merged from https://github.com/joelparkerhenderson/git_commit_message, https://gist.github.com/tonibardina/9290fbc7d605b4f86919426e614fe692 and https://chris.beams.io/posts/git-commit/

General Rules

  • Commit messages must have a subject line and may have body copy. These must be separated by a blank line.
  • The subject line must not exceed 50 characters
  • The subject line should be capitalized and must not end in a period
  • The subject line must be written in imperative mood (Fix, not Fixed / Fixes etc.)
@smith558
smith558 / TestPart2.java
Last active November 30, 2020 22:09
An erroneous test case in TestPart2.java?
/**
* Test {@link SEStudent#groupWork(Character)}.
*/
@Test
@DisplayName("Test SEStudent's groupWork(Character)")
public void testSEStudent_groupWork() {
student.selfStudy();
student.selfStudy();
student.selfStudy();
student.selfStudy();
@smith558
smith558 / How to update gems in ruby on rails application
Created April 6, 2020 14:59
Update rails 5.x / gems / ruby 2.6.5
Update Your Gems Early and Often
(https://thoughtbot.com/blog/keep-your-gems-up-to-date)
Commands to keep your app healthy, Ruby and Rails gems wise
https://gist.github.com/kathyonu/c9ef8190e50422bc0edc
A Guide to Update Gems with bundle update
https://medium.com/cedarcode/reduce-fear-of-bundle-update-with-this-4-step-process-e021e8808c48
>>> import platform, sys
>>> platform.architecture(), sys.maxsize
For example for 3.6 version type py -3.6. If you have also 32bit and 64bit versions, you can just type py -3.6-64 or py -3.6-32