Skip to content

Instantly share code, notes, and snippets.

View spookyvision's full-sized avatar
🥚
egg

Anatol Ulrich spookyvision

🥚
egg
View GitHub Profile
@spookyvision
spookyvision / Cargo.toml
Last active May 11, 2023 23:02
fractal noise w/ Dioxus
[package]
name = "seedy"
version = "0.1.0"
authors = ["Anatol Ulrich <e+github@mail.taugt.net>"]
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
dioxus = "0.3"
#
# Xilinx Zynq ZC706 Evaluation Board
#
# Chris Johns <chrisj@rtems.org>
#
set PL_TAPID 0x23731093
source [find target/zynq-7000.cfg]
source [find xilinx-tcl.cfg]
@spookyvision
spookyvision / admin.py
Created June 18, 2018 15:04
ModelAdmin that does not create audit log entries
@admin.register(...)
class SilentAdmin(ModelAdmin):
def log_addition(self, request, object, message):
pass
def log_change(self, request, object, message):
pass
def log_deletion(self, request, object, object_repr):
pass
·darkfire·C:\tmp\foo> rmdir /tmp/foo
·darkfire·C:\tmp\foo> cd .
cd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
·darkfire·C:\tmp\test> mkdir home
·darkfire·C:\tmp\test> mkdir b
·darkfire·C:\tmp\test> cd home
·darkfire·C:\tmp\test\home> ln -s ../b ./a
·darkfire·C:\tmp\test\home> ls -la
total 4
drwxr-xr-x 3 ace wheel 102 Jan 4 17:48 .
drwxr-xr-x 4 ace wheel 136 Jan 4 17:48 ..
lrwxr-xr-x 1 ace wheel 4 Jan 4 17:48 a -> ../b
·darkfire·C:\tmp\test\home> ln -s /tmp/test/b ./a_absolute
/Users/ace$ mkdir /tmp/test
/Users/ace$ cd /tmp/test
/tmp/test$ rm -rf .
rm: "." and ".." may not be removed
/tmp/test$ rm -rf /tmp/test
/tmp/test$ cd .
cd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
#import "AppDelegate.h"
@interface AppDelegate ()
@property (nonatomic,strong) NSInputStream *inStream;
@property (nonatomic,strong) NSOutputStream *outStream;
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
#import <Foundation/Foundation.h>
@interface MultipartEncoder : NSObject
- (id)initWithURL:(NSString*)urlString;
-(void) addField:(NSString*)name value:(NSString*)value;
-(void) addFile:(NSString*)name data:(NSData*)fileData;
-(void) finish;
sqlite> create table table_name(foo smallint);
sqlite> drop table table_name;
sqlite>