This file contains hidden or 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 { Injectable } from '@angular/core'; | |
import { Http } from '@angular/http'; | |
import { Config } from '../Config'; | |
import { Observable } from 'rxjs/Observable'; | |
import 'rxjs/Rx'; | |
@Injectable() | |
export class Request { | |
constructor(public http: Http) |
This file contains hidden or 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
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { | |
/* Styles */ | |
} | |
/* Smartphones (landscape) ----------- */ | |
@media only screen and (min-width : 321px) { | |
/* Styles */ | |
} |
This file contains hidden or 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
# Tool for mysql backup of all databases in an server. | |
# Author: Pedro Fernandes | |
# mysqldump.ps1 | |
param([String]$s='localhost', [String]$u='root', [String]$p='P@ssw0rd', [String]$out='C:\Backups') | |
Write-Host "mysqldump.ps1 - Tool for mysql backup of all databases in an server." | |
Write-Host "Usage:" | |
Write-Host " -s: [localhost] Servername or IP address" | |
Write-Host " -u: [root] Username" |
This file contains hidden or 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
# Install iRedMail | |
sudo apt-get install postfix | |
wget https://bitbucket.org/zhb/iredmail/downloads/iRedMail-0.9.4.tar.bz2 | |
tar xjf iRedMail-0.9.4.tar.bz2 | |
cd iRedMail-0.9.4 | |
bash iRedMail.sh |
This file contains hidden or 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
#### | |
## The Anti-Spam and general blocking stuff | |
#### | |
## The NDBM file used for the blocking rulesets | |
KSpam dbm -o /usr/local/mail/maps/AntiSpam | |
## Web page for info on the rulesets | |
D{WebPage}" - see http://www.bpfh.net/spam/" |
This file contains hidden or 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 | |
su -i | |
# Create Swap space | |
fallocate -l 4G /swapfile | |
chmod 600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
echo '/swapfile none swap sw 0 0' >> /etc/fstab |
This file contains hidden or 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: | |
* | |
* $('#template').handlebars({ | |
* data: { | |
* name: 'Pedro Fernandes', | |
* website: 'impedro.com', | |
* author: true | |
* }, | |
* done: function(result) { |
This file contains hidden or 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
public Bitmap ConvertToSepia(Bitmap sampleBitmap){ | |
float[] sepMat = { | |
0.3930000066757202f, | |
0.7689999938011169f, | |
0.1889999955892563f, | |
0, | |
0, | |
0.3490000069141388f, | |
0.6859999895095825f, | |
0.1679999977350235f, |
NewerOlder