I hereby claim:
- I am justintarthur on github.
- I am justintarthur (https://keybase.io/justintarthur) on keybase.
- I have a public key whose fingerprint is 9E92 D2B9 2DBF 37AC 60BB 5027 DA45 B72D 195B 2168
To claim this, I am signing this object:
class EmberModelSerializer(serializers.ModelSerializer): | |
""" | |
A serializer that formats list data in a way that will be readable by Ember.js. | |
""" | |
@classmethod | |
def get_class_ember_name(cls): | |
type_name = cls.__name__.replace('Serializer','') | |
return type_name.lower() |
from django.views.decorators.csrf import csrf_exempt | |
@csrf_exempt | |
def reverse_proxy(request): | |
""" | |
Reverse proxy for a remote service. | |
""" | |
path = request.get_full_path() | |
#Optionally, rewrite the path to fit whatever service we're proxying to. | |
app.js: | |
var app = angular.module('app', ['appControllers', 'appServices']); | |
services.js: | |
var services = angular.module('appServices', ['djangoRESTResources']); | |
services.factory('Team', ['djResource', | |
... | |
]); | |
// Or if you still need $resource to communicate with a different backend: |
indices[scope.call(root_node)] ||= 0 | |
set_left_and_rights.call(root_node) | |
end | |
+ | |
+ # Set depths based on left/right nesting: | |
+ if column_names.map(&:to_s).include?(depth_column_name.to_s) | |
+ get_depths_sql = "SELECT #{quoted_table_name}.#{primary_key}, COUNT(parent.#{primary_key}) -1 AS #{quoted_depth_column_name} | |
+ FROM #{quoted_table_name}, #{quoted_table_name} AS parent | |
+ WHERE #{quoted_table_name}.#{quoted_left_column_name} BETWEEN parent.#{quoted_left_column_name} AND parent.#{quoted_right_column_name}" | |
+ |
// Assumes an encoded password entry that looks like: | |
// pbkdf2_sha256$13000$I2fysbVVZ$6WuU/biq8RveLuiTgpLeEJ7hcqoqpkqVlpUIHWUoi9I= | |
String[] encodedPassword = passedInPassword.split("\\$"); | |
int encodedIterations = Integer.parseInt(encodedPassword[1]); | |
byte[] encodedSalt = encodedPassword[2].getBytes(Charset.forName("UTF-8")); | |
String encodedHash = encodedPassword[3]; | |
SecretKeyFactory f = null; | |
try { |
I hereby claim:
To claim this, I am signing this object:
""" | |
Uses the same ecdsa library and hashing as Electrum <2.5 and approximates how likely a high-s | |
signature is to be produced. | |
Needs same dependencies as electrum, so can be run in the same virtualenv as electrum. | |
""" | |
import ecdsa | |
from random import randint | |
from os import urandom |
#!/bin/bash | |
source /opt/python/run/venv/bin/activate | |
source /opt/python/current/env | |
if [ -f /etc/elasticbeanstalk/set-ulimit.sh ]; then | |
source /etc/elasticbeanstalk/set-ulimit.sh | |
fi | |
exec python "$@" |
module &signal:1:0:$full:$large:$default; | |
extension "amd:gcn"; | |
extension "IMAGE"; | |
// Sample Kernel From Michael Körber | |
prog kernel &__signal_test_kernel( | |
kernarg_u64 %val, | |
kernarg_sig64 %handle_in, | |
kernarg_sig64 %handle_out) |
#!/usr/bin/env sh | |
set -e | |
VALHEIM_APP_PATH=${1:-"${HOME}/Library/Application Support/Steam/SteamApps/common/Valheim/valheim.app"} | |
BEPINEX_FRIENDLY_ENTITLEMENTS='<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict><key>com.apple.security.cs.allow-jit</key><true/><key>com.apple.security.cs.disable-library-validation</key><true/><key>com.apple.security.device.bluetooth</key><true/><key>com.apple.security.device.usb</key><true/><key>com.apple.security.network.client</key><true/><key>com.apple.security.network.server</key><true/><key>com.apple.security.cs.allow-dyld-environment-variables</key><true/></dict></plist>' | |
ENTITLEMENTS_PATH='/tmp/revised_valheim_entitlements.plist' | |
main() { | |
read -p " | |
Re-signing and re-entitling Valheim at |