Skip to content

Instantly share code, notes, and snippets.

View lunacodes's full-sized avatar

Luna Lunapiena lunacodes

View GitHub Profile
@lunacodes
lunacodes / git-aliases.sh
Created July 17, 2019 15:46
luna-git-aliases
## Git Aliases
alias g='git'
alias ga='git add'
alias gaa='git add -A'
alias gb='git branch'
# -a Show local and remote
alias gba='git branch -a'
# gb delete
alias gbd='git branch -d'
alias gbdf='git branch -D'
@lunacodes
lunacodes / notes
Last active May 10, 2016 16:03
Greg Price - Static Typing In Python Talk - 5/10/16 - Initial Notes
[NOTE: These are raw, I may have been getting a bit sick, there's probly errors or things I just didn't hear/get... if something seems Off, assume it's something I missed - not him]
Greg Price - works w/ Guido Van Rossum
Python has Static Types in Beta
Core Mypy team:
Jukka Lehtosdale - PhD research was the start of this
Guido vR
Greg
$(document).ready(function() {
var $children = $("#tag_cloud").children("a")
console.log($children)
var $color_list = ['red', 'blue', 'yellow', 'green']
for (i = 1; i < $children.length - 1; i++) {
var $random_color = $color_list[Math.floor(Math.random()*$color_list.length)];
$children[i].css("color", $random_color)
}
console.log(red);
});
@lunacodes
lunacodes / mood_tracker.py
Last active February 8, 2016 11:09
My Mood Tracker's menu code: before & after using a Dictionary to Dispatch Functions
#!/usr/bin/env python3
""" This is what my Mood Tracker app looked like on 2/8/16 at 6am """
#Note: Replace String Queries with Variables for Security Reasons
#Add an Undo Delete Function - This would involve a backup Database
import sys
import sqlite3 as lite
con = lite.connect('mood_history.sqlite')
@lunacodes
lunacodes / sql.py
Created October 29, 2015 05:13
Database Issue
import sys
import sqlite3 as lite
con = lite.connect('mood_history.sqlite')
"""Add User Profiles???"""
"""Deleted Colors from this version due to Dev Glitches"""
@lunacodes
lunacodes / movie_selector.gist
Created August 11, 2015 02:19
Dict Problem
user_action_dict = {'add' : 'add_movie_to_list',
'choose' : 'movie_selection',
'delete' : 'delete_movie_from_list',
'view Movies' : 'print_available_movie_dict',
'view Played' : 'print_played_movie_list',
}
available_movie_dict = {}
available_movie_dict2 = {'name' : 'Buffy', 'name2' : 'Angel', 'name3' : 'Spike'}
@lunacodes
lunacodes / single.php
Created July 27, 2015 15:31
Single Posts Template I'm trying to modify to exclude sidebar based on post-category - refer to the code in section Line 3
<?php get_header(); ?>
<div class="row">
<div class="col-sm-12">
<?php get_sidebar(); ?>
</div>
</div>
<div class="row">
@lunacodes
lunacodes / TicTacToePygame.py
Created June 11, 2015 08:08
Tic Tac Toe Using Pygame
import pygame, sys
from pygame.locals import *
green = (0, 255, 0)
red = (255, 0, 0)
black = (0, 0, 0)
winWidth = 600
winHeight = 600
@lunacodes
lunacodes / tictactoe.py
Created June 9, 2015 03:36
Tic Tac Toe
"""As I mentioned, a lot of this was initially derived from Making Games with Python by Al Sweigart"""
import random
def drawBoard(board):
print ' | ' + ' | '
print ' ' + board[7] + ' | ' + board[8] + ' | ' + board[9]
print ' | ' + ' | '
print '-----------'