Skip to content

Instantly share code, notes, and snippets.

View csonuryilmaz's full-sized avatar
Coding

Onur Yılmaz csonuryilmaz

Coding
View GitHub Profile
@defunkt
defunkt / browser
Created March 1, 2010 10:01
pipe html to a browser
#!/bin/sh -e
#
# Usage: browser
# pipe html to a browser
# e.g.
# $ echo '<h1>hi mom!</h1>' | browser
# $ ron -5 man/rip.5.ron | browser
if [ -t 0 ]; then
if [ -n "$1" ]; then
@fredrick
fredrick / screen.md
Created September 14, 2011 15:30
GNU Screen Cheat Sheet

#GNU Screen Cheat Sheet

##Basics

  • ctrl a c -> cre­ate new win­dow
  • ctrl a A -> set win­dow name
  • ctrl a w -> show all win­dow
  • ctrl a 1|2|3|… -> switch to win­dow n
  • ctrl a " -> choose win­dow
  • ctrl a ctrl a -> switch between win­dow
  • ctrl a d -> detach win­dow
@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@wuservices
wuservices / build-snippet.xml
Created August 20, 2012 18:12
Ant post-processing target to remove signature files from jar
<target name="remove-signatures">
<exec executable="zip">
<arg value="-d"/>
<arg value="${artifact.output.path}/output.jar"/>
<arg value="*.RSA"/>
<arg value="*.SF"/>
<arg value="*.DSA"/>
</exec>
</target>
@4ndrej
4ndrej / SSLPoke.java
Last active January 3, 2024 09:50
Test of java SSL / keystore / cert setup. Check the comment #1 for howto.
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services
*/
public class SSLPoke {
@dgoguerra
dgoguerra / script-with-options.sh
Last active November 23, 2023 19:17
Manual alternative to getopt in bash scripts, supporting short and long options
#!/usr/bin/env bash
# File name
readonly PROGNAME=$(basename $0)
# File name, without the extension
readonly PROGBASENAME=${PROGNAME%.*}
# File directory
readonly PROGDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# Arguments
readonly ARGS="$@"
@miguelmota
miguelmota / README.md
Last active March 16, 2024 12:52
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
@kramarama
kramarama / xdebug
Created March 21, 2014 19:58
install xdebug on centos
http://xdebug.org/install.php#configure-php
http://blog.jetbrains.com/phpstorm/2013/08/debugger-configuration-validation-with-phpstorm/
on CentOS:
1. You need to install PHP’s devel package for PHP commands execution
yum install php-devel
yum install php-pear
2. Next install GCC and GCC C++ compilers to compile Xdebug extension yourself.
yum install gcc gcc-c++ autoconf automake
@nepsilon
nepsilon / git-change-commit-messages.md
Last active April 24, 2024 06:30
How to change your commit messages in Git? — First published in fullweb.io issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

@brennanMKE
brennanMKE / README.md
Created September 29, 2016 20:50
Installing and using multiple versions of Xcode

It is possible to have multiple versions of Xcode on your Mac. Where you may have trouble is getting your command-line to work well. Various develper tools are in the developer directory. When there are multiple versions of Xcode on a Mac one of them should be selected.

Print Path

Printing the path for the developer directory will show which copy of Xcode is currently selected.

 xcode-select -p