Skip to content

Instantly share code, notes, and snippets.

View benc's full-sized avatar

Ben Cochez benc

View GitHub Profile
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 26, 2024 23:26 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@bubba-h57
bubba-h57 / instructions.md
Last active October 23, 2023 12:46
Configuring Jetbrains Gateway and WSL

Step 1: SSH Daemon

In your WSL instance, re-install OpenSSH server as follows.

sudo apt remove --purge openssh-server
sudo apt install openssh-server

Edit /etc/ssh/sshd_config (e.g. sudo vi /etc/ssh/sshd_config) and add the following lines to the bottom of the file. Ensure you replace WSL_ACCOUNT_NAME with your WSL2 account name.

@sergeimuller
sergeimuller / gist:2916697
Last active August 25, 2023 03:52
CQ5 curl commands
Note 1: The following CQ curl commands assumes a admin:admin username and password.
Note 2: For Windows/Powershell users: use two "" when doing a -F cURL command.
Example: -F"":operation=delete""
Note 3: Quotes around name of package (or name of zip file, or jar) should be included.
Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console)
curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"
Install a bundle
curl -u admin:admin -F action=install -F bundlestartlevel=20 -F
@omz
omz / PythonistaFTP.py
Last active May 17, 2023 12:43
PythonistaFTP.py
'''FTP server for Pythonista (iOS)
You can use this to exchange files with a Mac/PC or a file management app on the same device (e.g. Transmit).
If you use a Mac, you can connect from the Finder, using the "Go -> Connect to Server..." menu item.
'''
import os
from socket import gethostname
@mackuba
mackuba / wwdc15.md
Last active August 6, 2022 17:28
New stuff from WWDC 2015

Here's my own list of the interesting stuff announced during this year's WWDC, collected from the keynotes, various Apple docs, blog posts and tweets.

If you're planning to watch the videos, I really recommend this Mac app that helps you download and watch them: https://github.com/insidegui/WWDC.

OS X El Capitan

http://www.apple.com/osx/elcapitan-preview/

  • split view - two apps side by side on full screen
#!/bin/bash
if (( $# < 1 ))
then
echo "Usage: $0 json url [cred, default=admin:admin]"
echo "example: $0 /tmp/content.tidy.-1.json http://localhost:4502/content/copy"
exit 1
fi
j="$1"
@tommeier
tommeier / xvfb_daemon.sh
Created April 27, 2011 10:44
Xvfb startup init script for headless selenium with multiple displays for Jenkins or Teamcity CI server
#!/bin/bash
# /etc/init.d/xvfb_daemon
# Xvfb startup script.
# Tom Meier <tom@venombytes.com>
#
### BEGIN INIT INFO
# Provides: xvfb
# Short-Description: Start/stop/restart daemon
# Description: Controls the Xvfb daemon which starts/stops the X Virtual Framebuffer server
# Example Use:
@PaulCapestany
PaulCapestany / Useful Alfred Custom Searches
Created June 18, 2012 21:13
Useful Alfred Custom Searches
Calendar Quick Add
http://www.google.com/calendar/event?ctext=+{query}+&action=TEMPLATE&pprop=HowCreated%3AQUICKADD
Crunchbase
http://www.crunchbase.com/search?query={query}
Google Three Month Search
http://www.google.com/search?q={query}&tbs=,qdr:m3
Google Year Search
@igouss
igouss / ObservableQuery.java
Created September 22, 2015 22:12
RxJava and Hibernate Scrollable query Raw
package com.naxsoft.database;
import org.hibernate.Query;
import org.hibernate.ScrollMode;
import org.hibernate.ScrollableResults;
import org.hibernate.StatelessSession;
import rx.Observable;
/**
* Copyright NAXSoft 2015
@leucos
leucos / README.md
Last active December 11, 2015 10:28
Ruby playbook example

Deploying Ruby with Ansible

Define these variables somewhere and let it go :

  • ruby_current: the ruby version you want to deploy (e.g. "1.9.3-p374")
  • ruby_user: Under which account we want ruby to be installed (e.g. "myappuser"; "ruby" in this playbook)

Note : this playbook only works with '-i' in the sudo line since it requires the target user environment to be fully loaded