Skip to content

Instantly share code, notes, and snippets.

Avatar

Nicolas Mérouze nmerouze

View GitHub Profile
View fail.js
class MyEditor {
onPaste = (_event, paste, state) => {
if (paste.type === "text" && isUrl(paste.text) && state.isCollapsed) {
return (
state
.transform()
.insertText(paste.text)
.extend(0 - paste.text.length)
.wrapInline({
type: "link",
View conn_case.ex
defmodule Dd.Web.ConnCase do
use ExUnit.CaseTemplate
using do
quote do
use Phoenix.ConnTest
import Dd.Web.Router.Helpers
import Dd.Web.TestHelpers # Helpers added directly to ConnCase
@endpoint Dd.Web.Endpoint
@nmerouze
nmerouze / package.json
Created Aug 28, 2016
SASS with Webpack
View package.json
{
"scripts": {
"start": "./node_modules/.bin/webpack-dev-server --content-base static"
},
"dependencies": {
"autoprefixer-loader": "^3.2.0",
"css-loader": "^0.24.0",
"extract-text-webpack-plugin": "^1.0.1",
"modularscale-sass": "^2.1.1",
"node-sass": "^3.8.0",
@nmerouze
nmerouze / .eslintrc
Last active Feb 16, 2017
.eslintrc
View .eslintrc
{
"parser": "babel-eslint",
/*"plugins": ["react"],*/
"ecmaFeatures": {
/*"jsx": true,*/
"modules": true
},
"env": {
"browser": true,
"node": true,
@nmerouze
nmerouze / main.go
Last active Aug 27, 2020
JSON-API with Go and MongoDB: Final Part
View main.go
package main
import (
"encoding/json"
"log"
"net/http"
"reflect"
"time"
"github.com/gorilla/context"
@nmerouze
nmerouze / main.go
Created Dec 5, 2014
JSON-API with Go and MongoDB: Part 2
View main.go
package main
import (
"encoding/json"
"log"
"net/http"
"reflect"
"time"
"github.com/gorilla/context"
@nmerouze
nmerouze / main.go
Created Dec 5, 2014
JSON-API with Go and MongoDB: Part 1
View main.go
package main
import (
"encoding/json"
"log"
"net/http"
"reflect"
"time"
"github.com/gorilla/context"
@nmerouze
nmerouze / main.go
Last active Aug 27, 2020
Example for "Build Your Own Web Framework in Go" articles
View main.go
package main
import (
"database/sql"
"encoding/json"
"errors"
"fmt"
"log"
"net/http"
"time"
View .zshrc
# DESCRIPTION:
# A simple zsh configuration that gives you 90% of the useful features that I use everyday.
#
# AUTHOR:
# Geoffrey Grosenbach http://peepcode.com
############
# FUNCTIONS
############
View app.rb
gem "mongoid", ">= 2.0.0.beta9"
gem "bson_ext", ">= 1.0.3"
gem "haml", ">= 3.0.12"
gem "rspec-rails", ">= 2.0.0.beta.15", :group => :test
generators = <<-GENERATORS
config.generators do |g|
g.orm :mongoid
g.template_engine :haml
g.test_framework :rspec, :fixture => true, :views => false
You can’t perform that action at this time.