Skip to content

Instantly share code, notes, and snippets.

View chrisbewz's full-sized avatar

Christian Celso Bewzenko chrisbewz

  • WEG Electric Equipments
  • Brazil
  • 03:50 (UTC -03:00)
  • Instagram _bzko_
View GitHub Profile
#!/bin/bash
SOURCE_BRANCH="helmcharts-source"
STAGING_BRANCH="helmcharts-staging"
echo
echo "Fetch new changes from helmcharts"
echo -----------------------------------------
git fetch helmcharts master
HELMCHARTS_LATEST_COMMIT=`git ls-remote helmcharts | grep "refs/heads/master" | awk '{ print $1}'`
@diyism
diyism / google_colab_VM_initial.ipynb.txt
Last active February 25, 2024 05:35
google colab VM initial
#############################ipynb START###############################################
#################### the 1st step after factory reset VM runtime
!apt update ; apt install openssh-server
!echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
!mkdir /root/.ssh
!echo 'ssh-rsa .....' >/root/.ssh/authorized_keys
!service ssh start
from google.colab import drive
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 7, 2026 21:39
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
@MaxWellHays
MaxWellHays / Heap.cs
Created October 27, 2020 19:17
C# Heap implementation
using System;
using System.Collections.Generic;
public class Heap<T>
{
List<T> a = new List<T>();
Comparer<T> comparer;
public Heap(Comparer<T> comparer)
{
@innerlee
innerlee / Git Subtree basics.md
Created March 12, 2020 04:32 — forked from SKempin/Git Subtree basics.md
Git Subtree basics

Git Subtree Basics

If you hate git submodule, then you may want to give git subtree a try.

Background

When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.

When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.

Adding a subtree

Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:

@FusRoDah061
FusRoDah061 / ServiceInstaller.cs
Last active December 5, 2025 15:51
Class for installing windows service on C#
/*
using System;
using System.Runtime.InteropServices;
using System.Threading;
*/
/// <summary>
/// <para>
/// Sources:
/// <para>https://stackoverflow.com/questions/358700/how-to-install-a-windows-service-programmatically-in-c </para>
@drch-
drch- / .gitignore
Created March 22, 2019 11:24
vscode + visual studio + rider(JetBrains) gitignore
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
@yizhang82
yizhang82 / idispatch.cs
Last active November 15, 2023 22:09
Example on creating your own IDispatch implementation
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication3
{
class Program
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 8, 2026 03:25
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@kirushik
kirushik / API_versioning.md
Last active June 3, 2024 20:07
API versioning for HTTP REST interfaces

API versioning for HTTP REST interfaces (best practices)

We at SCC Team (and at SUSE in general) are providing more and more APIs with the wonderful HTTP REST approach. APIs evolve over time, often unexpectedly — so it makes sense to get into some API versioning best practices right from the day 0. I was asked to join Crowbar guys' discussion to share my SCC experience with versioning APIs. This article is an attempt to formalize our solution and prepare it for a wider audience.

So, imagine you have different API consumers out of your area of control. Some of them definitely will lag behind the latest release.