Skip to content

Instantly share code, notes, and snippets.

View motdotla's full-sized avatar
💛

mot motdotla

💛
View GitHub Profile
@motdotla
motdotla / gist:fa3efac2e6a5db80551cb05e79aa351e
Last active July 13, 2023 20:55
Works in single command
npx dotenv-vault push
brew install vim
@motdotla
motdotla / index.html
Created October 12, 2014 20:41
A Pen by Secret Sam.
<html>
<head>
<title>Web Root</title>
</head>
<body>
<canvas id="sign"></canvas>
</body>
</html>
@motdotla
motdotla / gist:7476379
Last active December 28, 2015 09:09
Cascadia JS Songs as Code
var askNicely = function(person, mm) {
if (person == mm) {
console.log('The real one')
}
}
{"headers":"Received: by 127.0.0.1 with SMTP id PJrfql0ZL0 Fri, 20 Sep 2013 19:20:39 +0000 (UTC)\nReceived: from mail-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172]) by mx2.sendgrid.net (Postfix) with ESMTPS id 13B2517816F3 for <reply@m.carve.io>; Fri, 20 Sep 2013 19:20:38 +0000 (UTC)\nReceived: by mail-we0-f172.google.com with SMTP id w61so926388wes.17 for <reply@m.carve.io>; Fri, 20 Sep 2013 12:20:38 -0700 (PDT)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sendgrid.com; s=ga1; h=mime-version:date:message-id:subject:from:to:content-type; bh=Ro5Qjl2jqmXMd5jxz2Zo0og3kS5R8vkDAXec/s6jbZc=; b=ImcNYp/9fqCRNfr5MgZiWcmhfIvyvBlhXxZPwtm/Xi+o5XhiEzAXN9ZhAXLhj0jQtv PpLHqmaanVFaWyB8G+cE/3XNKiinEnk4fo456gfz/mkwGYxJ3AkH8irsmdE0y/fLAaYn Uh4uP4ZQEbVMNBsp9KXUfSzKf4mmuE8vBaB3M=\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=Ro5Qjl2jqmXMd5jxz2Zo0og3kS5R8vkDAXec/s6jbZc=; b=OtJL7

Hello World with Spring MVC and Gradle

I am a Ruby and JavaScript developer learning Java. Java-land is vast. There are a number of crufty frameworks and antiquated approaches. Don't get mired in those. Use Spring MVC and Gradle.

What follows is a 'Hello World' application using those Java technologies. Additionally, it does not require the Eclipse IDE which so many other Java tutorials defer to for some reason. I strongly prefer the command line to an IDE.

You can get the finished source of this tutorial here.

Install Gradle

@motdotla
motdotla / app.js
Last active December 20, 2015 21:29
...
function findEmailAddresses(text) {
var emails = text.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi);
return emails;
}
var emails = {
...
parse: {
days = [1,2,3,4,5,6,7,8,9,10]
tickets = [1,2,3,4,5,6]
results = []
days.each do |day|
days.each do |day2|
if day2 != day
tickets.each do |ticket|
result = "#{ticket} on day #{day} and #{tickets.length-ticket} on day #{day2}"
results << result
@motdotla
motdotla / binary-party-year-0.md
Last active December 16, 2015 23:21
binary-party-year-0

Binary Party. Year 0.

You are invited to an epic scene. Party with laser cats. Party like tron.

The last 13 months have been exciting for Riverside's tech scene. StartupWeekend happened. StartupIE has grown to large numbers. The Guild got started. RiversideJS's tight nit group expands. Riverside.io is very close to opening a much need coworking space. Hackathon teams from Riverside took trophies at Las Vegas and Orange County hackathons.

Riverside is becoming a great place to be a developer, a designer, a maker.

But most importantly relationships are building. In Riverside we all know each other. We help each other. We are all part of building and defining the culture for this new tech community. And it's a warm community, a friendly one. I've met many good friends through Riverside's burgeoning tech scene. I feel a part of something bigger and I think many others do too.

-webkit-animation: writeText 0.5s ease; /* Safari 4+ */
-moz-animation: writeText 0.5s ease; /* Fx 5+ */
-o-animation: writeText 0.5s ease; /* Opera 12+ */
animation: writeText 0.5s ease; /* IE 10+ */
&:nth-child(1) {
-webkit-animation-duration: 0.5s;
}
&:nth-child(2) {
-webkit-animation-duration: 1s;