Skip to content

Instantly share code, notes, and snippets.

View AlexRogalskiy's full-sized avatar
🛰️
Work on stuff that matters

Alexander AlexRogalskiy

🛰️
Work on stuff that matters
View GitHub Profile
@netojoaobatista
netojoaobatista / wp_comments.sql
Created August 14, 2012 19:18
Número de comentários em posts, agrupado pela categoria. E o número de comentário no período anterior
SET @startDate=DATE("2012-07-01");
SET @endDate:=DATE("2012-07-31");
SET @diff:=@diff:=DATEDIFF(@startDate, @endDate);
SET @previousStartDate:=ADDDATE(@startDate, @diff);
SET @previousEndDate:=ADDDATE(@endDate, @diff);
SELECT
@startDate AS `currentStartDate`,
@endDate AS `currentEndDate`,
@previousStartDate AS `previousStartDate`,
@jboner
jboner / typesafe-project-and-developer-guidelines.md
Last active October 9, 2022 21:58
Typesafe Project & Developer Guidelines

Typesafe Project & Developer Guidelines

These guidelines are meant to be a living document that should be changed and adapted as needed. We encourage changes that makes it easier to achieve our goals in an efficient way.

These guidelines mainly applies to Typesafe’s “mature” projects - not necessarily to projects of the type ‘collection of scripts’ etc.

General Workflow

This is the process for committing code into master. There are of course exceptions to these rules, for example minor changes to comments and documentation, fixing a broken build etc.

@brandonb927
brandonb927 / raspi-motd.sh
Created December 8, 2012 20:47 — forked from piksel/raspi-motd.sh
Script for setting a nice raspberry pi logo as MOTD on debian.
#!/bin/bash
logo="$(tput setaf 2)
.~~. .~~.
'. \ ' ' / .'$(tput setaf 1)
.~ .~~~..~. $(tput sgr0) _ _ $(tput setaf 1)
: .~.'~'.~. : $(tput sgr0) ___ ___ ___ ___| |_ ___ ___ ___ _ _ ___|_|$(tput setaf 1)
~ ( ) ( ) ~ $(tput sgr0) | _| .'|_ -| . | . | -_| _| _| | | | . | |$(tput setaf 1)
( : '~'.~.'~' : ) $(tput sgr0) |_| |__,|___| _|___|___|_| |_| |_ | | _|_|$(tput setaf 1)
~ .~ ( ) ~. ~ $(tput sgr0) |_| |___| |_| $(tput setaf 1)
@netojoaobatista
netojoaobatista / php.sh
Created January 25, 2013 14:10
Template para criação de um inicializador de serviços
#!/bin/bash
prog=php
#função para iniciar o serviço
start() {
echo -n $"iniciando $prog..."
# aqui o código para iniciar alguma coisa, por exemplo:
php -S localhost:8080 >php_log &
}
@netojoaobatista
netojoaobatista / php.doc.sh
Created February 19, 2013 22:03
Simple RSS2JSON using XSLT
#!/bin/sh
curl -s "http://news.php.net/group.php?group=php.doc&format=rss" |xsltproc rss2json.xsl /dev/stdin |json_reformat
@skull-squadron
skull-squadron / gist:5021854
Created February 23, 2013 23:34
list all installed package groups on el redhat / fedora
yum grouplist | sed -n '1,/^Installed Groups:/d;/^Available Groups:/q;s/^ *//g;p'
#!/bin/bash
ICONV="iconv -f UTF-8 -t ISO-8859-1"
find $1 -type f -iname "*.html" | while read fn; do
cp ${fn} ${fn}.utf8
$ICONV < ${fn}.utf8 > ${fn}
rm ${fn}.utf8
done
@DamonOehlman
DamonOehlman / README.md
Last active June 12, 2022 19:01
Provisioning of node + nginx designed for use with vagrant shell provisioner. No need for chef, puppet.

This is a simple shell script that is designed to provision both nginx and node on your machine. I primarily wrote it for use with Vagrant and an example Vagrantfile is included in the Gist as well.

@DamonOehlman
DamonOehlman / README.md
Created June 25, 2013 21:50
Ubuntu 13.04 Dell XPS 13 Hacks - Things you occassionally need to do to keep your Ubuntu installation on a Dell XPS happy.

Brightess Fix

When brightness controls stop responding manually trigger a brightness update. Once this is done brightness controls seem to respond again. Not sure if the lspci command is required, when my linux foo is stronger I'm sure I'll know...

lspci -nn | grep VGA
echo 3500 | sudo tee /sys/class/backlight/intel_backlight/brightness
@DamonOehlman
DamonOehlman / README.md
Last active June 12, 2022 18:59
Video Loopback on Ubuntu 13.04