Skip to content

Instantly share code, notes, and snippets.

View nickeblewis's full-sized avatar
💭
Looking for contracts/freelance gigs

Nick Lewis nickeblewis

💭
Looking for contracts/freelance gigs
View GitHub Profile
{
"data": {
"faves": {
"statuses": [
{
"text": "It's a final #TeamBenson farewell to the Merlin helicopter today. Blue skies, fair winds and following seas \n#avgeek https://t.co/6vRA5CGUEQ"
},
{
"text": "https://t.co/VhYw3jU9rv has a fresh new look! We've relaunched our website today, so come and explore...#Countryfile https://t.co/E99nsnxf1c"
},
1. Build GraphQL server using `express-graphql` package.
2. Configure `schema.js` file.
3. Query for data.
@nickeblewis
nickeblewis / readme.md
Last active September 11, 2015 15:18
A small Node app that publishes a new comment to a Trello card every 5 minutes

Go to https://github.com/PotOfCoffee2Go/simply-trello and follow the steps thre about key and token generation

  • Create a new directory
  • $npm init (follow the steps)
  • npm install simply-trello later
  • node try-simply-trello

NOTE: may need to npm node-trello but I think simply-trello adds it as a dependency

@nickeblewis
nickeblewis / trello-css-guide.md
Last active August 29, 2015 14:26 — forked from bobbygrace/trello-css-guide.md
Trello CSS Guide

Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

This is where any fun you might have been having ends. Now it’s time to get serious and talk about rules.

Writing CSS is hard. Even if you know all the intricacies of position and float and overflow and z-index, it’s easy to end up with spaghetti code where you need inline styles, !important rules, unused cruft, and general confusion. This guide provides some architecture for writing CSS so it stays clean and ma

@nickeblewis
nickeblewis / index.html
Last active August 29, 2015 14:20
Angular-Pusher
<!doctype html>
<html ng-app="priceApp">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
<script src="http://js.pusher.com/2.2/pusher.min.js"></script>
<script src="https://cdn.jsdelivr.net/angular.pusher/latest/pusher-angular.min.js"></script>
<script src="index.js"></script>
</head>
<body>
<h2>Prices</h2>
.table {
border: 0 !important;
}
.gsbaskettable {
cursor: pointer;
.header {
background-color: #ccc;
border-color: #ddd;
.sectionHeader {
@nickeblewis
nickeblewis / gist:f092fa42226bf5f738b0
Created January 20, 2015 14:56
Firebase - how to perform nested queries to get grandchildren who are equal to 10
var fathersRef = new Firebase('https://your.firebaseio.com');
fathersRef.on('child_added', function(fatherSnap) {
fatherSnap.ref().on('child_added', function(childSnap) {
childSnap.ref().orderByChild('age').equalTo(10).on('child_added', function(grandchildSnap) {
\\ Do something with the grandchild
var grandChild = grandchildSnap.val();
});
@nickeblewis
nickeblewis / btn-group.html
Created January 19, 2015 16:21
A bootstrap "component" that shows the date with a left and right arrow either side
<div class="btn-group">
<button class="btn" runat="server" onserverclick="btnPreviousDate_OnClick"><i class="glyphicon glyphicon-chevron-left"></i></button>
<button class="btn"><asp:Label runat="server" ID="lblCurrentNavDate" /></button>
<button class="btn" runat="server" onserverclick="btnNextDate_OnClick"><i class="glyphicon glyphicon-chevron-right"></i></button>
</div>
@nickeblewis
nickeblewis / _buttons.less
Last active August 29, 2015 14:13
some great Less code for providing different sized custom bootstrap buttons based on device screen size that I wrote whilst working at Gladstone
.custom-button(@color, @bg, @border) {
.button-variant(@color; @bg; @border);
}
@desktop: 160px;
@mobile: 80px;
.btn-custom-success
{
.custom-button(@btn-success-color; @btn-success-bg; @btn-success-border);
@nickeblewis
nickeblewis / gist:336d78c7f4188e98fcf0
Created January 15, 2015 23:14
Firebase security rules
{
"rules": {
"locations": {
// Allow anyone to read and write to this node (assuming they respect the schema below)
".read": true,
".write": true,
// Index each location's geohash for faster querying
".indexOn": ["g"],