Skip to content

Instantly share code, notes, and snippets.

View nicolasmendoza's full-sized avatar
🎯
Focusing

Nicolás nicolasmendoza

🎯
Focusing
  • 19:22 (UTC -05:00)
View GitHub Profile
@nicolasmendoza
nicolasmendoza / remove_old_kernels.md
Created September 19, 2018 00:57 — forked from harshalbhakta/remove_old_kernels.md
Ubuntu Software Updater: Not enough free disk space

The upgrade needs a total of 81.5 M free space on disk '/boot'. Please free at least an additional 17.4 M of disk space on '/boot'. Empty your trash and remove temporary packages of former installations using 'sudo apt-get clean'.

http://askubuntu.com/questions/142926/cant-upgrade-due-to-low-disk-space-on-boot

Run below command as suggested in the error message.

$ sudo apt-get clean

First check your current kernel version.

@nicolasmendoza
nicolasmendoza / iceWMdual.mkd
Created November 1, 2015 04:54 — forked from bxt/iceWMdual.mkd
IceWM Dual Screen expanding howto (very basic)

Step 1: Make sure xrandr works fine

Check your screen's names by typing:

xrandr -q

Step 2: Expand your screen

Then disable one of them: (notice VGA-1 is the name of the screen, will differ, e.g. HDMI-1 if the screen is connected via HDMI)

@nicolasmendoza
nicolasmendoza / remove.sh
Last active September 7, 2015 20:28 — forked from icaoberg/remove.sh
[Git] Remove all *.pyc files from your git repository
#!/bin/bash
find . -name "*.pyc" -exec git rm {} \;
git commit -m "Removed compiled python files in distribution left after last commit"
#!/bin/bash
# Script author: MrVaykadji http://askubuntu.com/users/176689/mrvaykadji
# Changes made by Ribtoks
# - simulink for compass2.0 in /usr/bin/
# - replaced apt commands with zypper commands
# Changes made by Andrew <andrew@webupd8.org>:
# - use the NodeJS PPA to avoid build failure with grunt-cli
# - use the Popcorn Time icon
# - added check for apt, dpkg, etc.
# - added some checks when creating symbolic links

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

import base64
"""
Some useful functions for interacting with Java web services from Python.
"""
def make_file_java_byte_array_compatible(file_obj):
"""
Reads in a file and converts it to a format accepted as Java byte array
:param file object
@nicolasmendoza
nicolasmendoza / post.py
Last active August 29, 2015 14:15 — forked from hoest/post.py
import httplib
import xml.dom.minidom
HOST = "www.domain.nl"
API_URL = "/api/url"
def do_request(xml_location):
"""HTTP XML Post request"""
request = open(xml_location, "r").read()