View docker-compose up output
version: '2'
services:
web:
image: messenger
ports:
- "8000:8000"
environment:
MYSQL_USER: marwan
MYSQL_PASSWORD: <pass>
MYSQL_DATABASE: messenger
View YouTube API — getting video thumbnail
Each YouTube video has 4 generated images. They are predictably formatted as follows:
http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg
The first one in the list is a full size image and others are thumbnail images. The default thumbnail image (ie. one of 1.jpg, 2.jpg, 3.jpg) is:
http://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg
View subl.tmTheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Generated by: TmTheme-Editor -->
<!-- ============================================ -->
<!-- app: http://tmtheme-editor.herokuapp.com -->
<!-- code: https://github.com/aziz/tmTheme-Editor -->
<plist version="1.0">
<dict>
<key>name</key>
<string>8-Colour-Dark</string>
View hourglass.go
package main
import (
"fmt"
)
var a = [6][6]int{[6]int{1, 1, 1, 0, 0, 0},
[6]int{0, 1, 0, 0, 0, 0},
[6]int{1, 1, 1, 0, 0, 0},
[6]int{0, 0, 0, 0, 0, 0},
View ruby language
CONTENT
Expressions, Statements and Controlstructures
Equlaity
Assigments
The ||= idiom
Other assignments
Flip-flops
Iterators
Blocks
Control-flow keywords
View gist:e8ad83b2604b45f07ce1e8a2eb0a71b0
Downloading https://github.com/rvm/rvm/archive/1.27.0.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.27.0/1.27.0.tar.gz.asc
gpg: Signature made 29 مار, 2016 EET 03:49:47 م using RSA key ID BF04FF17
gpg: can't open `/home/marwan/.gnupg/pubring.gpg'
gpg: keydb_search failed: Permission denied
gpg: Can't check signature: No public key
Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found.
Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).
GPG signature verification failed for '/home/marwan/.rvm/archives/rvm-1.27.0.tgz' - 'https://github.com/rvm/rvm/releases/download/1.27.0/1.27.0.tar.gz.asc'!
View http.go
func Test(r *http.Request) http.Response {
err := r.Assure("param:numeric")
if err != nil{
return http.Error(400, err)
}
return http.Success()
}
View products.go
func Read(r *h.Request) h.Response{
return json(db.GetProducts())
}
View framework.go
// 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
}
View MyEditor.js
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) {