Skip to content

Instantly share code, notes, and snippets.

View mikelyons's full-sized avatar
🌏
Write the code, change the world

Mike Lyons mikelyons

🌏
Write the code, change the world
View GitHub Profile
@sapegin
sapegin / Gruntfile.coffee
Last active January 29, 2016 13:35
How to use Autoprefixer plugin for Stylus with grunt-contrib-stylus
grunt.initConfig
stylus:
options:
use: [
() -> require('autoprefixer-stylus')('last 2 versions', 'ie 8')
]
compile:
files:
'build/styles.css': 'styles/index.styl'
@irazasyed
irazasyed / Install Composer using MAMP's PHP.md
Last active April 5, 2025 13:08
Instructions on how to change preinstalled Mac OS X PHP to MAMP's PHP Installation and then install Composer Package Management

Change default Mac OS X PHP to MAMP's PHP Installation and Install Composer Package Management


Instructions to Change PHP Installation


First, Lets find out what version of PHP we're running (To find out if it's the default version).

To do that, Within the terminal, Fire this command:

which php

@nodesocket
nodesocket / bootstrap.flatten.css
Last active April 1, 2021 23:37
Below are simple styles to "flatten" bootstrap. I didn't go through every control and widget that bootstrap offers, only what was required for https://commando.io, so your milage may vary.
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active March 21, 2025 15:01
Backend Architectures Keywords and References
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 5, 2025 13:05
A badass list of frontend development resources I collected over time.
@mdobson
mdobson / gist:5814607
Last active December 18, 2015 16:49
Set cell text to book title
NSString *title = _objects[indexPath.row][@"title"];
NSString *author = _objects[indexPath.row][@"author"];
cell.textLabel.text = title;
cell.detailTextLabel.text = author;
@mdobson
mdobson / gist:5808465
Last active December 18, 2015 15:59
Initialize our UserGrid client
self.client = [[UGClient alloc] initWithOrganizationId:orgName withApplicationID:appName];
@mdobson
mdobson / gist:5807384
Last active December 18, 2015 15:49
Retrieving all books without a query.
//Getting all of your books without a filtering query.
UGClientResponse *result = [self.client getEntities:@"book" query:nil];
if (result.transactionState == kUGClientResponseSuccess) {
_objects = result.response[@"entities"];
} else {
_objects = @[];
}
@mdobson
mdobson / gist:5807377
Last active December 18, 2015 15:49
Deleting a book
NSDictionary *entity = [_objects objectAtIndex:indexPath.row];
UGClientResponse * response = [self.client removeEntity:@"book" entityID:entity[@"uuid"]];
if (response.transactionState == kUGClientResponseSuccess) {
[tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
@mdobson
mdobson / gist:5807345
Last active December 18, 2015 15:49
create book in obj-c
UGClientResponse *response = [self.client createEntity:book];
//Lets check if our response was accepted by the server, and add the created object to a collection called _objects
if (response.transactionState == kUGClientResponseSuccess) {
[_objects insertObject:response.response[@"entities"][0] atIndex:0];
}