Skip to content

Instantly share code, notes, and snippets.

View joar's full-sized avatar
:bowtie:
Not wearing a bowtie

Joar Wandborg joar

:bowtie:
Not wearing a bowtie
View GitHub Profile
jwandborg@sophie:~$ dropbox & # Starts the progress, sends it to the background immediately, the process is running.
[1] 24055
jwandborg@sophie:~$ fg # Brings the latest process in the background process stack to the foreground (you can also use `fg <number>` to choose another than the latest)
dropbox
^Z # Suspends the process, the process is now in the background, but is not running.
[1]+ Stopped dropbox
jwandborg@sophie:~$ bg # Sends the latest suspended process to the background, the process is now running in the background.
[1]+ dropbox &
15/23:58.22 < Elrond> ";o)" <-- don't take me seriously.
diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py
index bf825a2..a2b5b72 100644
--- a/mediagoblin/db/models.py
+++ b/mediagoblin/db/models.py
@@ -24,6 +24,7 @@ from mediagoblin import mg_globals
from mediagoblin.db import migrations
from mediagoblin.db.util import DESCENDING, ObjectId
from mediagoblin.util import Pagination
+from mediagoblin.util import IMAGE_FETCHING_ORDER
@joar
joar / node-and-npm-in-30-seconds.sh
Created July 4, 2011 11:41 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
>>> for i in bpy.data.objects:
... print(i)
...
<bpy_struct, Object("Camera")>
<bpy_struct, Object("Cube")>
<bpy_struct, Object("Particle")>
<bpy_struct, Object("Plane")>
<bpy_struct, Object("Plane.001")>
<bpy_struct, Object("Sphere")>
<bpy_struct, Object("Sphere.001")>
@joar
joar / gist:1163169
Created August 22, 2011 18:50
I deleted ALL the entries.
> var fire = db.media_entries.find().sort({created: -1}).limit(1)
> fire
{ "_id" : ObjectId("4e5024bad9d78315a6000000"), "attachment_files" : [
{
"filepath" : [
"media_entries",
"4e5024bad9d78315a6000000",
"attachment",
"DSC_2577.JPG"
],
cmake_minimum_required(VERSION 2.8)
project(TMFS CXX)
#SET(Boost_ADDITIONAL_VERSIONS "1.43" "1.43.0" "1.44" "1.44.0" "1.45" "1.45.0")
SET(BOOST_ROOT "$ENV{HOME}/Downloads/boost_1_47_0/build")
SET(Boost_INCLUDE_DIR "${BOOST_ROOT}/include")
SET(Boost_LIBRARY_DIRS "${BOOST_ROOT}/lib")
SET(Boost_LIBRARIES "${BOOST_ROOT}/lib/libboost_filesystem-mt.so;${BOOST_ROOT}/lib/libboost_regex-mt.so")
  • Find and open your hosts file.
    You need administrative rights to edit the file

    Windows
    Right click -> Run as Administrator on the notepad icon, or the icon of any other editor.

    Linux
    On the command line:

@joar
joar / mc2obj-turn-off-antialiasing.py
Created September 28, 2011 23:54
mc2obj turn off antialiasing (batch script)
import bpy
import re
materials = {
'Bedrock': {},
'Chest_Front': {},
'Chest_Left_Back': {},
'Chest_Left_Front': {},
'Chest_Right_Back': {},
'Chest_Right_Front': {},
# GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011 MediaGoblin contributors. See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of