Skip to content

Instantly share code, notes, and snippets.

View alexchiri's full-sized avatar

Alexandru (Alex) Chirițescu alexchiri

View GitHub Profile
package com.alexchiri.bank;
import java.util.List;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
/**
* Alexandru Chiritescu
* 13-1-13
*/
package com.alexchiri;
import com.alexchiri.bank.Bank;
import com.alexchiri.bank.MoneyBag;
import com.alexchiri.robber.Heist;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
Random number of money bags to load the safe with: 12
Loading bank 'Cool bank' with 12 money bags!
Loading safe with 12 money bags!
Team Kansas is ready to go!
Team Charlie's Angels is ready to go!
Team Lottery ticket is ready to go!
Team Who wants to be a millionaire? is ready to go!
(Bank:Cool bank) Opening safe under gunpoint for 'Kansas'
Team Kansas can only steal 3 money bags.
package com.alexchiri.bytecode;
import java.util.ArrayList;
import java.util.List;
/**
* Alexandru Chiritescu
* 27-1-13
*/
public class ASimpleClass {
Classfile /C:/Users/alex/IdeaProjects/Tests/out/production/Tests/com/alexchiri/bytecode/ASimpleClass.class
Last modified 27-jan-2013; size 1319 bytes
MD5 checksum 441505122fb6fa3d285243a382ddef46
Compiled from "ASimpleClass.java"
public class com.alexchiri.bytecode.ASimpleClass
SourceFile: "ASimpleClass.java"
minor version: 0
major version: 51
flags: ACC_PUBLIC, ACC_SUPER
public static void main(java.lang.String[]);
flags: ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=4, args_size=1
0: new #2 // class java/util/ArrayList
3: dup
4: invokespecial #3 // Method java/util/ArrayList."<init>":()V
7: astore_1
8: aload_1
@alexchiri
alexchiri / TimeTravelling.java
Last active December 22, 2015 14:18
Playing around with the add method of the Calendar.
import java.util.Calendar;
public class TimeTravelling {
public static void main(String[] args) {
Calendar now = Calendar.getInstance();
System.out.println("Greetings from the present: " + now.getTime());
Calendar twoMonthsAndTeoWeeksAgo = Calendar.getInstance();
twoMonthsAndTeoWeeksAgo.setTime(now.getTime());
@alexchiri
alexchiri / TimeTravelling.output
Created September 8, 2013 12:25
Output of running the TimeTravelling.java main method.
Greetings from the present: Sun Sep 08 14:24:43 CEST 2013
Greetings from the past: Mon Jun 24 14:24:43 CEST 2013
Attempt to get back in the present no 1: Sat Sep 07 14:24:43 CEST 2013
Attempt to get back in the present no 1: Sun Sep 08 14:24:43 CEST 2013

Keybase proof

I hereby claim:

  • I am alexchiri on github.
  • I am alexchiri (https://keybase.io/alexchiri) on keybase.
  • I have a public key whose fingerprint is EA37 C382 D1BC A831 B58D 57CF 8D3E 2673 7FC0 5747

To claim this, I am signing this object:

@alexchiri
alexchiri / .md
Last active February 18, 2018 07:15
The gist on gestures from Talk like TED

Here are four tips you can use today to improve the way you use your hands:

  • Use gestures. Don't be afraid to use your hands in the first place. The symplest fix for a stiff presentation is to pull your hands out of your pockets and use them. Don't keep your hands bound when you present. They want to be free.
  • Use gestures sparingly. Now that I've told you to use gestures, be careful not to go overboard. Your gestures should be natural. If you try to imitate someone else, you'll look like a Saturday Night Live caricature of a bad politician. Avoid canned gestures. Don't think about what gestures to use. Your story will guide them.
  • Use gestures at key moments. Save your most expansive gestures for key moments in the presentation. Reinforce your key messages with purposeful gestures... as long as it feels genuine to your personality and style.
  • Keep your gestures within the power sphere. Picture your power sphere as a circle that runs from the top of your eyes, out to the tips of your out