Skip to content

Instantly share code, notes, and snippets.

Mirko Akov mupkoo

Block or report user

Report or block mupkoo

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
View crud_controller.rb
class CrudController < ApplicationController
def status
# Do some action
end
end
View DDOS-Client-info.md

DDOS Client info

Criminals have laid siege to our networks using what's called a distributed denial-of-service attack (DDoS) starting at #{time}. The goal is to make #{app}, and the rest of our services, unavailable by flooding the network with bogus requests, so nothing legitimate can come through. This attack was launched together with a blackmail attempt that sought to have us pay to avoid this assault.

Note that this attack targets the network link between our servers and the internet. All the data is safe and sound, but nobody is able to get to it as long as the attack is being successfully executed. This is like a bunch of people blocking the front door and not letting you into your house. The contents of your house are safe -- you just can’t get in until they get out of the way.

We're doing everything we can with the help of our network providers to mitigate this attack and halt the interruption of service. We're also contacting law enforcement to track down the criminals responsible. But in the m

@mupkoo
mupkoo / google_analytics.coffee
Last active Mar 20, 2016
Google Analytics snippet for Turbolinks
View google_analytics.coffee
class @GoogleAnalytics
@load: ->
# Load the analytics code
window['GoogleAnalyticsObject'] = 'ga'
window['ga'] = window['ga'] || ->
(window['ga'].q = window['ga'].q || []).push arguments
window['ga'].l = 1 * new Date()
# Add the script
@mupkoo
mupkoo / facebook.coffee
Last active Mar 15, 2018
Facebook Like snippet for Turbolinks
View facebook.coffee
class @Facebook
rootElement = null
eventsBound = false
@load: ->
unless $('#fb-root').size() > 0
initialRoot = $('<div>').attr('id', 'fb-root')
$('body').prepend initialRoot
View application_controller.rb
class ApplicationController < ActionController::Base
include HttpAuthConcern
# the rest of your code
end
View ember-belongsTo.js
App.User = DS.Model.extend({
name: DS.belongsTo('name', { embedded: true }),
email: DS.attr('string')
});
App.Name = DS.Model.extend({
first: DS.attr('string'),
last: DS.attr('string')
});
@mupkoo
mupkoo / application.hbs
Last active Aug 29, 2015
Ember Notifications component
View application.hbs
{{! Rest of the file is omited }}
<div class="notifications">
{{#each controllers.notifications.notifications}}
{{system-notification content=this}}
{{/each}}
</div>
{{! Rest of the file is omited }}
@mupkoo
mupkoo / line-numbers.js
Created Jun 24, 2014
PrismJS line numbers tweak for Ghost
View line-numbers.js
Prism.hooks.add("after-highlight", function(e) {
var el = e.element,
t = el.parentNode;
// Add 'line-numbers' class to the parent
if (el.className.indexOf('line-numbers') !== -1) {
t.className = t.className + ' line-numbers';
}
// The rest of the plugin
@mupkoo
mupkoo / auth.js
Created Sep 2, 2014
app/initializers/auth.js
View auth.js
// app/initializers/auth.js
import AuthManager from 'ivry/lib/auth/manager';
export default {
name: 'auth',
initialize: function(container, app) {
var manager = AuthManager.create();
@mupkoo
mupkoo / console-error
Last active Aug 29, 2015
Ember Flash messages view
View console-error
Uncaught TypeError: Cannot read property 'send' of undefined vendor.js:32923
You can’t perform that action at this time.