Skip to content

Instantly share code, notes, and snippets.

@rigwild
rigwild / selfbot.js
Last active April 9, 2022 20:37
This has moved to https://github.com/rigwild/discord-self-bot-console --- A simple Discord Self-bot using console
// Due to some interest, I created a proper repo.
// Check it out! :)
// https://github.com/rigwild/discord-self-bot-console
@odan
odan / xampp_php7_xdebug.md
Last active April 17, 2024 05:36
Installing Xdebug for XAMPP
/**
* Tabzilla global navigation for Mozilla projects
*
* This code is licensed under the Mozilla Public License 1.1.
*
* Portions adapted from the jQuery Easing plugin written by Robert Penner and
* used under the following license:
*
* Copyright 2001 Robert Penner
* All rights reserved.
@cmelchior
cmelchior / SerializeToJson.java
Last active September 20, 2022 04:30
Serialize Realm objects to JSON using GSON
// GSON can parse the data.
//
// Deserialization:
// Note there is a bug in GSON 2.3.1 that can cause it to StackOverflow when working with RealmObjects.
// To work around this, use the ExclusionStrategy below or downgrade to 1.7.1
// See more here: https://code.google.com/p/google-gson/issues/detail?id=440
//
// Serialization:
// <Type>RealmProxy objects are created by the Realm annotation processor. They are used to control
// access to the actual data instead of storing them in fields and it is therefore them we need to register a
FormHelper = {
getFormData: function(event, allowEmpty) {
var allowEmpty = 'boolean' === typeof allowEmpty ? allowEmpty : true;
var form = event.target ? $(event.target) : event;
var data = {};
form.find('input[type="hidden"][name], input[type="text"][name], input[name]:checked, textarea[name], select[name]').each(function(i) {
var keys = $(this).attr('name').replace(/\]/g, '').split('[');
var marker;
for (var i = 0; i < keys.length; i++) {
@kknd22
kknd22 / HibernateProxyTypeAdapter.java
Created April 29, 2014 15:12
GSON hibernate lazy fix
/**
* http://stackoverflow.com/questions/13459718/could-not-serialize-object-cause-of-hibernateproxy
*
* in bootstrap:
* import hbadapter.HibernateProxyTypeAdapter
*
* class BootStrap {
*
* def init = { servletContext ->
*