Skip to content

Instantly share code, notes, and snippets.

@kylekeesling
kylekeesling / keybase.md
Created August 14, 2014 16:00
keybase.md

Keybase proof

I hereby claim:

  • I am kylekeesling on github.
  • I am kylekeesling (https://keybase.io/kylekeesling) on keybase.
  • I have a public key whose fingerprint is 4011 27E5 ADB2 5CC7 FC50 FF9C D906 21B5 5F82 D202

To claim this, I am signing this object:

@kylekeesling
kylekeesling / bootstrap-responsive-btn-group.scss
Last active August 29, 2015 14:27
Bootstrap 3 Responsive Button Group
@media (max-width: $screen-xs-max) {
.btn-group-responsive {
width: 100%;
margin-bottom: 10px;
.pull-left, .pull-right { float: none; }
.btn {
border-radius: $btn-border-radius-small !important;
display: block;
width: 100%;
padding-right: 0;
@kylekeesling
kylekeesling / Old TableSorter Indicators
Created November 24, 2011 19:50
Incorporate Bootstrap Styling into Sortable Table Helper
Link to older version of the asset on github:
https://github.com/twitter/bootstrap/raw/96c3e709963516a06ad6e723a7bba3fbf5fc1ba2/assets/img/tablesorter-indicators.png
@kylekeesling
kylekeesling / unsub_unengage_subs.js
Created April 11, 2012 18:04
ExactTarget - Self-Cleansing List - Unengaged Subscribers
<script runat="server" language="javascript">
Platform.Load("Core","1");
//Self-Cleansing List
var selfCleansinglist = List.Init("auto_cleansing_list");
var status;
//Newly Refreshed Group that Contains Unengaged Subscribers
var unengagedGroup = List.Init('unengaged_subscribers_group');
@kylekeesling
kylekeesling / ssjs.js
Created April 20, 2012 16:05
Using Portuguese in SSJS
<script runat="server" language="javascript">
Platform.Load("Core","1");
var requestsDE = DataExtension.Init("bz-solcon-requests");
var triggeredSend = TriggeredSend.Init("bsrf");
requestsDE.Rows.Add({
repName: Request.GetFormField('repName'),
companyName: Request.GetFormField('companyName'),
@kylekeesling
kylekeesling / already-sent-to.sql
Created December 14, 2012 20:49
Query that uses ExactTarget Data Views to find all subcribers who've been sent to today. Also includes an optional qualifier to ignore emails that you may use on a seed list
SELECT DISTINCT
SubscriberKey
FROM _Sent
WHERE
DATEDIFF(day, EventDate, GETDATE()) = 0
AND SubscriberKey NOT IN ('email1@et.com','email2@et.com''email3@et.com')
@kylekeesling
kylekeesling / pets.rb
Last active November 6, 2015 15:41
Example of a Complex Array of Hashes and how to use Enumerable methods on it
$pets = []
$pets << {
:name => 'Lallo',
:nocturnal => false,
:breed => 'Schnauzer',
:talents => ['napping', 'rolling over', 'playing dead'],
:legs => 4
}
$pets << {
(1..1000).each do |number|
if number % 7 == 0
puts "#{number} is divisible by 7"
end
end
# Expected output:
# YOU ARE x YEARS OLD IN DOG YEARS
# Calculate dog years:
# 1 dog year = 7 human years
puts "Hello there, what's your age?"
user_age = gets
dog_years = user_age.to_i * 7
output_string = "you are #{dog_years} years old in dog years"
@kylekeesling
kylekeesling / grandma.rb
Created November 10, 2015 19:55
Deaf Grandma
chatting = true
byes = 0
while chatting
puts "Ask Grandma a question:"
said = gets.chomp!
if said == "BYE"
byes += 1
if byes > 2
chatting = false
else