Skip to content

Instantly share code, notes, and snippets.

View ftroncosom's full-sized avatar

Francisco Troncoso ftroncosom

View GitHub Profile
@ftroncosom
ftroncosom / ShowSystemPreferencePanes.swift
Created April 14, 2021 04:45 — forked from dagronf/ShowSystemPreferencePanes.swift
macOS: Open system preferences at a specified pane using Swift (or Objective-C) using x-apple.systempreferences
// Applescript: tell application "System Preferences" to get anchors of current pane
// Result:
// { anchor "Privacy_Reminders" of pane id "com.apple.preference.security" of application "System Preferences",
// anchor "Privacy_SystemServices" of pane id "com.apple.preference.security" of application "System Preferences",
// anchor "Privacy_Calendars" of pane id "com.apple.preference.security" of application "System Preferences",
// anchor "Firewall" of pane id "com.apple.preference.security" of application "System Preferences",
// anchor "Privacy_Assistive" of pane id "com.apple.preference.security" of application "System Preferences",
// anchor "Privacy_LinkedIn" of pane id "com.apple.preference.security" of application "System Preferences",
// anchor "Privacy_Accessibility" of pane id "com.apple.preference.security" of application "System Preferences",
@ftroncosom
ftroncosom / docker-compose.yml
Created January 2, 2019 17:27 — forked from jonashackt/docker-compose.yml
docker-compose.yml for multiple Spring Boot apps on Docker Windows Containers
version: '3.2'
services:
zuul-edgeservice:
build: ./zuul-edgeservice
ports:
- "8080:8080"
tty:
true
@ftroncosom
ftroncosom / gist:a682ef522f0b254f26751440ca7e3d40
Created February 14, 2018 17:35 — forked from jewzaam/gist:5a9496f1ca2e5feb07bb
MongoDB replica set in docker
# get it
docker pull mongo
# startup a 3 node replica set
docker run --name mongo-rs-1 -d mongo --nojournal --oplogSize 10 --replSet rs
docker run --name mongo-rs-2 -d mongo --nojournal --oplogSize 10 --replSet rs
docker run --name mongo-rs-3 -d mongo --nojournal --oplogSize 10 --replSet rs
# connect to first node
docker run -it --link mongo-rs-1:mongo1 --link mongo-rs-2:mongo2 --link mongo-rs-3:mongo3 --rm mongo /bin/bash
@ftroncosom
ftroncosom / XSSRequestWrapper.java
Created July 13, 2016 22:21 — forked from madoke/XSSRequestWrapper.java
Stronger Anti Cross-Site Scripting (XSS) Filter for Java Web Apps
package pt.impresa.iweb.filters.request;
import java.io.IOException;
import java.text.Normalizer;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.regex.Pattern;
ELEMENTARY OS THINGS TO DO:
00) https://gist.github.com/memoryleakx/7567474 ≤––– useful guide. Pick & choose what you want to do.
sudo apt-get update && sudo apt-get dist-upgrade
Install Chrome (not Chromium, since Netflix doesn’t play well under Chromium due to some licensing stuff):
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update
@ftroncosom
ftroncosom / perfectelementary.bash
Last active April 27, 2016 02:42
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
@ftroncosom
ftroncosom / gitflow-breakdown.md
Created March 1, 2016 18:54 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master

Connect to the remote repository

@ftroncosom
ftroncosom / atajosEclipse.textile
Created November 3, 2015 21:20 — forked from bertocq/atajosEclipse.textile
Atajos de teclado para Eclipse

Atajos de teclado para Eclipse (y derivados como ZendStudio)

Para editar un comando: Window → Preferences → General → Keys

Edición

Ctrl+D elimina la línea actual (en la que se encuentra el cursor)
Ctrl+Shift+F formatear código (tabulaciones, saltos de línea,…)
@ftroncosom
ftroncosom / .gitconfig
Created October 27, 2015 12:51 — forked from samsalisbury/.gitconfig
Git diff and merge with p4merge (OSX)
[merge]
keepBackup = false
tool = p4merge
[mergetool "p4merge"]
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "\"$PWD/$BASE\"" "\"$PWD/$REMOTE\"" "\"$PWD/$LOCAL\"" "\"$PWD/$MERGED\""
keepTemporaries = false
trustExitCode = false
keepBackup = false
[diff]
tool = p4merge
@ftroncosom
ftroncosom / gist:3acb6678b178bf107c75
Last active September 3, 2015 17:44 — forked from markjaquith/gist:7029068
How to get git-svn working in OS X Mavericks with Homebrew
sudo xcodebuild -license
xcode-select --install # There will be a GUI prompt
sudo cpan SVN::Core # use the "sudo" method when prompted
# Then add this to your ~/.profile:
# export PATH=/Library/Developer/CommandLineTools/usr/bin:$PATH
# Then probably:
brew reinstall git
brew reinstall subversion