Skip to content

Instantly share code, notes, and snippets.

View earthnuker's full-sized avatar
🤘
Hack the Planet!

Daniel S. earthnuker

🤘
Hack the Planet!
View GitHub Profile
import bpy
import random
import mathutils
from math import radians,degrees
bpy.ops.object.select_pattern(pattern="IVY_Curve*",extend=False)
for obj in bpy.context.selected_objects:
obj.select_set(state=True)
bpy.ops.object.delete()
# Windows PowerShell Script to use restic to backup files using the Volume Shadow Copy Service, allowing
# that are in use to be backed up. The script must be run with elevated privileges.
# The Volume Shadow Copy Service must be enabled for the disk volume that contains the files to be backed up.
#
# credit: https://github.com/turnkey-commerce
#
# Parameters
# Config
use pyo3::prelude::*;
#[allow(dead_code)]
#[pyclass]
pub struct State {
pub x: usize,
pub y: usize,
pub z: usize,
}
#[pymodule]
@earthnuker
earthnuker / lib.err
Last active July 8, 2019 17:57
PyO3 Python callback from Rust
error[E0277]: the trait bound `pyo3::object::PyObject: pyo3::instance::PyNativeType` is not satisfied
--> src\lib.rs:16:13
|
16 | ObjectProtocol::is_callable(&callback)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `pyo3::instance::PyNativeType` is not implemented for `pyo3::object::PyObject`
|
= note: required because of the requirements on the impl of `pyo3::objectprotocol::ObjectProtocol` for `pyo3::object::PyObject`
= note: required by `pyo3::objectprotocol::ObjectProtocol::is_callable`
@earthnuker
earthnuker / glitch.ini
Last active November 25, 2017 17:51
IMG_Glitch
[DEFAULT]
reload=0
header_size=1024
iter_cnt=16
file_cnt=1
quiet=1
join=0
mode=reverse:1024
[raw]
import requests as RQ
import re
from dateutil.parser import parse
from vessel import Vessel,engine,session
from tqdm import tqdm
import jinja2
import jinja2.sandbox
import jinja2.meta
data=str(RQ.get("https://raw.githubusercontent.com/XXIIVV/vessel.paradise/master/memory/paradise.ma").content,"utf-8").splitlines()
Vessel.metadata.drop_all(engine)
@earthnuker
earthnuker / Vagrantfile
Created August 23, 2017 23:43
Vagrant, Anaconda+Salt Cluster
# -*- mode: ruby -*-
# vi: set ft=ruby :
num_nodes=4
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision :shell, path: "bootstrap.sh", privileged: false
config.vm.provider "virtualbox" do |v|
v.linked_clone = true
v.cpus = 1

Keybase proof

I hereby claim:

  • I am Earthnuker on github.
  • I am earthnuker (https://keybase.io/earthnuker) on keybase.
  • I have a public key whose fingerprint is 7064 D5AB 2136 523D F7ED 6798 BCF9 5F51 FC13 D5A5

To claim this, I am signing this object:

@earthnuker
earthnuker / nbody.cpp
Created October 25, 2016 20:58
N-Body Simulation
#include <iostream>
#include <cmath>
#include <vector>
#include <random>
#include <chrono>
#include <algorithm>
#include <functional>
#include <fstream>
#include <omp.h>
#include <parallel/algo.h>
import util
import base64
import hashlib
import os
class Level_1(object):
hint="Come on, it's the first challenge and you already need a hint?"
flag=util.rand_str(10)
challenge=base64.b64encode(flag.encode("utf-8")).decode("utf-8")
text="Decode me: {}".format(challenge)
def __init__(self):