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
#### | |
## 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 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 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, |
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
/* 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 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 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 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 repo | |
sudo add-apt-repository ppa:ondrej/php | |
# Install software-properties-common | |
sudo apt-get install software-properties-common | |
# Install php 5.6 | |
sudo apt-get update | |
sudo apt-get install php5.6 | |
sudo apt-get install php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml |
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
# 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 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
$app = Get-WmiObject -Class Win32_Product | Where-Object { | |
$_.Name -match "Microsoft .NET Core SDK" | |
} | |
Write-Host $app.Name | |
Write-Host $app.IdentifyingNumber | |
pushd $env:SYSTEMROOT\System32 | |
$app.identifyingnumber |% { Start-Process msiexec -wait -ArgumentList "/x $_" } | |
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
<# PLEASE NOTE: I am not the original author of this function. | |
I found it online years ago, and have been using it ever since. | |
If you are the original author, please ping me and let me know, | |
so I can give you proper credit. | |
#> | |
Function Start-Pomodoro | |
{ | |
Param ( | |
[int]$Minutes = 25 | |
) |
OlderNewer