Skip to content

Instantly share code, notes, and snippets.

var React = require('react');
var Editor = require('draft-js').Editor;
var EditorState = require('draft-js').EditorState;
var MyEditor = React.createClass({
getInitialState: function() {
return {editorState: EditorState.createEmpty()};
},
onChange: function(editorState) {
let $GOPATH = 'home/marwan/go'
call plug#begin('~/.vim/plugged')
Plug 'fatih/vim-go'
call plug#end()
@marawannwh
marawannwh / readability.rb
Last active August 29, 2015 14:26 — forked from emad-elsaid/readability.rb
import links content to facebook comments by mentioning this bot, you'll need to run it periodically using cronjob
#!/usr/bin/env ruby
# Author : Emad Elsaid (https://github.com/blazeeboy)
# **Usage** :
#
# * `ruby readability.rb <accesstoken>`
# this will get a long term access token from the short term one
# you can create a facebook app and get access token from here
# * `ruby readability.rb`
# will start the script
require 'open-uri'
directivesModule.directive('test', function(){
return {
// restrict: 'AEC',
templateUrl: '/public/partials/test.html',
scope:{
write: function(){
console.log("working")
}
},
controller: function($scope){
<script type="text/javascript" src="/public/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="/public/lib/angular/angular.js"></script>
<script type="text/javascript" src="/public/lib/angular/angular-route.js"></script>
<script type="text/javascript" src="/public/lib/angular/angular-resource.min.js"></script>
<script type="text/javascript" src="/public/lib/angular/angular-cookies.min.js"></script>
<script type="text/javascript" src="/public/js/app.js"></script>
<script type="text/javascript" src="/public/js/services.js"></script>
<script type="text/javascript" src="/public/js/controllers.js"></script>
<script type="text/javascript" src="/public/js/controllers/signup.js"></script>
<script type="text/javascript" src="/public/js/controllers/login.js"></script>
type User struct {
Id int64
Name string
Email string
Username string
TablesIds []uint8
HashedPassword []byte
Created int64
Updated int64
}
@marawannwh
marawannwh / ex14.c
Last active December 18, 2015 01:39
#include <stdio.h>
#include <ctype.h>
// forward declarations
int can_print_it(char ch);
void print_letters(char arg[]);
void print_arguments(int argc, char *argv[])
{
int i = 0;
@article_subbed = @article.body.gsub 'startcode', '<pre class="prettyprint">'
@article.body = @article_subbed.gsub 'endcode', '</pre>'
<h2>Sign up</h2>
<%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<%= f.input :email, :required => true, :autofocus => true %>
<%= f.input :name %>
<%= f.input :password, :required => true %>
<%= f.input :password_confirmation, :required => true %>