Skip to content

Instantly share code, notes, and snippets.

View TurBoss's full-sized avatar

TurBoss TurBoss

  • Spain
View GitHub Profile
@TurBoss
TurBoss / linuxcnc-sherline.cps
Created October 8, 2017 10:27 — forked from robanonymous/linuxcnc-sherline.cps
This a custom post processor for Autodesk Fusion 360 that has more options for the Sherline mill (I'm using 5400). To add this file on Mac: Right click on Fusion360 App in Applications, Select Show Package Contents - Navigate to Contents -> Libraries -> Applications -> CAM360 -> Data -> Posts, Grab and Drop File (Authenticate)
/**
Copyright (C) 2012-2015 by Autodesk, Inc.
All rights reserved.
LinuxCNC (EMC2) Sherline post processor configuration.
$Revision: 00001 04fc0f7ff12e03d457d27cfcf3265dfc183241e5 $
$Date: 2016-10-08 13:46:56 $
FORKID {240C366F-30B2-4629-945B-8647E01614FC}
@TurBoss
TurBoss / README.rst
Created September 16, 2017 13:05 — forked from tonyseek/README.rst
Build Python binding of C++ library with cffi (PyPy/Py3K compatible)

Run with Python:

pip-2.7 install cffi
PYTHON=python2.7 sh go.sh

Run with PyPy:

pip-pypy install cffi
PYTHON=pypy sh go.sh
@TurBoss
TurBoss / GStreamer-1.0 some strings.sh
Created September 11, 2017 19:09 — forked from strezh/GStreamer-1.0 some strings.sh
GStreamer-1.0 personal cheat sheet
#!/bin/bash
# play YUV444 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! \
videoconvert ! \
autovideosink
# play YUV422 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
@TurBoss
TurBoss / self-signed-root-ca-and-certificates.sh
Created September 9, 2017 20:12 — forked from jaymecd/self-signed-root-ca-and-certificates.sh
Create Root CA and self-signed Certificate for local TLS testing.
#!/usr/bin/env bash
set -e
# Full Qualified Domain Name
FQDN="${1:-localhost.dev}"
FQDN="$(echo "${FQDN}" | tr 'A-Z' 'a-z')"
# Optional settings
COUNTRY="DE"
@TurBoss
TurBoss / install-pygtk.sh
Created April 17, 2017 17:28 — forked from mehcode/install-pygtk.sh
Install pygtk inside of a virtualenv
# Ensure we're in a virtualenv.
if [ "$VIRTUAL_ENV" == "" ]
then
echo "ERROR: not in a virtual environment."
exit -1
fi
# Setup variables.
CACHE="/tmp/install-pygtk-$$"
@TurBoss
TurBoss / Odoo reset admin pw
Created January 3, 2017 13:46 — forked from yurytello/Odoo reset admin pw
Hack to reset the admin password of Odoo
Reset admin Password
1) Obtener el login del administrador
=> select login from res_users where id=1;
2) Verificar que tenga habilitado el parámetro auth_signup_reset_password
=> update base_config_settings set auth_signup_reset_password=true;
# Si NO nay registros entonces insertar un nuevo registro
=> insert into base_config_settings(auth_signup_reset_password) values(true);
3) Crear un token de reset_password para el administrador
=> update res_partner
How to create a 4MB FreeDOS boot disk for eg, doing a motherboard bios upgrade.
Originally from http://www.linuxinsight.com/how-to-flash-motherboard-bios-from-linux-no-dos-windows-no-floppy-drive.html
The following is a brief outline of how I created a 4MB CD boot image to update the bios on a motherboard I have been considering buying.
I do not have this motherboard, but I have tested the bootable CD up to the point of actually flashing the bios.
FWIW, my computer runs PATA / IDE HDs and optical drives. Not SATA.
Adjust accordingly to your distro, hardware, etc.
I'm human, and make typos on occasion. So double check your input.
@TurBoss
TurBoss / Cloudbox
Created July 23, 2016 15:26 — forked from sleimanzublidi/Cloudbox
Cloudbox SSH
t's quite easy, no disassembling required.
1. Enable SFTP in the web interface
2. Open a SFTP connection to the box using your admin account
3. Change directory to the Admin: cd Admin
4. Create a link for default.runlevel file: symlink /etc/initng/runlevel/default.runlevel default.runlevel
5. Create a link for shadow file: symlink /etc/shadow shadow
6. Create a link for unicorn.sharing.ssh.conf file: symlink /etc/unicorn/unicorn_conf/unicorn.sharing.ssh.conf unicorn.sharing.ssh.conf
7. You can close SFTP connection now
8. Open the web file manager in your browser and navigate to the Admin folder
The following are command line commands for backing up /dev/sda1 in the same manner
that "redo backup and restore" uses. Note that the MD5 of the partition files will
not be the same because gzip stores info about the current time
(http://superuser.com/questions/617934/):
#mount network drive
mount.cifs '//host.example.com/fab/temp' /mnt/backup -o username=myuser,password=mypass
#save backup list (sda1 in our case)
echo sda1 > /mnt/backup/20141009.backup
@TurBoss
TurBoss / ajax_setup.js
Last active August 29, 2015 14:26 — forked from rca/ajax_setup.js
Setup Django CSRF token in JQuery AJAX requests
/**
* setup JQuery's AJAX methods to setup CSRF token in the request before sending it off.
* http://stackoverflow.com/questions/5100539/django-csrf-check-failing-with-an-ajax-post-request
*/
function getCookie(name)
{
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');