Skip to content

Instantly share code, notes, and snippets.

View adamlwgriffiths's full-sized avatar
💭
Working in a silo

Adam Griffiths adamlwgriffiths

💭
Working in a silo
  • Twisted Pair Development
  • Melbourne, Australia
View GitHub Profile
@adamlwgriffiths
adamlwgriffiths / gist:517aaf5ba5abcb4b6f16
Created January 7, 2015 07:21
EditBox placement error
var IOS_NamePlayer = cc.Scene.extend({
layer: null,
next_scene: null,
text_field: null,
placeholder: "Input text here",
ctor: function() {
this._super();
this.layer = cc.Layer.create();
var loadScript = function(url, callback) {
/*
JavaScript that will load the jQuery library on Google's CDN.
We recommend this code: http://snipplr.com/view/18756/loadscript/.
Once the jQuery library is loaded, the function passed as argument,
callback, will be executed.
*/
var script = document.createElement("script");
script.type = "text/javascript";
from __future__ import absolute_import, print_function, unicode_literals
from django.db import models, transaction
from django.utils import six
from django.apps import apps
from django.core.exceptions import FieldDoesNotExist
try:
# Django 1.7
from django.contrib.admin.utils import NestedObjects
except ImportError:
# Django < 1.7
@adamlwgriffiths
adamlwgriffiths / Heroku error log
Created March 17, 2016 23:53
cannot load such file -- bundler/setup (LoadError)
-----> Fetching set buildpack https://github.com/ddollar/heroku-buildpack-multi.git... done
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-ruby.git
=====> Detected Framework: Ruby
-----> Compiling Ruby
-----> Using Ruby version: ruby-2.2.2
-----> Installing dependencies using bundler 1.11.2
Your app was upgraded to bundler 1.11.2.
Previously you had a successful deploy with bundler 1.9.7.
These URLs were redirected to when I attempted to download Malware Bytes.
It attempted to download a similarly named (mb2...) executable (.exe) instead.
http://www.reimagemac.com/mac/?tracking=revz2&banner=ak%20efix%20ron%20au%20cpi%204&adgroup=direct&ads_name=direct&keyword=malwarebytes.com&context=591a431e025ed400135f9163
http://7spzz.detect.005732.xyz/PCV816advancedmacALL.html
http://7spzz.detect.005732.xyz/?sov=87986171&hid=bfndfdftfppfhfhn&&redid=39705&gsid=453&campaign_id=12&p_id=12255&id=XNSX.glob-r39705-t453&impid=de69b3ca-39cb-11e7-b4a4-12c26be3c49e
http://www.advancedmactools.com//ytz/1/?x-context=M212EVOCLQD8D83Y&utm_source=mytzcps1&utm_campaign=mytzcps1&pxl=MYT1698_MYT1663_RUNT&utm_pubid=39705&x-at=de69b3ca-39cb-11e7-b4a4-12c26be3c49e
http://eflzz.alldownloads.hapc.gdn/?sov=87986171&hid=brdndfdrtfppfhfhn&&redid=39705&gsid=453&campaign_id=12&p_id=12255&id=XNSX.glob-r39705-t453&impid=ea076c86-39cb-11e7-8b24-aa1f778d2780
http://all.shipyards.xyz/?sov=87986171&id=XNSX.glob-r39705-t453-&tov=637816&v=&
@adamlwgriffiths
adamlwgriffiths / selenium_test.py
Created June 1, 2017 23:23
Selenium test for issue #2214
from __future__ import absolute_import
from contextlib import contextmanager
from random import choice
from urlparse import urljoin
import traceback
import re
import time
import numpy
import ujson as json
import os
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import cyglfw3 as glfw
import time
import math
if not glfw.Init():
exit()
@adamlwgriffiths
adamlwgriffiths / gitea.md
Last active April 7, 2024 22:17
Setup Gitea on Synology DiskStation NAS

Synology Gitea setup

Install Docker

Package Centre > Docker > Install

Create folders

    /docker/gitea/postgresql
 /docker/gitea/gitea
@adamlwgriffiths
adamlwgriffiths / bitwarden_rs.md
Last active August 3, 2021 07:39
Setup Bitwarden_rs on Synology DiskStation NAS

Synology Bitwarden_rs Setup

Bitwarden_rs is an API compatible Rust re-write of the Bitwarden server. It is uses less resources than the standard Bitwarden server and is ideal for the Synology NAS.

Please note, without HTTPS, you will not be able to access Bitwarden using Google Chrome. See here: dani-garcia/vaultwarden#958

Install Docker

@adamlwgriffiths
adamlwgriffiths / commands.md
Last active October 2, 2020 11:18
NixOS installation commands

NixOS Installation Commands

Changes to standard installation

  • moved /home on a different hard-drive
  • used percentages with parted's mkpart to avoid non-aligned performance warnings.

Note: these commands are relevant to my particular machine. Specific values that may differ for you:

  • HDD names (/dev/sda*, /dev/nvme0np1)
  • partition sizes