Skip to content

Instantly share code, notes, and snippets.

Margus Pärt mxrguspxrt

Block or report user

Report or block mxrguspxrt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mxrguspxrt
mxrguspxrt / Network.cpp
Created Oct 23, 2016 — forked from mkroman/Network.cpp
Uncrustify configuration inspired by Google's C++ styleguide.
View Network.cpp
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include <string.h>
#include <iostream>
#include <stdarg.h>
#include <stdio.h>
View example of code.cpp
// Example program
#include <iostream>
#include <string>
using namespace std;
class Inimene {
@mxrguspxrt
mxrguspxrt / ammado.rb
Last active Dec 16, 2017
Ammado API example for Ruby (& Rails)
View ammado.rb
# Code repository: https://github.com/mxrguspxrt/ammado
# GEM: https://rubygems.org/gems/ammado
# Documentation: http://www.rubydoc.info/gems/ammado/1.0.1
@mxrguspxrt
mxrguspxrt / Preferences.sublime-settings
Last active Dec 21, 2015
Preferences.sublime-settings
View Preferences.sublime-settings
{
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
"*.dds",
View reio-on-omo.js
var App = {
Init: function (data) {
$("#devicetypes").change(App.DeviceTypeChanged);
$("#makes").change(App.MakeChanged);
$("#models").change(App.ModelChanged);
$(".conditions").change(App.ConditionChanged);
App.PopulateDefaulListValues(1, 13);
View Preferences.sublime-settings
// Settings in here override those in "Default/Preferences.sublime-settings",
// and are overridden in turn by file type specific settings.
{
"tab_size": 2,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"detect_indentation": false
}
View css.css
.menu a {
display: block;
}
.form-control {
margin-bottom: 20px;
width: 100%;
}
.form-control .fa {
@mxrguspxrt
mxrguspxrt / controller.js
Last active Aug 29, 2015
Creating assocations
View controller.js
// you have to have assocations defined and in view you can check isDirty
// it is automatically pushed to your assocation (in our case order)
actions: {
addOrderProduct: function() {
var order = this.get("controllers.order.model");
var orderProduct = this.store.createRecord("orderProduct", {order: order});
return orderProduct;
}
}
@mxrguspxrt
mxrguspxrt / gist:4644d0397b89bb8d2ff1
Created Oct 4, 2014
Ember HashTransform for Grapho,
View gist:4644d0397b89bb8d2ff1
App.HashTransform = DS.Transform.extend({
deserialize: function(serialized) {
return serialized || {}
},
serialize: function(deserialized) {
return deserialized || {}
}
});
@mxrguspxrt
mxrguspxrt / yo-mvc.js
Last active Aug 29, 2015
just saving
View yo-mvc.js
var Yo = function(){}
Yo.Application = function(){
this.Router = null;
this.Controllers = {};
this.Views = {};
this.Repositories = {};
this.Models = {};
}
You can’t perform that action at this time.