Skip to content

Instantly share code, notes, and snippets.

<?php
//Recebe um array contendo os links e retorna um array contendo os codigos
function check_links ($links){
foreach ($links as &$url){
$host = parse_url($url);
$tld = $host['host'];
switch ($tld){
case ($tld == "peeje.com" || "www.peeje.com" || "peejeshare.com" || "www.peejeshare.com"):
$plugin = 'peeje';
break;
@fidelix
fidelix / config
Last active December 16, 2015 03:48
Terminator Config | Save it in ~/.config/terminator/config
[global_config]
title_transmit_bg_color = "#000000"
title_inactive_bg_color = "#000000"
[keybindings]
hide_window = <Shift><Control>a
[profiles]
[[default]]
scrollbar_position = hidden
palette = "#000000:#cc0000:#4e9a06:#c4a000:#3465a4:#75507b:#06989a:#d3d7cf:#555753:#ef2929:#8ae234:#fce94f:#729fcf:#ad7fa8:#34e2e2:#eeeeec"
background_darkness = 0.769574944072
@fidelix
fidelix / gist:5378213
Created April 13, 2013 12:33
/etc/samba/smb.conf - Don't forget to change your username
[global]
workgroup = WORKGROUP
server string = %h server
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
security = share
encrypt passwords = true
@fidelix
fidelix / settings.local.php
Last active December 22, 2015 01:49
Production settings file for Drupal
<?php
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'meusite_live',
'username' => 'cliente',
'password' => 'xxxxx',
'host' => 'localhost',
require 'file_size_validator'
class Subtitle < ActiveRecord::Base
belongs_to :title, :inverse_of => :subtitles
belongs_to :user, :inverse_of => :subtitles
belongs_to :season, :inverse_of => :subtitles
has_many :comments, dependent: :destroy, inverse_of: :subtitle
has_many :releases, dependent: :destroy, inverse_of: :subtitle
mount_uploader :sub_file, SubFileUploader
validates :sub_file,
:presence => true,
desc 'Cria uns usuários, Títulos, Temporadas e Legendas fake pra facilitar...'
task :fake_stuff => :environment do
user = User.create!(
:username => 'Fidelix',
:email => '[email protected]',
:password => 'deserve2'
)
puts "Criado usuário"
title = Title.create!(
:name => 'Revolution',
desc 'Cria uns usuários, Títulos, Temporadas e Legendas fake pra facilitar...'
task :fake_stuff => :environment do
user = User.create!(
:username => 'Fidelix',
:email => '[email protected]',
:password => 'deserve2'
)
puts "Criado usuário"
title = Title.create!(
:name => 'Revolution',
/**
* Header
*/
#header {
line-height: em(50px);
height: em(50px);
.two-menus & {
border-bottom: 2px solid #EBEBEB;
}
@include breakpoint($tablet) {
@fidelix
fidelix / settings.local.php
Last active January 3, 2016 05:50
Development settings file for Drupal 7
<?php
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'meusite_local',
'username' => 'root',
'password' => 'root',
'host' => 'localhost',
fidelix@debian-vm:/www/anbient/local/docroot$ drush pm-list --no-core --status=enabled --type=module
Package Name Version
Administration Administration menu (admin_menu) 7.x-3.0-rc5
Administration Administration menu Toolbar style (admin_menu_toolbar) 7.x-3.0-rc5
Advertising Doubleclick for Publishers (dfp) 7.x-1.3
Anbient Anbient Ads (anbient_ads) 7.x-0.2
Anbient Anbient Comments (anbient_comments) 7.x-0.4
Anbient Anbient Estrutura (anbient_estrutura) 7.x-0.6
Anbient Anbient Lançamentos (anbient_lancamentos) 7.x-0.3
Anbient Anbient Migration (anbient_v3) 7.x-0.1