Skip to content

Instantly share code, notes, and snippets.

View maniqui's full-sized avatar

Julián Landerreche maniqui

View GitHub Profile
@dianjuar
dianjuar / xfce-shortcuts-screenshot.md
Last active February 11, 2022 08:33
My xfce shortcuts to take screenshots
Command Shortcut
xfce4-screenshooter --fullscreen --clipboard Ctrl + PrtScrn
xfce4-screenshooter --fullscreen --save /home/dianjuar/Pictures PrtScrn
xfce4-screenshooter --region --clipboard Ctrl + Shift + PrtScrn
xfce4-screenshooter --region --save /home/dianjuar/Pictures Shift + PrtScrn
xfce4-screenshooter --window --clipboard Ctrl + Super + PrtScrn
xfce4-screenshooter --window --save /home/dianjuar/Pictures Super + PrtScrn
@LittleCoding
LittleCoding / myelement.html.twig
Created September 27, 2016 13:37
Current URL path via Twig in Drupal 8
{#
/**
* @file
* Get the current URL path via Drupal 8 route name and twig function.
*/
#}
<a href="{{ url('<current>') }}">Current page</a>
@robbintt
robbintt / gulpfile.js
Last active April 5, 2019 07:20 — forked from gabrielhpugliese/gulpfile.js
Django collectstatic + Gulp watch
var gulp = require('gulp');
// Run shell commands with exec:
// https://www.npmjs.com/package/gulp-exec
var exec = require('child_process').exec;
// collectstatic task for Django
// https://www.npmjs.com/package/gulp-exec
gulp.task('collectstatic', function (cb) {
exec('python ../../manage.py collectstatic -i node_modules -i bower_components --noinput', function (err, stdout, stderr) {
@jdennes
jdennes / Gemfile
Last active September 22, 2022 16:31
Export a list of members from a GitHub organisation
source "https://rubygems.org"
gem "octokit"
@mlouro
mlouro / gulpfile.js
Last active June 21, 2022 23:20
gulpfile.js with browserify, jshint, libsass, browserSync for livereload, image optimization and system notifications on errors
'use strict';
var gulp = require('gulp');
var gutil = require('gulp-util');
var del = require('del');
var uglify = require('gulp-uglify');
var gulpif = require('gulp-if');
var exec = require('child_process').exec;
var notify = require('gulp-notify');
@jaytheletterj
jaytheletterj / updateMobile.py
Created June 19, 2013 00:08
python script to update a mobile phone number with the Google Admin SDK, specifically the Directory API
#!/usr/bin/python
import httplib2
from apiclient.discovery import build
from oauth2client.client import OAuth2WebServerFlow
from oauth2client.file import Storage
from oauth2client.tools import run
from apiclient.errors import HttpError
@willurd
willurd / web-servers.md
Last active May 28, 2024 06:57
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@aarongustafson
aarongustafson / backup-to-git.sh
Created August 10, 2011 15:44
DB Backup to Git
#!/bin/bash
##
# MySQL DB dump to Git commit
#
# Dumps the specified mysql database to the given location and commits it and
# the previous database to the Git repository.
#
# It is assumed you have already setup the Git respository to only be the
# a checkout of the database backup location

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server: