Skip to content

Instantly share code, notes, and snippets.

View czipperz's full-sized avatar

Chris Gregory czipperz

View GitHub Profile
int maxHealth = 600, currentHealth=maxHealth;
int essenceShiftStacks=0;
int baseDamage=60;
int burstFromPounce = 60;
public int getSlarkDamage() {
return baseDamage + 3*essenceShiftStacks;
}
public static void main(String[] args) {
@czipperz
czipperz / String Example
Last active August 29, 2015 14:14
String Example
public static void main(String[] args) {
String a = "asdf";
String b = "asdf";
String c = b;
if(a == b)
System.out.print("AAA, ");
if(b == c)
System.out.print("BBB, ");
if(a == c)

Remember username: when clone use https://USERNAME@url.com/aseruiosuerio

When already cloned (and https://github.com/czipperz/gr installed):

gr ro; gr ao https://USERNAME@url.com/aseirousrieosu`

w/o gr (normal git):

git remote remove origin
@czipperz
czipperz / Cell.cc
Created April 3, 2016 20:17
Define basic manual variant class.
#include <string>
#include <exception>
#if __cplusplus < 201103L
// for c++98 compiler support
#define noexcept throw ()
#endif
#if __cplusplus < 201103L
#define EQUALS_DELETE

a [abc] Used to do a cheap reference-to-reference conversion.

This trait is similar to [AsMut] which is used for converting between mutable references. If you need to do a costly conversion it is better to implement [From] with type &T or write a custom function.

@czipperz
czipperz / windows-setup.org
Created August 21, 2019 16:44
Windows setup

Keyboard

Add Dvorak

Language Settings

English

Options

Add a keyboard

United States-Dvorak

Make dvorak the default

Remove qwerty and readd it

Remove control+shift switch keyboard layout hotkey

@czipperz
czipperz / vtcodes.md
Last active November 16, 2021 09:42
Virtual Terminal Sequences in a condenced table.