Skip to content

Instantly share code, notes, and snippets.

View unixslayer's full-sized avatar
🏡
Working asynchronously from home

Piotr Zając unixslayer

🏡
Working asynchronously from home
View GitHub Profile

Keybase proof

I hereby claim:

  • I am unixslayer on github.
  • I am unixslayer (https://keybase.io/unixslayer) on keybase.
  • I have a public key ASD7OQAmVhKpAjTCUYaIUBNExPEIuP94WWwMt5nykqKsdwo

To claim this, I am signing this object:

@unixslayer
unixslayer / dns tuning ssh login speedup vagrant
Created December 28, 2015 08:51 — forked from jedi4ever/dns tuning ssh login speedup vagrant
speeding up DNS/SSH connections in vagrant
- Tune /etc/ssh/sshd_config
UseDNS no # Disable DNS lookups
GSSAPIAuthentication no # Disable negotation of slow GSSAPI
don't forget to restart it, use a script provider to set it , or create it with veewee or snapshot it
- Tune Vagrantfile
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
@unixslayer
unixslayer / ISO_3166-1_countries_pl.js
Created December 15, 2015 14:08 — forked from lukaszfiszer/ISO_3166-1_countries_pl.js
List of all countries with their ISO 3166-1 codes, polish and english names, in javascript and json. Sorted by polish name. Source: http://pl.wikipedia.org/wiki/ISO_3166-1 Lista wszystkich państw świata wraz z ich polską i angielską nazwą oraz kodem wg. ISO 3166-1, w formatach javascript i JSON. Posortowana wg. polskiej nazwy: Zródło: http://pl.…
[
{ name_pl: "Afganistan", name_en: "Afghanistan", code: "AF" },
{ name_pl: "Albania", name_en: "Albania", code: "AL" },
{ name_pl: "Algieria", name_en: "Algeria", code: "DZ" },
{ name_pl: "Andora", name_en: "Andorra", code: "AD" },
{ name_pl: "Angola", name_en: "Angola", code: "AO" },
{ name_pl: "Anguilla", name_en: "Anguilla", code: "AI" },
{ name_pl: "Antarktyka", name_en: "Antarctica", code: "AQ" },
{ name_pl: "Antigua i Barbuda", name_en: "Antigua and Barbuda", code: "AG" },
{ name_pl: "Arabia Saudyjska", name_en: "Saudi Arabia", code: "SA" },
public function searchAction()
{
$secretCode = $this->params()->fromPost('code');
$resultSet = $this->getPlayerTable()->searchName($secretCode);
print_r($resultSet);
exit;
}
$("‪#‎playerSearch‬").click(function() {
var basepath = window.location.protocol + "//" + window.location.host;
value = $("‪#‎value‬").val();
var arr = {
code: value
};
$.ajax({
url: basepath + "/bowhunter/public/admin/player/search",
type: "POST",
data: arr,
@unixslayer
unixslayer / all-in-one.sh
Last active August 29, 2015 14:23
all in one installation
apt-get update
#install some initial modules
apt-get install python-software-properties software-properties-common curl
#install git
apt-get install git-core
#install node
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
# Install a Webserver
apt-get -y install apache2
# Target docroot to /home/satis/web/
# Install PHP5 CLI and needed programs.
apt-get -y install php5-cli php5-curl php5-json git wget
# Add a specifix user for our task
adduser satis