Skip to content

Instantly share code, notes, and snippets.

Adam B. liladas

Block or report user

Report or block liladas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View deploys3.js
const AWS = require('aws-sdk');
const fs = require('fs');
const mime = require('mime-types')
const path = require("path");
// Base AWS config.
// AWS Reference: Make sure the profile exists in ~/.aws/credentials
// See managing access keys:
// https://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html
// https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_console
View deploys3.js
const AWS = require('aws-sdk');
const fs = require('fs');
const mime = require('mime-types')
const path = require("path");
// Base AWS config.
// AWS Reference: Make sure the profile exists in ~/.aws/credentials
// See managing access keys:
// https://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html
// https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_console
@liladas
liladas / isoweekday2datetime.py
Last active Sep 6, 2017
datetime from isoweekday
View isoweekday2datetime.py
def date_from_day_of_week(isoweekday):
base = datetime.datetime.today()
return [d for d in [base - datetime.timedelta(days=x) for x in range(0, 7)] if d.isoweekday()==isoweekday][0]
@liladas
liladas / space_mir.html
Created May 30, 2017
Space Station Mir -- Mission Control
View space_mir.html
#
<center>![Land O'Pines School, Mir Space Station Mission Control](mcontrol.jpg)</center>
<embed src="aboard.wav" autostart="true" hidden="true" loop="false" width="100" height="100" align="BOTTOM">
<center>[![SAREX](sarex.gif)](http://www.gsfc.nasa.gov/sarex)</center>
<center>**The <u>S</u>pace <u>A</u>mateur <u>R</u>adio <u>EX</u>periment is sponsored by**</center>
View space.html
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="Adobe PageMill 3.0 Win">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<TITLE>Land O'Pines School, MIR Space Station, SAREX Page</TITLE>
<META NAME="Template" CONTENT="C:\Program Files\Microsoft Office\Office\html.dot">
<META NAME="keywords" CONTENT="howell, land, pines, school, SAREX, mir, mir space station, amsat, nasa, arrl, amateur, radio, amateur radio, school, howell, nj, andy thomas, astronaut, cosmonaut, space, shuttle">
</HEAD>
<BODY LINK="#800080" BACKGROUND="mirback.jpg">
@liladas
liladas / readfile.c
Last active Oct 3, 2016
read file example
View readfile.c
#include <stdio.h>
#include <string.h>
int main(void) {
puts("Reading File");
FILE *fp; // file pointer to data file
fp = fopen ("data.txt", "r");
FILE *stream;
@liladas
liladas / .bash_profile
Last active Sep 6, 2016
Programmatically switch colorschemes of the terminal and gvim for brighter days. ☼
View .bash_profile
#.bash_profile
export GVIMCOLOR=slate
alias bright="osascript ~/scripts/brighten_up.scpt \"Man Page\" &>/dev/null; export GVIMCOLOR=morning"
alias dark="osascript ~/scripts/brighten_up.scpt \"Solarized Dark\" &>/dev/null; export GVIMCOLOR=slate"
@liladas
liladas / FizzBuzzGenerator.py
Last active Aug 9, 2018
"Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”."
View FizzBuzzGenerator.py
# FizzBuzz in Python w/ Generators
# http://c2.com/cgi/wiki?FizzBuzzTest
# -- inspired by @dabeaz
def fizzbuzz(max_num=101):
for i in range(max_num):
value = ""
if i % 3 == 0: value += "Fizz"
if i % 5 == 0: value += "Buzz"
yield value if value else i
You can’t perform that action at this time.