Skip to content

Instantly share code, notes, and snippets.

View bsormagec's full-sized avatar
:shipit:
Signing new blocks..

Burak Sormageç bsormagec

:shipit:
Signing new blocks..
  • Laravel, Blockchain, Web3, Solidity, NodeJs
  • Toronto,Canada
  • X @bsormagec
View GitHub Profile
<?php
// Twitter Auto-follow Script by Dave Stevens - http://davestevens.co.uk
$user = "";
$pass = "";
$term = "";
$userApiUrl = "http://twitter.com/statuses/friends.json";
<?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.
*/
### 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
# ubuntu .bash_profile
#---------------------------------
# Environment Variables
#---------------------------------
export PS1="\h \w:"
export NOW=$(date +"%Y-%m-%d")
export PATH=$PATH:$HOME/bin
# Aliases
#!/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."'
# ---------------------------
# Autor: giovani Oliveira
# Data: 01-12-2013.
#-------------------------------------------------------
# Enable aliases to be sudo’ed
#-------------------------------------------------------
alias sudo='sudo '
#-------------------------------------------------------
#####
## 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
#!/bin/sh
###################################################
# Install all manner of development dependencies
# on Ubuntu
###################################################
grep "my custom aliases" ~/.profile ||
{
echo "#my custom aliases" >> ~/.profile
# 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.
[[ -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"
}