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
# Assignment: | |
number = 42 | |
opposite = true | |
# Conditions: | |
number = -42 if opposite | |
# Functions: | |
square = (x) -> x * x |
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
<!-- copy this to YOUR_THEME.tmTheme--> | |
<dict> | |
<key>name</key> | |
<string>diff: deleted</string> | |
<key>scope</key> | |
<string>markup.deleted</string> | |
<key>settings</key> | |
<dict> | |
<key>background</key> | |
<string>#EAE3CA</string> |
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
/* | |
* Basic implementation of methods needed to receive swiped credit card data with javascript. | |
* | |
* NOTE: PCI compliance specifies that card data must never be stored in an unencrypted manner, and | |
* only certain pieces of card data can be stored persistently. Ensure that output logging is NOT | |
* stored persistently when using this file, as it contains console.log messages that are intended | |
* to educate the user, and these messages contain data that may compromise your PCI compliance posture. | |
* | |
* If you choose to use any of this code with real credit card data, it is your responsibility | |
* to remove all log statements, output, or other code that may serve to persist offending information. |
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
Number::truncate = (decimal_places) -> | |
factor = Math.pow(10, decimal_places) | |
Number(Math.ceil(this * factor) / factor).toFixed decimal_places | |
String::sanitize = -> | |
@replace /[A-Za-z$-,]/g, "" | |
class Boarding.Helpers.BoardingManager extends Backbone.Events | |
token: null | |
permissions: null |
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
#!bash | |
# | |
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |
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
#!bash | |
# | |
# git-flow-completion | |
# =================== | |
# | |
# Bash completion support for [git-flow](http://github.com/nvie/gitflow) | |
# | |
# The contained completion routines provide support for completing: | |
# | |
# * git-flow init and version |
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
# bash/zsh git prompt support | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# This script allows you to see the current branch in your prompt. | |
# | |
# To enable: | |
# | |
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh). |
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
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="VirtualTerminal.Login" %> | |
<!DOCTYPE html> | |
<html> | |
<head runat="server"> | |
<link rel="stylesheet" type="text/css" href="https://raw.github.com/twbs/bootstrap/master/dist/css/bootstrap.min.css"/> | |
<style type="text/css"> | |
article { | |
font-family: helvetica; |
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
module SpreeGateway | |
class Engine < Rails::Engine | |
engine_name 'spree_gateway' | |
config.autoload_paths += %W(#{config.root}/lib) | |
# use rspec for tests | |
config.generators do |g| | |
g.test_framework :rspec | |
end |
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
// 1. App starts | |
// 2. If user is not logged in, rootViewController presents loginViewController (Code below) | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
... | |
// Now check for authentication | |
[self checkIfLoggedIn]; | |
... | |
return YES; | |
} |
OlderNewer