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
/** | |
* Usage: | |
* {{some_text | cut:true:100:' ...'}} | |
* Options: | |
* - wordwise (boolean) - if true, cut only by words bounds, | |
* - max (integer) - max length of the text, cut to this number of chars, | |
* - tail (string, default: ' …') - add this string to the input | |
* string if the string was cut. | |
*/ | |
angular.module('ng').filter('cut', function () { |
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
angular.module('app', []). | |
filter('myfilter', function() { | |
return function(in, param1, param2, param3) { | |
// do something | |
}; | |
}); |
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
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID --> | |
<script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
ga('create', 'UA-XXXXX-X'); | |
ga('send', 'pageview'); | |
</script> |
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
@import "compass/css3/images"; | |
// CSS-only multi-line ellipsis with generated content | |
// yields `position:relative`, so remember to declare an eventual `position:absolute/fixed` *after* including this mixin | |
@mixin limitLines( | |
$maxLinesPortrait, // Mandatory: The number of lines after which the clipping should take action. | |
$maxLinesLandscape: $maxLinesPortrait, // You may provide a different line limit for landscape orientation. | |
// Note that 'portrait' is our default orientation. However, if you omit $maxLinesLandscape, | |
// the value of $maxLinesPortrait is used for whatever orientation (that is, without a media query). |
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
#Quick cp from http://sekati.com/etc/install-nodejs-on-debian-squeeze | |
# | |
#Needed to install TileMill from MapBox | |
# | |
#Installs node.js which has npm bundled | |
# | |
#Build Dependencies | |
sudo apt-get update |
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
SSH_ENV="$HOME/.ssh/environment" | |
# start the ssh-agent | |
function start_agent { | |
echo "Initializing new SSH agent..." | |
# spawn ssh-agent | |
ssh-agent | sed 's/^echo/#echo/' > "$SSH_ENV" | |
echo succeeded | |
chmod 600 "$SSH_ENV" | |
. "$SSH_ENV" > /dev/null |
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
Mysql Host: 192.168.56.101 (or ip that you choose for it) | |
username: root (or mysql username u created) | |
password: **** (your mysql password) | |
database: optional | |
port: optional (unless you chose another port, defaults to 3306) | |
ssh host: 192.168.56.101 (or ip that you choose for this vm, like above) | |
ssh user: vagrant (vagrants default username) | |
ssh password: vagrant (vagrants default password) | |
ssh port: optional (unless you chose another) |
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
#include <stdio.h> | |
void print(void); | |
unsigned long getId(void); | |
unsigned char getAge(void); | |
struct Student { | |
unsigned char Age; | |
unsigned long Student_ID; | |
void (*print)(); |
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
/* | |
* Before executing this script | |
* | |
* 1. Create a dir named content | |
* 2. With an index.html that requests for files e.g css | |
* | |
* This simple server will automatically fetch the | |
* requested resource from the content directory | |
* | |
* author: Evander Tino |
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
/* | |
* Before executing this script | |
* | |
* 1. Create a dir named content | |
* 2. With an index.html that requests for files e.g css | |
* | |
* This simple server will automatically stream the | |
* requested resource from the content directory to the client | |
* | |
* author: Evander Tino |
OlderNewer