Skip to content

Instantly share code, notes, and snippets.

View tnsicdr's full-sized avatar

T. Nguyen tnsicdr

View GitHub Profile
@tnsicdr
tnsicdr / slack-themes
Created January 27, 2017 02:34
Slack Themes
-- avery@salespad made these --
Black/Grey: #16212b ,#b8b8b8 ,#454e57 ,#ffffff ,#B8B8B8 ,#ffffff ,#00ffa6 ,#63ba94
Blue: #154370 ,#374559 ,#61b3ff ,#FFFFFF ,#a6b2bf ,#ffffff ,#00fff2 ,#69cfa3
@tnsicdr
tnsicdr / IPFinder2.java
Last active September 27, 2016 18:34
CIS457 - IPFinder2.java
package com.github.seitensei;
import java.net.*;
import java.io.*;
public class IPFinder2 {
public static void main(String[] args) throws IOException {
// Get name and IP address of local host
@tnsicdr
tnsicdr / pythonista_compile_howto.md
Created April 9, 2016 04:24 — forked from SpaceVoyager/pythonista_compile_howto.md
How to make a standalone iOS app with Pythonista

After you made some cool games or apps with Pythonista, you may want to make it run as a standaone app on iPad/iPhone and possibly share it on the AppStore. This how-to tells you how to do it.

What you need:

  1. Pythonista code you wrote
  2. A Mac with Xcode 7.1 installed
  3. iPhone/iPad running iOS 9

Steps:

  1. Download PythonistaProjectTemplate.zip. The original PythonistaProjectTemplate described at http://olemoritz.net/pythonista-15-whats-new-and-whats-missing.html does not work with Xcode 7. I updated it to work with Xcode 7 and added a more interesting example than the plain old Hello World thing.
  2. Unzip the file and open the project in Xcode 7.1. In project settings, change the Bundle Identifier from com.yuhangwang.pythonistaproject to something else.
//=============================================================================
// tnsi_quest_core.js
//=============================================================================
var Imported = Imported || {};
Imported.tnsi_quest_core = "0.0.1";
/*:
* @plugindesc Common quest format
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
#include "boards.h"
// This configuration file contains the basic settings.
// Advanced settings can be found in Configuration_adv.h
// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
//===========================================================================
source 'https://rubygems.org'
gem 'rake'
gem 'rack'
gem 'puma'
gem 'roda'
gem 'haml'
gem 'inflecto'
gem 'rom'
gem 'rom-roda'
#!/usr/bin/env python
def is_function(d):
"""Takes a dictionary and determines if function"""
for k,v in d.items():
if len(v) == 0:
# Not a Function if No Output for Input
return False
if len(v) > 1:
# Not a Function if Input has Multiple Output
return False
:340
throw err;
^
Error: Cannot find module 'text-buffer'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/lib/node_modules/slap/lib/ui/Editor.js:10:18)
at Module._compile (module.js:456:26)
@tnsicdr
tnsicdr / keybase.md
Last active September 21, 2015 17:09

Keybase proof

I hereby claim:

  • I am seitensei on github.
  • I am seitensei (https://keybase.io/seitensei) on keybase.
  • I have a public key whose fingerprint is 9AEF C648 EF05 FCC5 8018 BBFD 1B23 9D2C 3CF5 69A0

To claim this, I am signing this object:

public GameStatus getGameStatus() {
// iterate for both players
for(int p = 0; p < 2; p++) {
int counter = 0;
// Check1
for(int r = 0; r < 3; r++) {
// rows 0,1,2
for (int c = 0; c < 3; c++) {
// columns 0,1,2