This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Twitter Auto-follow Script by Dave Stevens - http://davestevens.co.uk | |
$user = ""; | |
$pass = ""; | |
$term = ""; | |
$userApiUrl = "http://twitter.com/statuses/friends.json"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Content-Type: text/event-stream'); | |
header('Cache-Control: no-cache'); // recommended to prevent caching of event data. | |
/** | |
* Constructs the SSE data format and flushes that data to the client. | |
* | |
* @param string $id Timestamp/id of this connection. | |
* @param string $msg Line of text that should be transmitted. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### In Ubuntu this file is enabled in .bashrc | |
## Alias definitions. | |
## You may want to put all your additions into a separate file like | |
## ~/.bash_aliases, instead of adding them here directly. | |
## See /usr/share/doc/bash-doc/examples in the bash-doc package. | |
# if [ -f ~/.bash_aliases ]; then | |
# . ~/.bash_aliases | |
# fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ubuntu .bash_profile | |
#--------------------------------- | |
# Environment Variables | |
#--------------------------------- | |
export PS1="\h \w:" | |
export NOW=$(date +"%Y-%m-%d") | |
export PATH=$PATH:$HOME/bin | |
# Aliases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# For Ubuntu Users: | |
# ~/.bash_aliases | |
# git quick commit. | |
alias gqc='git add -A && git commit' | |
# git quick commit with default commit message. | |
alias gqcd='git add -A && git commit -m "commit."' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --------------------------- | |
# Autor: giovani Oliveira | |
# Data: 01-12-2013. | |
#------------------------------------------------------- | |
# Enable aliases to be sudo’ed | |
#------------------------------------------------------- | |
alias sudo='sudo ' | |
#------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### | |
## Ubuntu makes you sudo everything, and this takes some of the fun typing out of it. | |
##### | |
# | |
#EXAMPLE FILE 1 - script.sh: | |
#-------- | |
#!/bin/bash | |
## Include the setup of our command aliases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
################################################### | |
# Install all manner of development dependencies | |
# on Ubuntu | |
################################################### | |
grep "my custom aliases" ~/.profile || | |
{ | |
echo "#my custom aliases" >> ~/.profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I just installed SanDisk 6Gig/s SSD in my Sony VAIO Laptop today. | |
# I also installed Xubuntu 13.04 on it as well. I have been | |
# using Ubuntu from almost a year now. I was actually kind of | |
# getting tired of Ubuntu, it was causing a lot of issues. And yes I | |
# am well aware of the fact that Xubuntu is technically Ubuntu. | |
# Anyways that's not why I am writing this gist. I am just creating | |
# this gist so I can have a reference to my bash aliases file | |
# and so that other's can use it as an example as well. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
show_git_branch() { | |
_branch="$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')" | |
test -n "$_branch" && echo -e " $_branch" | |
} |
OlderNewer