Skip to content

Instantly share code, notes, and snippets.

View negativo's full-sized avatar
:octocat:
:)

Davide Berardi negativo

:octocat:
:)
View GitHub Profile
@negativo
negativo / gist:7303442
Last active December 27, 2015 09:19
my gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@negativo
negativo / gist:7317179
Created November 5, 2013 10:46
transform any browser tab into a textarea
data:text/html, <textarea style="font-size: 1.5em; width: 100%; height: 100%; border: none; outline: none" autofocus />
<!-- The JavaScript will replace the content between this span.
Add place holder number if they are stable in number. -->
<span class="fb-likes-count"></span>

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@negativo
negativo / gist:aa3769f0e6621ce6c160
Last active October 3, 2016 09:49
install wordpress from command line
wget http://wordpress.org/latest.tar.gz --no-check-certificate
tar xfz latest.tar.gz
mv wordpress/* ./
rmdir ./wordpress/
rm -f latest.tar.gz
#SETUP ZSH ON UBUNTU
#which shell am i logged in?
echo $0
#install
sudo apt-get install zsh
sudo apt-get install git-core
#install oh-my-zsh with curl
@negativo
negativo / lopmonhoc.js.jsx
Created March 11, 2016 10:52 — forked from revskill10/lopmonhoc.js.jsx
Integrate Datatable with React.js
/** @jsx React.DOM */
var LopMonHoc = React.createClass({
getInitialState: function(){
return {data: []}
},
loadData: function(){
$.ajax({
url: '/daotao/lops',
success: function(data){
(function () {
var i, elements = document.querySelectorAll('body *');
for (i = 0; i < elements.length; i++) {
if (getComputedStyle(elements[i]).position === 'fixed') {
elements[i].parentNode.removeChild(elements[i]);
}
}
})();