Skip to content

Instantly share code, notes, and snippets.

View azisaka's full-sized avatar

Zisa azisaka

View GitHub Profile
@JPenuchot
JPenuchot / .zshrc
Last active July 8, 2021 04:39
~/.config/i3/config for my Dell XPS 13 HiDPI running on Solus
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:/home/jpenuchot/node_modules/.bin:$HOME/.cargo/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"
@felipesere
felipesere / deploy.sh
Created October 19, 2015 23:27
Deploying form Circle-CI to AWS- ECS
#!/bin/bash
aws --version
aws configure set default.region us-west-2
aws configure set default.output json
echo "preparing task definition"
aws ecs describe-task-definition --task-definition applications | ./jq --arg x $CIRCLE_SHA1 ' .taskDefinition
| del(.status)
| del(.taskDefinitionArn)
@creationix
creationix / instructions.md
Last active February 6, 2020 01:59
Installing Ubuntu Gnome 14.10 on Late 2013 Retina Macbook Pro 13"

Installing Ubuntu on a Mac

Desktop linux has been late to the show with high dpi support, but gnome seems to be leading the pack. I decided to try again. It's worked fairly well out of the box. Here are my steps if anyone wishes to repeat.

Booting into Ubuntu Live Image

@wandernauta
wandernauta / sp
Last active November 9, 2024 17:03
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@mergulhao
mergulhao / gist:6269789
Last active April 6, 2017 13:33
How to convert a PFX ssl certificate to PEM? If you are in Brazil and buy an A1 (e-CNPJ) certificate from CertSign it comes as a PFX. We need to convert it to PEM format so we can use the certificate to sign documents electronically and use it to access a lot of APIs, incluing NFe.
### pfx to pem, complete edition:
$ openssl pkcs12 -in filename.pfx -nocerts -out key.pem
$ openssl pkcs12 -in filename.pfx -clcerts -nokeys -out cert.pem
$ openssl pkcs12 -in filename.pfx -cacerts -out ca_cert.pem
@reifman
reifman / default.vcl
Last active September 9, 2021 08:15
Example Varnish VCL Configuration e.g. /etc/varnish/default.vcl
# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "8080";
.connect_timeout = 60s;
.first_byte_timeout = 60s;
.between_bytes_timeout = 60s;
.max_connections = 800;
}
require 'nokogiri'
RSpec::Matchers.define :have_xml do |xpath, text|
match do |body|
doc = Nokogiri::XML::Document.parse(body)
nodes = doc.xpath(xpath)
nodes.empty?.should be_false
if text
nodes.each do |node|
node.content.should == text
end
@ssp
ssp / emf-converter.sh
Created November 13, 2012 14:54
Convert Windows EMF to usable graphics files with a crazy chain of tools.
#! /bin/sh
# Convert Windows EMF to usable graphics files with a crazy chain of tools.
# 2012 Sven-S. Porst, SUB Göttingen <[email protected]>
# Configuration
BASEPATH=/Users/ssp/SUB/edfu/emf
WINE=wine
METAFILE2EPS=$BASEPATH/metafile2eps-linux/metafile2eps.exe
PS2PDF=ps2pdf
INKSCAPE=/Applications/Graphik/Inkscape.app/Contents/Resources/bin/inkscape
@adrienbrault
adrienbrault / purge.sh
Created September 24, 2012 10:02
Script to reduce VM size before packaging for vagrant
#!/bin/sh
# Credits to:
# - http://vstone.eu/reducing-vagrant-box-size/
# - https://github.com/mitchellh/vagrant/issues/343
aptitude -y purge ri
aptitude -y purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide
aptitude -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30
aptitude -y purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5
@scottatron
scottatron / README.md
Created August 11, 2012 04:17
Lossless compression of images in Rails using Dragonfly & image_optim

This runs provides an .optim job for dragonfly and also adds the .optim job into .thumb

This requires you have the 'image_optim' gem and it's dependencies.