Skip to content

Instantly share code, notes, and snippets.

@jolos
jolos / test.py
Created September 16, 2021 13:46
import smartpdk_gen2.all as pdk
import ipkiss3.all as i3
from picazzo3.routing.place_route.cell import PlaceAndAutoRoute
import numpy as np
class LaserAngledShallow(i3.PCell):
str_wg_buffer_length = i3.PositiveNumberProperty(default=10.0)
bend_wg_radius = i3.PositiveNumberProperty(default=50.0)

Keybase proof

I hereby claim:

  • I am jolos on github.
  • I am jolos (https://keybase.io/jolos) on keybase.
  • I have a public key ASAKlCk--dmcBAHGN5jaZsjJYZNS9DnS960grxmA716zfgo

To claim this, I am signing this object:

@jolos
jolos / gist:7586194
Created November 21, 2013 17:45
Backing up over ssh
dd if=/dev/sda | gzip -1 - | ssh user@hostname dd of=sda.gz
@jolos
jolos / gist:6564557
Created September 14, 2013 18:51
enaml + ipython notes

The latest version have support for running gui threads in ipython. To use this functionality you have to use the %gui magic:

 %gui qt

However you first need to load the enaml dependencies, otherwise you get errors while importing the library. You can then start your application, and change the values of the Atom objects, and see the changes appear in your app.

@jolos
jolos / content-disposition.md
Last active October 13, 2015 07:27
http content-disposition header

Some notes about the http content-disposition header:

The content-disposition header can be used to force browsers to download a file instead of trying to display it. In apache you can set the header with the following rule :

<IfModule mod_headers.c>
        <FilesMatch "\.(mp3)$">

Header set Content-Disposition attachment

@jolos
jolos / README.md
Created November 3, 2012 14:18
Client side error logging with Google analytics

With client side code ( aka javascript ) becoming a crucial part of modern websites/webapplications, it's also becoming more difficult to know what is happening when the code is actually being executed. Code failing on a server is relatively easy to spot, this is not the case with javascript. Hence, if you're building a serious client side application robust logging is one of the first things you should set up. ( In fact this also holds for backend systems ).

For my own website I'm keeping it simple and I'm leveraging google analytics to log possible errors. As you see this is not rocket science but it's a good way to spot possible errors.

@jolos
jolos / README.md
Created October 31, 2012 16:03
drupal-pattern : Clear the cache of a view

This is a simple pattern for clearing the cache of a view. You could do this by searching for the right cache id. But this is imo a more robust way to clear the cache.

@jolos
jolos / gist:3122669
Created July 16, 2012 13:19
Elastic Search Notes

GET _cluster/state : provides information about the cluster, including information on the possible fields

@jolos
jolos / gist:2932413
Created June 14, 2012 19:30
PHP tips and notes
  • you can use the VLD tool to dump php's opcodes, can be very interesting when you want to know what kind of magic/voodoo php is doing :
php -dvld.active=1 program.php
  • apc.stat if disabled, apc won't check if the file has been changed, on production this can be safely disabled
@jolos
jolos / gist:2916116
Created June 12, 2012 08:17
Notes compiling/using Mahout for hadoop 2.0

Compiling

Mahout already provides a profile for compiling against hadoop 2.0:

mvn install -Dhadoop.version=3.0.0-SNAPSHOT -Phadoop-0.23

But you probably want to clean first and skip the tests: