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
cd ~/.ssh | |
ssh-keygen -t rsa -C "[email protected]" | |
cat ~/.ssh/id_rsa.pub | pbcopy | |
# scp somewhere or paste to github keys | |
git config --global user.name "name" | |
git config --global user.email [email protected] | |
# may be proxy |
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
#!/usr/bin/env bash | |
PCRE_DIR="pcre-8.12" | |
PCRE_LINK="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$PCRE_DIR.tar.gz" | |
NGNIX_DIR="nginx-0.8.54" | |
NGNIX_LINK="http://nginx.org/download/$NGNIX_DIR.tar.gz" | |
## DOWNLOADS | |
curl -OL h $PCRE_LINK > $PCRE_DIR.tar.gz |
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
<?php | |
header('Content-Type: text/html; charset=UTF-8'); | |
# Folder-DB no in web root | |
define('DB_FOLDER', dirname(__FILE__) . '/../svalka/'); | |
if (isset($_REQUEST['submit'])) { | |
// Handle the form submit | |
if('' == $_REQUEST['file-name']) die('Empty filename'); | |
file_put_contents( |
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
#!/usr/bin/env bash | |
# Thanks to bolk http://bolknote.ru/2011/09/14/~3407#07 | |
function PrintBar { | |
if [[ $TERM =~ 256 || $TERM_PROGRAM = "iTerm.app" ]]; then | |
local colors=("38;5;34" "38;5;220" "38;5;160") | |
else | |
local colors=(32 33 31) | |
fi |
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 java.io.*; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class ListFiles { | |
public static void main(String[] args) throws IOException { | |
String path = (args.length > 0) ? args[0] : "."; |
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
sudo apt-get install curl |
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
#!/usr/bin/env bash | |
# ~/Library/LaunchAgents Per-user agents provided by the user. | |
# /Library/LaunchAgents Per-user agents provided by the administrator. | |
# /Library/LaunchDaemons System-wide daemons provided by the administrator. | |
# /System/Library/LaunchAgents Per-user agents provided by Mac OS X. | |
# /System/Library/LaunchDaemons System-wide daemons provided by Mac OS X. | |
rm -rf /tmp/launchers.tmp.txt |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Test</title> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript" charset="utf-8"></script> | |
<style type="text/css" media="screen"> | |
body,html{ | |
margin: 0; |
OlderNewer