Skip to content

Instantly share code, notes, and snippets.

@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;
type User struct {
Id int64
Name string
Email string
Username string
TablesIds []uint8
HashedPassword []byte
Created int64
Updated int64
}
<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>
directivesModule.directive('test', function(){
return {
// restrict: 'AEC',
templateUrl: '/public/partials/test.html',
scope:{
write: function(){
console.log("working")
}
},
controller: function($scope){
@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'
let $GOPATH = 'home/marwan/go'
call plug#begin('~/.vim/plugged')
Plug 'fatih/vim-go'
call plug#end()
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) {
// User Code
type User struct {
Id int
Name string
}
// implement auth interface
func (u User) Authenticate(r *http.Request) (interface{}, error) {
// auth
return u, nil
}
@marawannwh
marawannwh / ruby language
Created December 18, 2016 19:18 — forked from patriques82/ruby language
A summary of the book "The Ruby Programming Language" by David Flanagana and Yukihiro "Matz" Matsumoto
CONTENT
Expressions, Statements and Controlstructures
Equlaity
Assigments
The ||= idiom
Other assignments
Flip-flops
Iterators
Blocks
Control-flow keywords