Skip to content

Instantly share code, notes, and snippets.

View cubuspl42's full-sized avatar

Jakub Trzebiatowski cubuspl42

  • Gdańsk, Poland
  • 07:38 (UTC +02:00)
View GitHub Profile
#include <iostream>
using namespace std;
struct lista {
int wartosc;
lista *next;
lista *prev;
};
void add_after(lista *l, int n) {
// Oznaczmy:
// X - nowy węzeł
// L - węzeł, po którym dodajemy X
// N - węzeł obecnie następujący po L
// L <-> N
x->next = l->next;
// L <-> N
#ifndef ALGORITHM_HPP
#define ALGORITHM_HPP
#include <cstring>
#include <cstddef>
namespace nonstd {
template<typename T>
void swap(T &a, T &b) {
T tmp(a);
while getopts ":s:p:" o; do
case "${o}" in
s)
echo ${OPTARG}
;;
p)
echo ${OPTARG}
;;
*)
echo "wtf"
extern "C" {
double plus_jeden(double x);
}
double d(unsigned long long S, unsigned long long E, unsigned long long M) {
S <<= 63;
E <<= 52;
unsigned long long a = S | E | M;
### Keybase proof
I hereby claim:
* I am cubuspl42 on github.
* I am cubuspl42 (https://keybase.io/cubuspl42) on keybase.
* I have a public key whose fingerprint is B129 7115 B2D8 5416 C7B9 21CE D7C7 9A97 9757 F40D
To claim this, I am signing this object:
parser grammar BiaParser;
options { tokenVocab = BiaLexer; }
typeExpression
: referredName=Identifier # typeReference ;
expression
: callableExpression # callableExpression_
| left=expression operator=Lt right=expression # binaryOperation
#!/bin/sh
OUTPUT="$(flutter analyze)"
echo "$OUTPUT"
echo
if grep -q "error •" <<< "$OUTPUT"; then
echo "flutter analyze found errors"
exit 1
else
echo "flutter analyze didn't find any errors"
exit 0
@cubuspl42
cubuspl42 / github-repo-config.md
Last active April 24, 2023 09:53
Sensible GitHub repository configuration

Highly opinionated. This works for my use cases. Some parts assume that GitHub Actions are used.

General

Pull Requests

image

  • Ensure "Allow merge commits" is unchecked
  • Ensure "Allow squash commits" is unchecked
@cubuspl42
cubuspl42 / ffmpeg-compress.sh
Created September 1, 2023 08:11
A script for compressing videos
#!/bin/bash
# Check if the input file is provided
if [ -z "$1" ]; then
echo "Usage: $0 <input_file>"
exit 1
fi
# Get input file
input_file="$1"