This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from xmlrpclib import ServerProxy | |
proxy = ServerProxy('http://api.springfiles.com/xmlrpc.php') | |
searchstring = { | |
"category" : "engine_linux64", | |
"limit": 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
from panda3d.core import NodePath | |
from panda3d.core import TransformState | |
from panda3d.core import Vec3 | |
from panda3d.bullet import BulletBoxShape | |
from panda3d.bullet import BulletConeShape | |
from panda3d.bullet import BulletConvexHullShape | |
from panda3d.bullet import BulletCylinderShape |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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(';'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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-$$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 ! \ |
OlderNewer