Skip to content

Instantly share code, notes, and snippets.

View devotox's full-sized avatar
💻
Innovating

Devonte devotox

💻
Innovating
View GitHub Profile
@devotox
devotox / Radio2_Check2.js
Last active December 20, 2015 04:19
Like Select2 ... for radios and checkboxes
(function ($, window, undefined) {
$.fn.extend({
check2: function(option){
option = option || 'create';
var conf = {
check2Class: 'check2',
offscreenClass: 'offscreen',
fontSize: '1.2em'
};
@devotox
devotox / config.fish
Last active August 29, 2015 14:04 — forked from jimmed/config.fish
# Aliases to common git methods
function gs; git status --short $argv; end;
function gd; git diff --color $argv; end;
function gf; git fetch -p; end;
function gpl; git pull $argv; end;
function gps; git push $argv; end;
function gch; git checkout $argv; end;
function gb; git branch $argv; end;
function ga; git add $argv; end;
function gco; git commit -m $argv; end;
@devotox
devotox / gist:7ff1638c166f4f1f7c18
Last active August 29, 2015 14:26 — forked from dsibilly/gist:2992412
Node.js clustered HTTP server example
(function () {
'use strict';
var cluster = require('cluster'),
http = require('http'),
os = require('os'),
/*
* ClusterServer object
function () {
'use strict';
var cluster = require('cluster'),
http = require('http'),
os = require('os'),
ClusterServer,
(function () {
'use strict';
var cluster = require('cluster'),
http = require('http'),
os = require('os'),
ClusterServer,
workers = {};
/*
@devotox
devotox / build_nginx.sh
Last active January 31, 2016 22:48 — forked from MattWilcox/build_nginx.sh
Fetch, build, and install the latest nginx with the latest OpenSSL for RaspberryPi
#!/usr/bin/env bash
# names of latest versions of each package
export VERSION_PCRE=pcre-8.38
export VERSION_OPENSSL=openssl-1.0.2f
export VERSION_NGINX=nginx-1.9.10
# URLs to the source directories
export SOURCE_OPENSSL=https://www.openssl.org/source/
export SOURCE_PCRE=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
@devotox
devotox / adapters.application.js
Created July 13, 2016 07:55 — forked from pangratz/adapters.application.js
findRecord with slug support
import Adapter from "ember-data/adapters/json-api";
export default Adapter.extend({
urlForQueryRecord({ slug }, modelName) {
if (slug) {
return this.urlForFindRecord(slug, modelName);
}
return this._super(...arguments);

Keybase proof

I hereby claim:

  • I am devotox on github.
  • I am dtox (https://keybase.io/dtox) on keybase.
  • I have a public key ASAF403OlS8hip1EaVEIyBGOASW6pkgX6hW7PYYjpPFmsgo

To claim this, I am signing this object:

@devotox
devotox / README.md
Last active June 5, 2021 06:36
Ember Engines With Ember Simple Auth

Using Ember Simple Auth with Ember Engines (In Repo Engine)

  • This shows the steps needed to get Ember Simple Auth to work with Ember Engines as if they are the same application

  • Things to note

    • engine login page needs to transitionToExternal('login')
    • login has to be passed in as an external route to the engine
    • session and cookie services both need to be passed into engine
    • sessionAuthenticated function needs to be overwritten in the Application Controller of the Engine
  • in /app/app.js add to const engines object { [Engine Name]: dependencies }

@devotox
devotox / fastboot-on-visit
Created September 14, 2017 01:42
Ember Fastboot onVisit Middleware
// ember-cli-fastboot/index.js
let fastbootMiddleware = FastBootExpressMiddleware({
+ onVisit: fastbootConfig.onVisit,
fastboot: this.fastboot
});
// fastboot-express-middleware/src/index.js
function fastbootExpressMiddleware(distPath, options) {
return function(req, res, next) {