Skip to content

Instantly share code, notes, and snippets.

View d0k1's full-sized avatar
๐ŸŒ
Everything is a copy of a copy of a copy...

Denis Kirpichenkov d0k1

๐ŸŒ
Everything is a copy of a copy of a copy...
View GitHub Profile
@mresetar
mresetar / readMail.groovy
Created January 29, 2012 15:21
Read e-mail Groovy script
import javax.mail.*;
import javax.mail.internet.*;
@GrabConfig(systemClassLoader=true)
@Grapes(
@Grab(group='javax.mail', module='mail', version='1.4.4')
)
// setup connection
Properties props = new Properties();
def host = "localhost";
@rstacruz
rstacruz / index.md
Last active August 2, 2025 18:42
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

@hay
hay / gist:1351230
Last active May 23, 2025 10:46
Enterprisify your Java Class Names!
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Enterprisify your Java Class Names! (by Hay Kranen)</title>
<style>
body {
background: white;
text-align: center;
@johnconroy
johnconroy / tfidf java
Created September 27, 2011 14:59
Term frequency Inverse Document Frequency Java
package tfidf;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.text.DecimalFormat;
import java.util.ArrayList;
@pmuellr
pmuellr / unzip-recurse.py
Created November 19, 2010 15:41
tool to recursively unzip .zip and .jar files
#!/usr/bin/env python
import os
import sys
import subprocess
#-----------------------------------------------------------------------------
def main():
fileNames = sys.argv[1:]