Skip to content

Instantly share code, notes, and snippets.

Avatar
😅
Always learning

serena serenaf

😅
Always learning
View GitHub Profile
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
View components.collapsible-panel-body.js
import Ember from 'ember';
export default Ember.Component.extend({
});
View components.child-elements.click-attribute.js
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
stopPropagationAndLog(event) {
// This action has access to the DOM event and can call
// stopPropagation on it to prevent the event from bubbling.
event.stopPropagation();
this.get('log')(`clickAttribute w/ stopPropagation of ${this.get('parentName')}`);
}
View gist:8dd2ff9d7bb94445de45a32f06f461cd
opt_ins = []
App.find_each do |app|
if app.can_use_feature?(:welcome_message) && !app.can_use_feature?(:visitor_auto_messaging) && PermittedLanguage.where(app_id: app.id).count > 1
opt_ins << app.id
end
end
opt_ins
app = a 6
@serenaf
serenaf / 2015-01-17-twitter-fave-german
Created Jul 26, 2015
German Translation of CSS Animations
View 2015-01-17-twitter-fave-german
---
layout: post
bodyClass: shorter
title: Twitter's "fave" Animation
description: Erfahren Sie wie Twitters schicke, neue 'fav' Animation funktioniert, mit Hilfe der CSS steps() Zeitfunktion.
categories: [animation, tips, transition, steps]
customCSS: twitter_fave.css
imageURL: /assets/images/posts/steps/twitter_fave_rectangle.png
source: https://raw.githubusercontent.com/cssanimation/posts/master/2015-01-17-twitter-fave.md
home_image: /assets/images/posts/steps/home.png
View numbers.txt
955
991
625
76
881
105
570
533
518
180
View flatten_array.py
def flatten_array( array, result ):
""" if the array is empty then return [] """
if not array:
return []
else:
for a in array:
""" if the current index is a number, take this number as part of the flattened result """
if(isinstance(a,int)):
result.append(a)
else:
View WHO_mental_health_data.csv
country policy plan legislation expenditures psychatrists suizideRateM suizideRat F suizideRateTotal
Afghanistan 1 1 1 * 0.16 6.2 5.3 5.7
Albania 1 1 1 * 1.83 6.6 5.2 5.9
Algeria 1 1 1 7.37 1.55 2.3 1.5 1.9
Angola 0 1 0 * 0.02 20.7 7.3 13.8
Argentina 1 1 0 * * 17.2 4.1 10.3
Armenia 0 0 1 3.38 4.04 5 0.9 2.9
Australia 1 1 1 7.64 12.76 16.1 5.2 10.6
Austria 0 1 1 * 19.71 18.2 5.4 11.5
Azerbaijan 1 1 1 2.5 5.08 2.4 1 1.7
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Loading CSV Data with D3</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script>
</head>
<body>
<svg width="675" height="150">
@serenaf
serenaf / WHO Mental Health Data.csv
Last active Aug 29, 2015
WHO Mental Health Data Set
View WHO Mental Health Data.csv
Country Policy Plan Legislation Expenditures in % Psychatrists Suizide Rate M Suizide Rate F Suizide Rate Total
Afghanistan 1 1 1 * 0.16 6.2 5.3 5.7
Albania 1 1 1 * 1.83 6.6 5.2 5.9
Algeria 1 1 1 7.37 1.55 2.3 1.5 1.9
Angola 0 1 0 * 0.02 20.7 7.3 13.8
Argentina 1 1 0 * * 17.2 4.1 10.3
Armenia 0 0 1 3.38 4.04 5 0.9 2.9
Australia 1 1 1 7.64 12.76 16.1 5.2 10.6
Austria 0 1 1 * 19.71 18.2 5.4 11.5
Azerbaijan 1 1 1 2.5 5.08 2.4 1 1.7