Skip to content

Instantly share code, notes, and snippets.

View Ironjanowar's full-sized avatar
💜

César Guzmán Ironjanowar

💜
  • FCM Travel
  • Madrid, Spain
  • 23:19 (UTC +01:00)
View GitHub Profile
@ignaciobll
ignaciobll / AoC-day04.mzn
Created December 4, 2019 10:39
Solution to Advent Of Code Day 04 with MiniZinc (CLP)
array [1..6] of var 0..9: pass;
int:lower = 264793;
int:upper = 803935;
predicate in_range(array [1..6] of var 0..9: a) =
let {
var int: n = a[1] * 100000 +
a[2] * 10000 +
a[3] * 1000 +
@dive
dive / fix-emacs-permissions-catalina.el
Created September 29, 2019 09:55
Fix Emacs permissions on macOS Catalina
;;; package --- Fix permissions for Emacs.app on macOS Catalina
;;; Author: Artem Loenko
;;; Mail-To: <[email protected]>
;;; Commentary:
;;; Code:
(defconst _default-emacs-app-plist-path "/Applications/Emacs.app/Contents/Info.plist")
(defconst _temp-buffer-name "*fixing Emacs permissions*")
(defconst _temp-buffer (get-buffer-create _temp-buffer-name))
(with-current-buffer _temp-buffer (erase-buffer))
@prathik
prathik / bufs.el
Last active June 14, 2019 09:49
Emacs - Switch to new notes buffer
(defun new-scratch-buffer-new-window ()
"Create a new scratch buffer in a
new window. I generally take a lot of notes
in different topics. For each new topic hit
C-c C-s and start taking your notes.
Most of these notes don't need to be
saved but are used like quick post it
notes."
(interactive)
(let (($buf (generate-new-buffer "notes")))
@simov
simov / server.js
Created January 12, 2018 18:11
Serve static files with NodeJS and Express
var express = require('express')
var serveIndex = require('serve-index')
var serveStatic = require('serve-static')
var app = express()
app.use(serveStatic('/home/s'))
app.use('/', serveIndex('/home/s', {'icons': true, view: 'details'}))
app.listen(8001)
@bkuhl
bkuhl / .gitlab-ci.yml
Last active September 4, 2024 14:11
How to use docker-compose in GitLab CI
# Using edge-git ensures we're always pulling the latest
# You can lock into a specific version using the *-git tags
# on https://hub.docker.com/_/docker/
image: docker:edge-git
services:
- docker:dind
# If you only need compose in a specific step definitely put this
# only in that step so it's not executed unnecessarily
before_script:
@ibraheem4
ibraheem4 / postgres-brew.md
Last active October 14, 2024 11:59 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@santisbon
santisbon / Update-branch.md
Last active October 16, 2024 09:09
Deploying from #Git branches adds flexibility. Bring your feature branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master.

@shau-lok
shau-lok / add local aar file.md
Last active January 20, 2022 08:23
Android Studio add local .aar reference

Add local .aar file

  1. basic build.gradle directory using flatDir
repositories {
    mavenCentral()
    flatDir {
 dirs 'libs'
@rain1024
rain1024 / tut.md
Last active December 24, 2024 12:22
Install pdflatex ubuntu

PdfLatex is a tool that converts Latex sources into PDF. This is specifically very important for researchers, as they use it to publish their findings. It could be installed very easily using Linux terminal, though this seems an annoying task on Windows. Installation commands are given below.

  • Install the TexLive base
sudo apt-get install texlive-latex-base
  • Also install the recommended and extra fonts to avoid running into the error [1], when trying to use pdflatex on latex files with more fonts.