Skip to content

Instantly share code, notes, and snippets.

View alkaruno's full-sized avatar
🏠
Working from home

Alexey Karunos alkaruno

🏠
Working from home
View GitHub Profile
@Imater
Imater / tomat.sh
Last active June 7, 2023 09:23
> tomat 25 'Название дела'
#!/usr/bin/env bash
SLEEP_DURATION=${SLEEP_DURATION:=1} # default to 1 second, use to speed up tests
progress-bar() {
local duration
local columns
local space_available
local fit_to_screen
local space_reserved
@mariovalney
mariovalney / pre-commit
Last active May 14, 2024 12:27
Pre-commit hook to check code with PHPCS, fix with PHPCBF and check mess with PHPMD
#!/bin/sh
#########################
# #
# Initializing #
# #
#########################
##
# You should add all tools as composer dependencies or change this path
@marczhermo
marczhermo / phpstorm.vmoptions
Created October 10, 2014 23:18
phpstorm use opengl
-Dawt.useSystemAAFontSettings=lcd
-Dawt.java2d.opengl=true
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active May 23, 2024 12:17
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@eznj
eznj / star_wars.ino
Last active September 26, 2023 18:24
Arduino Star Wars Song
const int c = 261;
const int d = 294;
const int e = 329;
const int f = 349;
const int g = 391;
const int gS = 415;
const int a = 440;
const int aS = 455;
const int b = 466;
const int cH = 523;
@alecgorge
alecgorge / java-properties.php
Created May 18, 2011 00:29
Parse Java properties files in PHP
<?php
function parse_properties($txtProperties) {
$result = array();
$lines = split("\n", $txtProperties);
$key = "";
$isWaitingOtherLine = false;
foreach ($lines as $i => $line) {
if (empty($line) || (!$isWaitingOtherLine && strpos($line, "#") === 0))
continue;