Skip to content

Instantly share code, notes, and snippets.

@gary1410
gary1410 / contructors.java
Last active February 28, 2017 18:02
Understanding Constructors and keyword this in Java
The syntax for coding constructors
// the instance variables
private String code;
private String description;
private double price;
### Example1: A constructor that assigns default values
public Product() {
@gary1410
gary1410 / filetree.md
Last active May 19, 2016 21:42
custom theming
  .
  └── mytheme
      ├── mytheme.info.yml
      ├── mytheme.libraries.yml

└── style.css

@gary1410
gary1410 / index.html
Created September 9, 2015 05:08
angular
<!DOCTYPE html>
<html>
<head>
<title>GTC Sessions</title>
<link rel="stylesheet" href="stylesheets/bootstrap.min.css">
<link rel="stylesheet" href="stylesheets/bootstrap-responsive.min.css">
<link rel="stylesheet" href="stylesheets/main.css">
<script type="text/javascript" src="javascripts/angular.min.js"></script>
<script type="text/javascript" src="javascripts/gtc-sessions-app/app.js"></script>
namespace ZenDeskSync
{
public class NewUser
{
public User user { get; set; }
}
public class User
{
public string name { get; set; }
public string email { get; set; }
  • Test

  • wtf

  • Figure out wormholes

  • Call @arfon

  • Research (docs)

  • Build prototype #15

  • Test run #43 @world-domination/time-travel

  • ...?

  • Profit!

@gary1410
gary1410 / gist:9203618
Created February 25, 2014 06:09
SQL command
SELECT obsr.id AS Observation_Read_ID,
rd.id AS Reader_ID,
rd.email AS READER_Email
ind.Code AS Indicator_corde
evds.description
FROM evidence_scores evds
LEFT JOIN indicator_scores inds
on evds.indicator_score_id = doms.id
LEFT JOIN domain_scores doms
on doms.observation_read_id = obsr.id
@gary1410
gary1410 / 0_reuse_code.js
Created February 6, 2014 18:02
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@gary1410
gary1410 / sublime
Created February 6, 2014 03:05
sublime key bindings
/*
On OS X, basic text manipulations (left, right, command+left, etc) make use of the system key bindings,
and don't need to be repeated here. Anything listed here will take precedence, however.
*/
[
{ "keys": ["super+shift+n"], "command": "new_window" },
{ "keys": ["super+shift+w"], "command": "close_window" },
{ "keys": ["super+o"], "command": "prompt_open" },
{ "keys": ["super+shift+t"], "command": "reopen_last_file" },
{ "keys": ["super+alt+up"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "h", "ipp", "inl", "m", "mm"]} },
class Array
def my_map &block
raise unless block_given?
new_array = [];
self.each do |element|
new_array << yield(element)
end
new_array
end