Skip to content

Instantly share code, notes, and snippets.

Avatar

Stefan Neculai stefanneculai

View GitHub Profile
@stefanneculai
stefanneculai / index.html
Created Nov 9, 2018
Froala Editor with Webpack 4
View index.html
<!doctype html>
<html>
<head>
<title>Froala with Webpack</title>
</head>
<body>
<div id="editor"></div>
@stefanneculai
stefanneculai / FileUpload.java
Created Apr 27, 2017 — forked from florinpopescu/FileUpload.java
Froala WYSIWYG Editor - Java integration example
View FileUpload.java
package com.froala.examples.servlets;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.annotation.MultipartConfig;
@stefanneculai
stefanneculai / AWS_CONFIG.rb
Last active Jun 26, 2019
Amazon Signature Ruby
View AWS_CONFIG.rb
AWS_CONFIG = {
'access_key_id' => YOUR_ACCESS_KEY,
'secret_access_key' => YOUR_SECRET_ACCESS_KEY,
'bucket' => 'froala',
'acl' => 'public-read',
'key_start' => 'uploads/',
'region' => 's3' # For other regions than us-east-1, use s3-region. E.g.: s3-eu-west-1
}
View hr.js
/*!
* froala_editor v1.2.3 (http://editor.froala.com)
* Copyright 2014-2014 Froala
*/
/**
* Croatian.
*/
$.Editable.LANGS['hr'] = {
View Froala Hebrew
/*!
* froala_editor v1.1.7 (http://editor.froala.com)
* Copyright 2014-2014 Froala
*/
/**
* French
*/
$.Editable.LANGS['he'] = {
@stefanneculai
stefanneculai / image_upload.js
Created Feb 5, 2014
Image upload using Froala WYSIWYG editor
View image_upload.js
$(function() {
$('.selector').editable({
// Set the image upload parameter.
imageUploadParam: 'file_param',
// Set the image upload URL.
imageUploadURL: '/upload_path',
// CORS. Only if needed.
crossDomain: false,
View gist:7695620
#!/bin/bash
# This script does the following:
# 1/ capture and download the latest backup
# 2/ load it to your local database
# Just replace any uppercase string with your own data
#
# CAPTURE
@stefanneculai
stefanneculai / gist:5890109
Last active Dec 19, 2015
Generate Disqus SSO payload using Ruby
View gist:5890109
require 'rubygems'
require 'base64'
require 'cgi'
require 'openssl'
require "json"
DISQUS_SECRET_KEY = '<YOUR_SECRET_KEY>'
DISQUS_PUBLIC_KEY = '<YOUR_PUBLIC_KEY>'
def get disqus_sso(user)