Skip to content

Instantly share code, notes, and snippets.

@anthonny
Last active June 9, 2016 14:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonny/96aa821535ce495c48b3 to your computer and use it in GitHub Desktop.
Save anthonny/96aa821535ce495c48b3 to your computer and use it in GitHub Desktop.
Sync for atom
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
# console.log "Saved! #{editor.getPath()}"
# Your keymap
#
# Atom keymaps work similarly to stylesheets. Just as stylesheets use selectors
# to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
# Here's an example taken from Atom's built-in keymap:
#
# 'atom-text-editor':
# 'enter': 'editor:newline'
#
# 'atom-workspace':
# 'ctrl-shift-p': 'core:move-up'
# 'ctrl-p': 'core:move-down'
#
# You can find more information about keymaps in these guides:
# * https://atom.io/docs/latest/customizing-atom#customizing-key-bindings
# * https://atom.io/docs/latest/advanced/keymaps
#
# This file uses CoffeeScript Object Notation (CSON).
# If you are unfamiliar with CSON, you can read more about it here:
# https://github.com/bevry/cson#what-is-cson
[
{
"name": "about",
"version": "1.3.0"
},
{
"name": "archive-view",
"version": "0.61.0"
},
{
"name": "asciidoc-preview",
"version": "0.6.0"
},
{
"name": "atom-beautify",
"version": "0.28.22"
},
{
"name": "atom-dark-syntax",
"version": "0.27.0",
"theme": "syntax"
},
{
"name": "atom-dark-ui",
"version": "0.51.0",
"theme": "ui"
},
{
"name": "atom-html-preview",
"version": "0.1.13"
},
{
"name": "atom-light-syntax",
"version": "0.28.0",
"theme": "syntax"
},
{
"name": "atom-light-ui",
"version": "0.43.0",
"theme": "ui"
},
{
"name": "atom-ternjs",
"version": "0.13.2"
},
{
"name": "autocomplete-atom-api",
"version": "0.10.0"
},
{
"name": "autocomplete-css",
"version": "0.11.0"
},
{
"name": "autocomplete-html",
"version": "0.7.2"
},
{
"name": "autocomplete-plus",
"version": "2.25.0"
},
{
"name": "autocomplete-snippets",
"version": "1.10.0"
},
{
"name": "autoflow",
"version": "0.27.0"
},
{
"name": "autosave",
"version": "0.23.0"
},
{
"name": "background-tips",
"version": "0.26.0"
},
{
"name": "base16-tomorrow-dark-theme",
"version": "1.1.0",
"theme": "syntax"
},
{
"name": "base16-tomorrow-light-theme",
"version": "1.1.1",
"theme": "syntax"
},
{
"name": "bookmarks",
"version": "0.38.2"
},
{
"name": "bracket-matcher",
"version": "0.79.0"
},
{
"name": "command-palette",
"version": "0.38.0"
},
{
"name": "deprecation-cop",
"version": "0.54.0"
},
{
"name": "dev-live-reload",
"version": "0.47.0"
},
{
"name": "emmet",
"version": "2.4.1"
},
{
"name": "encoding-selector",
"version": "0.21.0"
},
{
"name": "exception-reporting",
"version": "0.37.0"
},
{
"name": "find-and-replace",
"version": "0.197.4"
},
{
"name": "fuzzy-finder",
"version": "0.94.0"
},
{
"name": "git-diff",
"version": "0.57.0"
},
{
"name": "git-plus",
"version": "5.13.0"
},
{
"name": "go-to-line",
"version": "0.30.0"
},
{
"name": "grammar-selector",
"version": "0.48.0"
},
{
"name": "image-view",
"version": "0.56.0"
},
{
"name": "incompatible-packages",
"version": "0.25.0"
},
{
"name": "jsformat",
"version": "0.9.0"
},
{
"name": "keybinding-resolver",
"version": "0.33.0"
},
{
"name": "language-asciidoc",
"version": "0.12.0"
},
{
"name": "language-babel",
"version": "2.15.4"
},
{
"name": "language-c",
"version": "0.51.1"
},
{
"name": "language-clojure",
"version": "0.19.1"
},
{
"name": "language-coffee-script",
"version": "0.46.0"
},
{
"name": "language-csharp",
"version": "0.11.0"
},
{
"name": "language-css",
"version": "0.36.0"
},
{
"name": "language-gfm",
"version": "0.84.0"
},
{
"name": "language-git",
"version": "0.12.1"
},
{
"name": "language-go",
"version": "0.42.0"
},
{
"name": "language-html",
"version": "0.44.0"
},
{
"name": "language-hyperlink",
"version": "0.16.0"
},
{
"name": "language-java",
"version": "0.17.0"
},
{
"name": "language-javascript",
"version": "0.110.0"
},
{
"name": "language-json",
"version": "0.17.4"
},
{
"name": "language-less",
"version": "0.29.0"
},
{
"name": "language-make",
"version": "0.21.0"
},
{
"name": "language-mustache",
"version": "0.13.0"
},
{
"name": "language-objective-c",
"version": "0.15.1"
},
{
"name": "language-perl",
"version": "0.32.0"
},
{
"name": "language-php",
"version": "0.37.0"
},
{
"name": "language-property-list",
"version": "0.8.0"
},
{
"name": "language-python",
"version": "0.43.0"
},
{
"name": "language-ruby",
"version": "0.68.0"
},
{
"name": "language-ruby-on-rails",
"version": "0.25.0"
},
{
"name": "language-sass",
"version": "0.45.0"
},
{
"name": "language-shellscript",
"version": "0.21.0"
},
{
"name": "language-source",
"version": "0.9.0"
},
{
"name": "language-sql",
"version": "0.20.0"
},
{
"name": "language-text",
"version": "0.7.0"
},
{
"name": "language-todo",
"version": "0.27.0"
},
{
"name": "language-toml",
"version": "0.18.0"
},
{
"name": "language-xml",
"version": "0.34.2"
},
{
"name": "language-yaml",
"version": "0.25.1"
},
{
"name": "line-ending-selector",
"version": "0.3.0"
},
{
"name": "link",
"version": "0.31.0"
},
{
"name": "linter",
"version": "1.11.3"
},
{
"name": "markdown-preview",
"version": "0.157.2"
},
{
"name": "meteor-api",
"version": "2.20.0"
},
{
"name": "meteor-helper",
"version": "0.27.0"
},
{
"name": "meteor-snippets",
"version": "0.5.0"
},
{
"name": "metrics",
"version": "0.53.1"
},
{
"name": "minimap",
"version": "4.21.0"
},
{
"name": "minimap-cursorline",
"version": "0.1.0"
},
{
"name": "minimap-git-diff",
"version": "4.2.0"
},
{
"name": "monokai",
"version": "0.18.0",
"theme": "syntax"
},
{
"name": "notifications",
"version": "0.62.1"
},
{
"name": "one-dark-syntax",
"version": "1.2.0",
"theme": "syntax"
},
{
"name": "one-dark-ui",
"version": "1.1.9",
"theme": "ui"
},
{
"name": "one-light-syntax",
"version": "1.2.0",
"theme": "syntax"
},
{
"name": "one-light-ui",
"version": "1.1.9",
"theme": "ui"
},
{
"name": "open-on-github",
"version": "0.41.0"
},
{
"name": "package-generator",
"version": "0.41.0"
},
{
"name": "pigments",
"version": "0.24.1"
},
{
"name": "react",
"version": "0.14.1"
},
{
"name": "seti-syntax",
"version": "0.4.1",
"theme": "syntax"
},
{
"name": "seti-ui",
"version": "0.8.1",
"theme": "ui"
},
{
"name": "settings-view",
"version": "0.232.3"
},
{
"name": "snippets",
"version": "1.0.1"
},
{
"name": "solarized-dark-syntax",
"version": "1.0.0",
"theme": "syntax"
},
{
"name": "solarized-light-syntax",
"version": "1.0.0",
"theme": "syntax"
},
{
"name": "spell-check",
"version": "0.65.0"
},
{
"name": "status-bar",
"version": "0.83.0"
},
{
"name": "styleguide",
"version": "0.45.1"
},
{
"name": "symbols-view",
"version": "0.110.1"
},
{
"name": "sync-settings",
"version": "0.7.2"
},
{
"name": "tabs",
"version": "0.91.3"
},
{
"name": "terminal-plus",
"version": "0.14.5"
},
{
"name": "timecop",
"version": "0.33.0"
},
{
"name": "tree-view",
"version": "0.203.2"
},
{
"name": "update-package-dependencies",
"version": "0.10.0"
},
{
"name": "welcome",
"version": "0.33.0"
},
{
"name": "whitespace",
"version": "0.32.1"
},
{
"name": "wrap-guide",
"version": "0.38.1"
}
]
{
"asciidoc-preview": {
"tocType": "macro"
},
"atom-beautify": {
"_analyticsUserId": "0ee427d4-92f5-46c6-9df5-e6d89a09324f",
"beautifyEntireFileOnSave": false,
"js_keep_array_indentation": true,
"js_keep_function_indentation": true
},
"autocomplete-plus": {
"confirmCompletion": "tab and enter"
},
"core": {
"disabledPackages": [
"linter-eslint"
],
"excludeVcsIgnoredPaths": false,
"themes": [
"seti-ui",
"seti-syntax"
]
},
"editor": {
"fontSize": 12,
"invisibles": {},
"softWrap": true
},
"emmet": {},
"exception-reporting": {
"userId": "974c7f14-dcc3-de51-f13e-d87a1f7dd5b9"
},
"jsformat": {
"format_on_save": false
},
"linter": {
"showErrorPanel": false,
"subtleLinterErrors": [
"jshint"
]
},
"linter-eslint": {
"disableWhenNoEslintrcFileInPath": true,
"globalNodePath": "/usr/local",
"showRuleIdInMessage": false
},
"linter-jshint": {},
"meteor-helper": {
"settingsPath": "~/"
},
"minimap": {
"plugins": {
"cursorline": true,
"cursorlineDecorationsZIndex": 0,
"git-diff": true,
"git-diffDecorationsZIndex": 0
}
},
"pigments": {},
"react": {},
"sync-settings": {},
"terminal-plus": {
"core": {},
"style": {}
},
"travis-ci-status": {},
"tree-view": {
"hideVcsIgnoredFiles": true
},
"wakatime": {
"apikey": "d75a77e3-df9c-4316-bd36-21324d5dbed8"
},
"welcome": {
"showOnStartup": false
}
}
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
# '.source.coffee':
# 'Console log':
# 'prefix': 'log'
# 'body': 'console.log $1'
#
# This file uses CoffeeScript Object Notation (CSON).
# If you are unfamiliar with CSON, you can read more about it here:
# https://github.com/bevry/cson#what-is-cson
'.source.asciidoc':
'NOTE reveal':
'prefix': 'rnote'
'body': '''
[NOTE.speaker]
--
$1
--
'''
'.source.js':
'Template Drawjs':
'prefix': 'tjschartdraw'
'body': '''
var ctx = $("#chart").get(0).getContext("2d");
var myDoughnutChart = new Chart(ctx).Doughnut(data,{animateRotate : false, responsive : true});
'''
'Template Datajs':
'prefix': 'tjschartdata'
'body': '''
var data = [
{
value: scores.negative,
color:"#F7464A",
highlight: "#FF5A5E",
label: "Negative"
},
{
value: scores.positive,
color: "#46BFBD",
highlight: "#5AD3D1",
label: "Positive"
},
{
value: scores.neutral,
color: "#FDB45C",
highlight: "#FFC870",
label: "Neutral"
}
];
'''
'Template ReduceJs':
'prefix': 'tjschartreduce'
'body': '''
var scores = _.reduce(Tweets.find(Session.get('filter-userid')).fetch(), function(memo, tweet) {
if (tweet.sentiment) {
if (tweet.sentiment.score > 0)
memo.positive += 1;
if (tweet.sentiment.score < 0)
memo.negative += 1;
if (tweet.sentiment.score === 0)
memo.neutral += 1;
}
return memo;
}, {
positive: 0,
negative: 0,
neutral: 0
});
'''
'Template ReduceJs TopUsers':
'prefix': 'tjstopusersreduce'
'body': '''
var users = _.reduce(tweets, function (memo, tweet) {
if (!memo[tweet.user.id])
memo[tweet.user.id] = {
id: tweet.user.id,
name: tweet.user.name,
screen_name: tweet.user.screen_name,
profile_image_url: tweet.user.profile_image_url,
count: 0
};
memo[tweet.user.id].count++;
return memo;
}, []);
'''
'Template Values Sort TopUsers':
'prefix': 'tjstopuserssort'
'body': '''
return _.sortBy(users, function (tweet) {
return -tweet.count;
});
'''
'.source.css':
'Template Style':
'prefix': 'tstyle'
'body': '''
.header {
color: #ee6e73;
font-weight: 300;
}
.positive {
color: #46BFBD;
font-weight: bolder;
}
.negative {
color: #F7464A;
font-weight: bolder;
}
.neutral {
color: #FDB45C;
font-weight: bolder;
}
'''
'.text.html':
'Template Checkbox':
'prefix': 'tcheckbox'
'body': '''
{{#if currentUser}}
<!-- Switch -->
<div class="switch right-align">
<label><input type="checkbox" {{isTweetVisible}}>
<span class="lever"></span>
</label>
</div>
{{/if}}
'''
'Template Nav':
'prefix': 'tnav'
'body': '''
<nav>
<div class="nav-wrapper container">
<a href="#" class="brand-logo">Tweetiments</a>
</div>
</nav>
'''
'Template Tweet':
'prefix': 'ttweet'
'body': '''
<div class="row">
<div class="col">
<div class="card blue-grey darken-1 z-depth-2">
<div class="card-content white-text">
<span class="card-title">
<div class="row valign-wrapper">
<div class="col s2">
<img src="{{user.profile_image_url}}" alt="" class="circle responsive-img valign"> <!-- notice the "circle" class -->
</div>
<div class="col s10">
<span class="valign">
{{user.name}}
</span>
</div>
<div class="col s2">
<i class="mdi-social-mood left"></i>
</div>
</div>
</span>
<p>{{text}}</p>
</div>
<div class="card-action">
<a href="https://twitter.com/{{user.screen_name}}" target="_blank">{{user.screen_name}}</a>
</div>
</div>
</div>
</div>
'''
'Template Chart':
'prefix': 'tchart'
'body': '''
<h2 class="header">Graphique</h2>
<div class="row">
<div class="col s12 m8 l8 offset-m2 offset-l2">
<canvas id="chart" width="400" height="400"></canvas>
</div>
<div class="col s12 m8 l8 offset-m2 offset-l2">
<p class="center-align">{{count}} tweets</p>
</div>
</div>
'''
'Template Tweets':
'prefix': 'ttweets'
'body': '''
<div class="row">
<div class="col s12 m6">
<h2 class="header">Last tweets</h2>
{{#each tweets}}
{{> tweet}}
{{/each}}
</div>
</div>
'''
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed.
*
* If you are unfamiliar with LESS, you can read more about it here:
* http://www.lesscss.org
*/
atom-workspace .asciidoc-preview {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment