Skip to content

Instantly share code, notes, and snippets.

View gist:6b2daa526a7bec785597821ebacaa8d0
import axios from 'axios'
const API_URL = 'http://localhost:3000'
const securedAxiosInstance = axios.create({
baseURL: API_URL,
withCredentials: true,
headers: {
'Content-Type': 'application/json'
}
View json
[
{
"name": "Display",
"data": {
"id": 34566,
"category_id": 2647,
"feature_group_id": 5
},
"features": [
{
View gist:cc640c63141a14fa0a153d098e777320
SPLENDORI E MISERIE DI MADAME ROYALE
GENERALE DORME IN PIEDI, IL
QUEL MALEDETTO TRENO BLINDATO
RAGAZZA CON LA PISTOLA, LA
VEDOVO, IL
ACCATTONE
ANNI RUGGENTI, GLI
BANDA DEGLI ONESTI, LA
VOGLIA MATTA, LA
ACHTUNG! BANDITI!
View gist:7d978ef6ced229726353172dd4bad124
import Vue from 'vue/dist/vue.esm'
import ImageUpload from '../../../admin/components/commons/imageUpload.vue'
import AjaxSelect from '../../../admin/components/commons/AjaxSelect.vue'
import AjaxMultiSelect from '../../../admin/components/commons/AjaxMultiSelect.vue'
import MultiUpload from '../../../admin/components/commons/MultiUpload.vue'
import AssetList from '../../../admin/components/contents/AssetList.vue'
import Elements from '../../../admin/components/contents/Elements.vue'
import VueClipboard from 'vue-clipboard2'
Vue.use(VueClipboard)
View ostia
class Admin::ContentsController < AdminController
expose(:contents)
expose(:content)
def new
content = Content.create(author: current_user)
redirect_to edit_admin_content_path(content)
end
def edit
View gist:6c9407f4027bed45d4dbcaa3615faf22
const { environment } = require('@rails/webpacker')
const erb = require('./loaders/erb')
const { VueLoaderPlugin } = require('vue-loader')
const vue = require('./loaders/vue')
const datatables = require('./loaders/datatables')
const webpack = require('webpack')
const CKEditorWebpackPlugin = require( '@ckeditor/ckeditor5-dev-webpack-plugin' );
const { styles } = require( '@ckeditor/ckeditor5-dev-utils' );
environment.loaders.append('datatables', datatables)
View ubuntu
scriptamanent@next:~$ systemctl status next-dday-staging.service
● next-dday-staging.service - Puma HTTP Forking Server - Day staging app
Loaded: loaded (/etc/systemd/system/next-dday-staging.service; enabled; vendor preset: enabled)
Active: active (running) since ven 2018-03-23 17:35:27 CET; 31min ago
Process: 788 ExecStart=/home/scriptamanent/.rbenv/bin/rbenv exec bundle exec puma -C /home/scriptamanent/dday/dday.it/shared/config/puma.rb --daemon (code=exited, status=0/SUCCESS)
Main PID: 1046 (ruby)
CGroup: /system.slice/next-dday-staging.service
└─1046 puma 3.8.1 (unix:///home/scriptamanent/dday/dday.it/shared/tmp/sockets/dday.it-puma.sock)
mar 23 17:34:30 next systemd[1]: Starting Puma HTTP Forking Server - Day staging app...
View iframe
class RatesController < ApplicationController
def show
present Rate::Update # or your normal controller code here if you don't want to use Trailblazer Operations
respond_with op do |format|
format.html{ render text: cell(:rate, @model,current_user: user), layout: false, status: status}
end
end
end
View comments
[
{
"id": 105142,
"avatar": "test",
"commenter": "Test",
"text": "test",
"parent": null,
"created": "2015-03-20T17:21:33.013+01:00"
},
{
View gist:8af7aae2bcaa50b3a61d
angular.module('starter')
.controller('NewsCtrl', function($scope, content, $cordovaSocialSharing, $sce, $ionicModal){
$scope.news = content;
content.getList('comments').then(function (comments) {
$scope.comments = comments;
});
$ionicModal.fromTemplateUrl('templates/comments.html', {
scope: $scope,
You can’t perform that action at this time.