This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import smtplib | |
gmail_user = "sender@gmail.com" | |
gmail_pwd = "sender_password" | |
def send_email(msg, gmail_user, gmail_pwd, to_list): | |
mailServer = smtplib.SMTP("smtp.gmail.com", 587) | |
mailServer.ehlo() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import smtplib | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
from email.mime.image import MIMEImage | |
from email.mime.application import MIMEApplication | |
gmail_user = "test.address@gmail.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final TextView view = new TextView(getContext()); | |
view.setBackground(Color.RED); | |
addSubview(view, 100, 100, 100, 100); // my method: param: view, x, y, width, height | |
// Playing objectAnimator | |
Animator anime = (Animator) AnimatorInflater.loadAnimator(this.getContext(), R.anim.pulse); | |
anime.setTarget(view); | |
// Try to listen to the end of the animation | |
anime.addListener(new AnimatorListener() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Reference: | |
# http://stackoverflow.com/questions/104420/how-to-generate-all-permutations-of-a-list-in-python | |
import itertools; | |
def test_permutations(): | |
print "test permutation"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
using System.Collections; | |
using System; | |
using System.IO; | |
using System.Text; | |
// Reference | |
// http://answers.unity3d.com/questions/12599/editor-script-need-to-create-class-script-automati.html | |
// http://answers.unity3d.com/questions/1007004/generate-script-in-editor-script-and-gettype-retur.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// TimeMeter.cpp | |
// GhostLeg | |
// | |
// Created by Ken Lee on 7/7/2017. | |
// | |
// | |
#include "TimeMeter.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void testCreateObject() // Testing Instantiate | |
{ | |
float x = Random.Range(-3, 3); | |
float y = Random.Range(-3, 3); | |
Vector3 position = new Vector3(x, y, 0); | |
Debug.Log("Before Instantiate"); | |
GameObject obj = GameObject.Instantiate(sourceObject, position, Quaternion.identity); | |
Debug.Log("After Instantiate"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/ShaderCrashCourse/Emptyshader" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
} | |
SubShader | |
{ | |
Pass | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// reference: http://danjohnmoran.com/Shaders/101/ | |
Shader "Custom/ShaderCrashCourse/SimpleColorshader" | |
{ | |
SubShader | |
{ | |
Tags | |
{ | |
"PreviewType" = "Plane" | |
} |