Skip to content

Instantly share code, notes, and snippets.

@silviopaganini
silviopaganini / profanity_pt-br
Created June 3, 2014 14:47
Portuguese Profanity
acéfalo
aidético
aids
amadoras
amateur
anal
ânus
arde
ardencia
arder
Verifying myself: My Bitcoin username is +silviopaganini. https://onename.io/silviopaganini
#!/bin/bash
PS1="\u\e[1;30m \W\e[m $ "
alias ll="ls -lahG"
alias sniff="sudo ngrep -W byline -d 'en0' -t '^(GET|POST) ' 'tcp and port 8888'"
alias mysqlstart='sudo /usr/local/mysql/support-files/mysql.server start'
alias mysqlstop='sudo /usr/local/mysql/support-files/mysql.server stop'
alias f='cd /Users/silviopaganini/Workspace/fluuu.id'
/*
@Function setStyle(String);
var style : String = "polygon" or "cartoon"
*/
setStyle : function(style){
return style;
},
/*
@Function setColor(uint);
@silviopaganini
silviopaganini / rapidPrototypeBash
Last active August 29, 2015 14:24
rapid prototype bash_script
function rapid
{
if [ -z "$1" ]
then
echo 'need to specify the folder name'
else
# creates a folder
mkdir $1
cd $1
@silviopaganini
silviopaganini / implementation
Last active August 29, 2015 14:24
Letter for Joe
var Letter, PreloaderView,
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
Letter = require('./Letter');
PreloaderView = (function() {
PreloaderView.prototype.el = null;
PreloaderView.prototype.refLetters = null;
@silviopaganini
silviopaganini / default
Created July 30, 2015 13:01
nginx config
server {
access_log "/var/log/nginx/server.${domain}.access.log";
error_log "/var/log/nginx/server.dev.error.log";
charset utf-8;
listen 80;
index index.html index.htm index.php;
set $basepath "/var/www/domains/projects";
@silviopaganini
silviopaganini / vhosts.conf
Created August 15, 2015 17:09
Vhost wild card
UseCanonicalName Off
LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon
CustomLog logs/access_log vcommon
VirtualDocumentRoot /var/www/html/%0
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1$1 [R=301,L]
<Directory /var/www/html/%0>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
import { Component } from 'react';
import PropTypes from 'prop-types';
export default class ScrollToTop extends Component {
static propTypes = {
children: PropTypes.element,
}
static defaultProps = {
children: null,
export default function windowPopup(width, height, url, title, win) {
if (typeof width !== 'number' || typeof height !== 'number') {
throw new TypeError('Width and height must be numbers');
}
if (typeof url !== 'string') {
throw new TypeError('Url must be string');
}
if ((typeof title !== 'string') && (typeof title !== 'undefined')) {