Skip to content

Instantly share code, notes, and snippets.

<?php
// Friend and property support
// Read-only properties
abstract class PropertyVars {
protected $__visible = array();
public function &__get($key) {
if(in_array($key, $this->__visible)) {
return $this->$key;
@stelonix
stelonix / a.php
Last active May 22, 2018 20:58
php
<?php
// Friend and property support
// Read-only properties
abstract class PropertyVars {
protected $__visible = array();
public function &__get($key) {
if(in_array($key, $this->__visible)) {
return $this->$key;
#version 450 core //lower your version if GLSL 4.5 is not supported by your GPU
layout (location = 0) in vec3 VertexPosition;
uniform mat4x4 a;
void main()
{
gl_Position = a * vec4(VertexPosition, 1.0);
}
@stelonix
stelonix / gist:1c55b8404fa189639e1b
Last active August 29, 2015 14:26
Configurações para o Sublime = Eclipse
Finalmente, agora eu tenho tudo quase perfeito com o Sublime, só me falta mesmo é um Outline para fechar de vez.
Segue relação dos plugins que estou utilizando com o Sublime, bem como minhas configurações:
O primeiro package a instalar é o Package Control. A partir dele é possível intalar todos os outros pacotes executando Cmd+Shift+P (ou Ctrl para quem usa Linux/Windows), e buscando por "Package Control:Install Package".
Para instalar o Package Control, execute as instruções contidas nesta página:
https://packagecontrol.io/installation
Agora, chame o comando de instalação de pacotes e instale os seguintes pacotes.
@stelonix
stelonix / pscan
Last active August 29, 2015 14:10
#!/usr/bin/bash
fping -a -g 192.168.1.0/24 2> /dev/null
! transparency - true or false (default)
URxvt*transparent: false
URxvt.depth: 24
URxvt.background: [75]#000000
URxvt.cursorBlink: 1
URxvt*saveLines: 12000
URxvt*foreground: White
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
#PS1='[\u@\h \W]\$ '
export PS1='\[\033[01;32m\]\u@\h \[\033[00;31m\]\W \$ \[\033[00m\]'
@stelonix
stelonix / clipboard
Created May 8, 2014 21:02
urxvt clipboard access
#! perl
# source: https://bbs.archlinux.org/viewtopic.php?pid=619931#p619931
sub on_sel_grab {
my $query = quotemeta $_[0]->selection;
$query =~ s/\n/\\n/g;
$query =~ s/\r/\\r/g;
system( "echo -en " . $query . " | xsel -ibp" );
}
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 0
border_width = 2
background_color = #000000 22
border_color = #FFFFFF 6