Skip to content

Instantly share code, notes, and snippets.

View csonuryilmaz's full-sized avatar
Coding

Onur Yılmaz csonuryilmaz

Coding
View GitHub Profile
@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>
@emjayoh
emjayoh / init.lua
Created May 8, 2020 01:02
Hammerspoon - kitty terminal + dropdown visor (Guake)
hs.hotkey.bind({}, "F15", function()
local app = hs.application.get("kitty")
if app then
if not app:mainWindow() then
app:selectMenuItem({"kitty", "New OS window"})
elseif app:isFrontmost() then
app:hide()
else
app:activate()
@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
@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="$@"
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
@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 {
@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
@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
@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

~/
@mramanathan
mramanathan / collectenv.groovy
Last active April 10, 2024 16:28
Jenkins Pipeline: How to run stage(s) in all nodes that match label string ?
import jenkins.model.*
collectBuildEnv = [:]
@NonCPS
def getNodes(String label) {
jenkins.model.Jenkins.instance.nodes.collect { thisAgent ->
if (thisAgent.labelString.contains("${label}")) {
// this works too
// if (thisAagent.labelString == "${label}") {