Skip to content

Instantly share code, notes, and snippets.

💭
__

Dreftymac dreftymac

💭
__
Block or report user

Report or block dreftymac

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
@dreftymac
dreftymac / 0_reuse_code.js
Created May 8, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View index.html
<!doctype html>
<html ng-app="project">
<head>
<title>Angular: Service example</title>
<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<script>
var projectModule = angular.module('project',[]);
projectModule.factory('theService', function() {
return {
View example_non_styled.yml
# default boring output of Psych.dump
---
:response:
:body: ! "{\n \"page\": 1,\n \"results\": [\n \"item\", \"another\"\n ],\n
\ \"total_pages\": 0\n}\n"
:status: 200
:person:
name: Steve
age: 24
:array:
@dreftymac
dreftymac / bandname
Created Jun 15, 2015
bandname limbic resistance
View bandname
limbic resistance
@dreftymac
dreftymac / tymac_komodo_addon.js
Created Aug 30, 2015
tymac_komodo_addon ;; komodo 8 addon library
View tymac_komodo_addon.js
// <reg-file_info>
// main:
// - date: created="Sat Jan 09 06:05:56 2010"
// last: lastmod="2015-03-20 03:34:17"
// name: tymac_komodo_addon
// license: Attribution-Share Alike ;; http://creativecommons.org/licenses/by-sa/3.0/us/
// contact: dreftymac
// desc: |
// tymac_komodo_addon.js
// general-purpose addon library for use with komodoedit
@dreftymac
dreftymac / helloworld.php
Last active Nov 24, 2015
helloworld.php
View helloworld.php
<?php
header("Content-Type:text/html; charset=utf-8");
print "hello world";
View DreftymacQuikpayString
### ------------------------------------------------------------------------
## {
module DreftymacQuikpayString
## {
module Base
## {
def str_is_not_valid
"__Invalid #{self.to_s}__"
end
@dreftymac
dreftymac / DreftymacAddonString
Last active Dec 20, 2015
Ruby string expando methods
View DreftymacAddonString
## main:
## - date: created="Monday, September 10, 2012, 11:13:12 AM"
## last: lastmod="Mon Jun 23 14:20:15 2014"
## desc: |
## Ruby String Addon methods
##
## seealso:
## href="./DreftymacAddonStringTest.rb"
## tymacid://tryruby.myruby.dreftymac.DreftymacAddonString.rb
## https://gist.github.com/dreftymac/6059176
View tss3_SiteId
## SITE_ID ;; (error-correcting addon)
def tss3_SiteId(row)
if ( false ||
row['tss2_MachineDept']=='cfc' ||
row['tss2_MachineDept']=='chc' ||
row['tss2_MachineDept']=='ctl' ||
row['tss2_MachineDept']=='economics' ||
row['tss2_MachineDept']=='lundquistcollegeofbusiness' ||
row['tss2_MachineDept']=='materialscience' ||
row['tss2_MachineDept']=='schoolofmusicanddance' ||
You can’t perform that action at this time.