Skip to content

Instantly share code, notes, and snippets.

@macmladen
macmladen / bash-one-liners.sh
Last active October 7, 2016 18:19
BASH one-liners
## CHECKING HEADERS AND CERTIFICATE
# curl headers
curl -Iv https://example.com
# check certificate
openssl s_client -connect www.example.com:443
## FIXING FILES PERMISSIONS
# Remove Mac OS X Desktop Services Store files
find . -name ".DS_Store" -exec rm {} \;
# If you accidentally chmod -R 755 on everything revert files to 644
@jakimowicz
jakimowicz / redmine gitlab sync
Created November 15, 2012 16:22
simple (and dirty) sync between redmine issues and gitlab issues
#!/usr/bin/env ruby
require 'faraday'
require 'json'
require 'gitlab'
module Redmine
Host = nil
APIKey = nil
@dlaxar
dlaxar / Install newer ruby version (>= 1.9)
Created June 26, 2012 12:25
Installing Redmine AND GitLab on CentOS 6.2 (part 2)
curl -O http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
tar xzvf ruby-1.9.3-p0.tar.gz
cd ruby-1.9.3-p0
./configure --enable-shared --disable-pthread --program-suffix n
make && make install
@dlaxar
dlaxar / a. Add the epel repo to yum
Created June 26, 2012 10:25
Installing Redmine AND GitLab on CentOS 6.2 (part 1)
rpm -Uvh http://fedora.aau.at/epel/6/i386/epel-release-6-7.noarch.rpm
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 25, 2024 06:23
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jbarber
jbarber / LdapAuth.java
Created June 11, 2012 12:20
LDAP example for searching and simple binding (authentication)
/*
* First create the keystore (to allow SSL protection) by importing the LDAP
* certificate (cert.pem) with:
* keytool -import -keystore keystore -storepass changeit -noprompt -file cert.pem
*
* You can get the certificate with OpenSSL:
* openssl s_client -connect ldap.server.com:636 </dev/null 2>/dev/null | sed -n '/^-----BEGIN/,/^-----END/ { p }' > cert.pem
*
* Then compile this class with:
* javac LdapAuth.java
@kwharrigan
kwharrigan / mks_git_checkpoints.py
Created April 12, 2012 16:50
MKS fast-import script for git
#!/usr/bin/python
#Copyright (c) 2012 Kyle Harrigan
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:
#
@btoone
btoone / curl.md
Last active April 2, 2024 20:18
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@mklabs
mklabs / bootstrap-plugins.txt
Created December 2, 2011 11:23
h5bp + twitter bootstrap integration
bootstrap-tooltip.js
bootstrap-popover.js
bootstrap-alert.js
bootstrap-button.js
bootstrap-carousel.js
bootstrap-collapse.js
bootstrap-dropdown.js
bootstrap-modal.js
bootstrap-scrollspy.js
bootstrap-tab.js
@predominant
predominant / ubuntu-1104-nginx-base.sh
Created October 5, 2011 15:19
Install Ubuntu 11.04 Nginx based web server with PHP-FPM, MySQL and MongoDB
#!/bin/bash
###
#
# Copyright (c) 2011 Cake Development Corporation (http://cakedc.com)
#
# Ubuntu 11.04 based web server installation script
# Run this by executing the following from a fresh install of Ubuntu 11.04 server:
#
# bash -c "$(curl -fsSL https://raw.github.com/gist/1264701)" <mysqlPassword>