Skip to content

Instantly share code, notes, and snippets.

View brpaz's full-sized avatar

Bruno Paz brpaz

View GitHub Profile
@ssddanbrown
ssddanbrown / Instructions.md
Last active March 14, 2021 11:57
Visual Studio Code Linux Desktop File

How to use

  1. Follow the linux documentation found here to install Visual Studio Code.
  2. Copy the contents of code.desktop to ~/.local/share/applications/code.desktop
  3. Change /home/dan/Apps/vsc in the code.desktop file to the location you extracted the application to.

This how only been tested by myself on ElementaryOS Freya.

@matthiasbayer
matthiasbayer / updateJetbrains.sh
Last active September 13, 2017 12:37
Install or update Jetbrains Software to latest EAP or stable version
#!/usr/bin/env bash
case "${1}" in
"phpstorm")
TOOL_NAME="PhpStorm"
INSTALL_DIR="/opt/phpstorm"
EAP_URL="https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program"
EAP_FILE="PhpStorm-EAP-[0-9\.]+(:?[a-z\-]+)?.tar.gz"
STABLE_URL="https://confluence.jetbrains.com/display/PhpStorm/Previous+PhpStorm+Releases"
STABLE_FILE="PhpStorm-[0-9\.]+.tar.gz"
@jwage
jwage / .php_cs
Last active April 14, 2025 19:32
php-cs-fixer git pre commit hook
<?php
return Symfony\CS\Config\Config::create()
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
->fixers([
'short_array_syntax',
'ordered_use',
])
;
@omegahm
omegahm / create_labels.sh
Created April 7, 2015 19:00
Create Gtihub labels from Bash
#!/usr/bin/env bash
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/
###
# Label definitions
###
declare -A LABELS
# Platform
@webdevilopers
webdevilopers / ContractController.php
Last active March 11, 2020 09:00
Symfony Event Listener to send html mail using SwiftMailer and Twig
<?php
namespace Acme\Bundle\ContractBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class ContractController extends Controller
{
public function eventAction(Contract $contract)
{
$event = new ContractEvent($contract);
@scottslowe
scottslowe / yaml-vagrantfile
Created October 21, 2014 21:16
This Vagrantfile works with an external data file (a YAML file, named servers.yaml) to create multiple Vagrant boxes easily. The servers.yaml file contains all the specifics and can be easily edited to change the number and type of boxes to create. The Vagrantfile remains unchanged.
# -*- mode: ruby -*-
# # vi: set ft=ruby :
# Specify minimum Vagrant version and Vagrant API version
Vagrant.require_version ">= 1.6.0"
VAGRANTFILE_API_VERSION = "2"
# Require YAML module
require 'yaml'
@javiereguiluz
javiereguiluz / gist:a66f084a4f2cf11cf0ee
Last active August 27, 2016 17:47
Discussion about the different solutions to display a flash message

The problem to solve

We want to show a flash message as the result of executing some controller. This message will only last for the next request.

Proposed Solution #1

I propose to use the new addFlash() method available in the base controller of Symfony 2.6:

@lorin
lorin / vagrant.py
Created September 25, 2014 21:25
Vagrant dynamic inventory script for Ansible
#!/usr/bin/env python
# Adapted from Mark Mandel's implementation
# https://github.com/ansible/ansible/blob/devel/plugins/inventory/vagrant.py
import argparse
import json
import paramiko
import subprocess
import sys
@johnnyman727
johnnyman727 / listening-client.js
Created September 23, 2014 19:57
Simple MQTT Server. Tessel acts as an MQTT client sending temperature data to a host
var mqtt = require('mqtt')
// Make sure to change this to the IP address of your MQTT server
, host = '192.168.128.204' // or localhost
client = mqtt.createClient(1883, host, {keepalive: 10000});
// Subscribe to the temperature topic
client.subscribe('temperature');
// When a temperature is published, it will show up here
client.on('message', function (topic, message) {
@IzumiSy
IzumiSy / manifest.json
Last active August 16, 2024 05:25
Chrome.storage.sync example
{
"name": "SyncExtension",
"version": "0.1",
"manifest_version": 2,
"description": "Storage Sync Extension",
"permissions": [ "storage" ],
"browser_action": {