Skip to content

Instantly share code, notes, and snippets.

@beiker
beiker / sound-output.js
Last active September 12, 2023 03:04
Script Kit Sound Output
// Name: Sound Output
// Description: Select a device for sound output
// https://apple.stackexchange.com/questions/213011/any-way-to-change-sound-output-device-via-applescript-or-shell
import '@johnlindquist/kit'
const {stdout} = await exec('SwitchAudioSource -a -t output')
const outputSelected = await arg(
@beiker
beiker / settings.json
Created December 7, 2019 00:55
VSCode Settings
{
"window.zoomLevel": 0,
"editor.minimap.enabled": false,
"workbench.statusBar.visible": false,
"explorer.openEditors.visible": 0,
"workbench.activityBar.visible": false,
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"workbench.editor.showTabs": false,
"vim.insertModeKeyBindings": [
@beiker
beiker / laravel-project.sh
Last active October 2, 2019 20:39
Bash script that creates a new laravel project and performs all Homestead configurations for you
#!/bin/bash
# This script creates a new laravel project and performs all Homestead configuration for you.
#
# This are some other things that the script do for you:
#
# - Add the new site to the /etc/hosts file
# - Add the configurations (folders, sites, databases) to the Homestead.yaml file
# - Creates the database in mysql or postgres
# - Serve the new site in homestead
@beiker
beiker / postgres-manual
Created July 29, 2014 15:15
Ejecutar postgres manualmente
/usr/lib/postgresql/9.3/bin/postgres -d 3 -D /var/lib/postgresql/9.3/main \-c config_file=/etc/postgresql/9.3/main/postgresql.conf
@beiker
beiker / ThemesIndicators.sh
Created July 19, 2014 03:20
Instala Themes && Indicatars
#!/bin/bash
# Indicadores
echo "Agregando PPA's"
sudo add-apt-repository -y ppa:indicator-multiload/stable-daily
sudo add-apt-repository -y ppa:caffeine-developers/ppa
sudo add-apt-repository -y ppa:indicator-brightness/ppa
sudo add-apt-repository -y ppa:atareao/atareao
echo "Actualizando Dependencias"
@beiker
beiker / development.sh
Last active August 29, 2015 14:00
Instala el ambiente de desarrollo
#!/bin/bash
# Antes de ejecutar este bash verificar que es lo que se requiere instalar y comentar o descomentar
# lo necesario.
# Source
# http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-ubuntu-12.04-lts-lamp
# PPAs
sudo add-apt-repository ppa:ondrej/php5
@beiker
beiker / ubuntu-apps.sh
Last active August 29, 2015 14:00
Script que instala las apps en ubuntu
#!/bin/bash
echo "Agregando PPA's"
#sudo add-apt-repository -y ppa:gnome-terminator
#--- sudo add-apt-repository -y ppa:a-v-shkop/chromium
#---- ubuntu tweak
sudo add-apt-repository -y ppa:tualatrix/ppa
#---- Chrome
#!/bin/bash
# Script para instalar Sublime Text 2 version.
# Requiere la URL del archivo .tar.bz2 (http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2%20x64.tar.bz2) <= URL a la creación de este archivo
echo "Sublime Link de Descarga"
read sublime_link
echo "Instalando Sublime Text..."
cd /opt && sudo wget $sublime_link
sudo tar xf Sublime\ Text\ 2.0.2\ x64.tar.bz2
if (!window.btoa) {
// Source: http://www.koders.com/javascript/fid78168FE1380F7420FB7B7CD8BAEAE58929523C17.aspx
btoa = function (input) {
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
var result = '';
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
#!/bin/bash
# This script creates a new project (or site) under /var/sites and creates
# new virtual host for that site. With the options a site can also
# install the latest version of Laravel directly.
# This script was originally based on the following script by @Nek from
# Coderwall: https://coderwall.com/p/cqoplg
# Display the usage information of the command.
create-project-usage() {