Skip to content

Instantly share code, notes, and snippets.

View VicoErv's full-sized avatar
:dependabot:

Vico Erv VicoErv

:dependabot:
View GitHub Profile

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

@VicoErv
VicoErv / gist:8181e5c529dee68aa36a953ec33fa690
Created April 21, 2022 20:54
Hide #StandWithUkraine hashtag from composer because don't force your personal opinion to PHP developers all over the world.
add this to your $HOME/.bashrc
composer() {
composer $@ | grep "#StandWithUkraine"
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package perpustakaan.ui;
import java.awt.event.WindowEvent;
import java.sql.Connection;
import java.sql.PreparedStatement;
@VicoErv
VicoErv / i3-brightness.md
Created May 22, 2020 11:39
How to make brightness work with i3

Install brightnessctl https://www.archlinux.org/packages/community/x86_64/brightnessctl/

Add this script to ~/.config/i3/config

bindsym XF86MonBrightnessUp exec brightnessctl s +10% > /dev/null && notify-send Brightness $(($(brightnessctl get) * 10 / 937 * 10))% -h string:x-canonical-private-synchronous:brightness_percentage --app-name System
bindsym XF86MonBrightnessDown exec brightnessctl s 10%- > /dev/null && notify-send Brightness $(($(brightnessctl get) * 10 / 937 * 10))% -h string:x-canonical-private-synchronous:brightness_percentage --app-name System

explanation:

.class public Lcom/tencent/wemusic/ui/profile/UserBaseInfo;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Landroid/os/Parcelable;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
@VicoErv
VicoErv / 13.1
Created December 20, 2019 11:14
#include <stdio.h>
#include <conio.h>
long int faktorial(unsigned int n)
{
if (n == 0 || n == 1) {
return 1;
} else {
return n * faktorial(n - 1);
}
Firmware Error (ACPI): Failure creating [\_SB.PCI0.LPCB.EC0.B1CT], AE_ALREADY_EXISTS (20180427/dsfield-777)
Firmware Error (ACPI): Failure creating [\_SB.PCI0.LPCB.EC0.B1CN], AE_ALREADY_EXISTS (20180427/dsfield-777)
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20180427 (64-bit version)(RM)
* Copyright (c) 2000 - 2018 Intel Corporation
*
* Disassembling to non-symbolic legacy ASL operators
*
* Disassembly of DSDT_1.aml, Fri Jul 12 17:04:25 2019
var appVersion = "",
freeze = !1,
ws, loading, perLoad, controller, scene, lastIndex, dom, mvReq, tvReq, imgReq, sources = [],
subtitles = [],
currentIdx, ignoreIdx, srcIdx, epArr, epi = "-1",
epiTitle = "",
noDrive = !1,
havesend = !1,
bckupIdx = "",
actEpi, jw, hs, mvid, prov, ar, table, currentKuki, mrload = !1,
@VicoErv
VicoErv / git-diff.md
Last active August 23, 2018 01:07
get diff from commit

To see the diff for a particular COMMIT hash:

git diff COMMIT~ COMMIT will show you the difference between that COMMIT's ancestor and the COMMIT. See the man pages for git diff for details about the command and gitrevisions about the ~ notation and its friends.

Alternatively, git show COMMIT will do something very similar. (The commit's data, including its diff - but not for merge commits.) See the git show manpage.

@VicoErv
VicoErv / git-clean.md
Last active August 14, 2018 09:18
git: clean untracked files

clean untracked files git clean -di <path>

clean untracked + ignored files git clean -dix