Skip to content

Instantly share code, notes, and snippets.

View alessandroleite's full-sized avatar

Alessandro Leite alessandroleite

View GitHub Profile
@alessandroleite
alessandroleite / grammar-terminology.md
Last active April 14, 2024 19:24
Writing resources

Grammar terminology matters because it allows us to communicate efficiently about language. Of course, it is not necessary to know the terminology to speak a language. We all learn our first languages without first learning what a verb and noun are. However, when we speak about grammar, especially in the context of writing, it helps if we can refer to grammar using precise vocabulary.

There are many sources online and in books that will explain grammar terminology. Not all of them will use exactly the same terms for the same grammatical points (I know, frustrating!). However, if you get into the habit of learning to identify the names of grammatical objects, you will move forward in your understanding of written English.

Sites and books that you can use to look up the names of grammatical terms

Websites

  1. The Elements of Style http://bartleby.com/141/
  2. Using English: http://www.usingenglish.com/glossary/
@alessandroleite
alessandroleite / cert.java
Last active March 2, 2024 00:41
Generate a self signed X509 certificate with Bouncy Castle
//Generate a self signed X509 certificate with Bouncy Castle.
// StringBuilder sb = new StringBuilder();
//
// for (int i = 0; i < pub.length; ++i)
// {
// sb.append(Integer.toHexString(0x0100 + (pub[i] & 0x00FF)).substring(1));
// }
//
// System.out.println(sb);
// sb.setLength(0);
Personal Statements and Statements of Purpose
Personal statements (sometimes called statements of purpose) are essays required from students applying to undergraduate, graduate, or professional school. These statements are different from a job cover letter. In such statements, you are presenting yourself as a potential student. Usually universities or colleges ask you to address specific questions, but sometimes they give only general guidelines.
There are many approaches to doing these statements. It is especially important, however, to be original, sincere, honest, and to show your interest in the school to which you are applying. It is important that your essay represent who you are – resist the urge to copy models that you find on the Internet.
Here are several sites that will help you through the process of writing the statement of purpose, or college entrance essays:
http://www.wikihow.com/Write-a-Statement-of-Purpose
Barriers to speed reading
--------------------------
Subvocalizing. Repeating what you read in your head (reading with your ears).
If you hear yourself reading, read faster.
Vocalizing. If your lips move as you read you are vocalizing your text. As long as you read vocalizing, you will only be able to read as fast as you can speak.
Let the texts pass into the mind directly from the eye, skipping the mouth and ear.
@alessandroleite
alessandroleite / vagrant-virtualbox-fedora-host.md
Last active August 23, 2019 11:23
Provisioning VirtualBox machines on Fedora host with Vagrant

sudo dnf install libvirt-devel -y sudo dnf install vagrant vagrant-libvirt vagrant-libvirt-doc -y

vagrant plugin install vagrant-libvirt vagrant plugin install vagrant-mutate

Recompile VirtualBox Kernel modules

sudo /sbin/rcvboxdrv setup

Running Vagrant on Fedora 22

@alessandroleite
alessandroleite / MQCommunicator.java
Created February 17, 2013 13:56
this class provides access to the MQSeries queue facilities. Once instantiated, the main application program need only call the 'send' and 'receive' methods to put & get strings. The send method returns an MQMessage object the handle of which is used to retrieve the reply
/* This class provides access to the MQSeries queue facilities. Once
instantiated, the main application program need only call the 'send' and
'receive' methods to put & get strings. The send method returns an MQMessage
object the handle of which is used to retrieve the reply. */
import java.io.*;
import com.ibm.mq.*; // Include the MQ package
public class MQCommunicator {
private String hostname; // Define the name of your host to connect to
@alessandroleite
alessandroleite / RoundRobinVmAllocationPolicy.java
Created January 22, 2013 20:20
Round-Robin {@link Vm} allocation policy for CloudSim
package org.cloudbus.cloudsim.examples;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.cloudbus.cloudsim.Host;
import org.cloudbus.cloudsim.Log;
import org.cloudbus.cloudsim.Vm;
import org.cloudbus.cloudsim.core.CloudSim;
@alessandroleite
alessandroleite / gist:4233584
Created December 7, 2012 14:28
Counting the CPU cycles of a function/procedure
/////////////////////////////////////////////////////////////////////////
static u_int64_t start = 0;
void access_counter(unsigned* hi, unsigned* low);
void start_counter()
{
unsigned hi, lo;
access_counter(&hi, &lo);
start = ((u_int64_t)hi << 32) | lo;
@alessandroleite
alessandroleite / CloudSimExample9.java
Last active February 22, 2018 04:58
A CloudSim example using a VmAllocationPolicy and DatacenterBroker based in Round-Robin policy.
package org.cloudbus.cloudsim.examples;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;