Skip to content

Instantly share code, notes, and snippets.

@Noitidart
Noitidart / about.md
Last active April 13, 2022 17:52 — forked from antichris/about.md
Adds a fully functional "Fork" button to your own Gist.

Fork your own Gist

This is a script that adds a fully functional Fork button to your own Gist.

If a Fork button is already present in the page, this bookmarklet will set focus to it instead of adding another one.

The change is temporary and the button will disappear as soon as you navigate away from that Gist (clicking the Fork button does this for you as well). Meaning you will have to run the script every new page load.

Firefox

Copy the contents from bookmarklet.js, open Scracthpad (Ctrl+F4), paste it there. Back in browser, swwitch to tab with your Gist you want to fork. Back in Scratchpad, "Run" it. Save and/or bookmark the Scratchpad file for future use.

1. yarn add --dev detox jest-circus
2. detox init -r jest (This creates the e2e folder along with the .detoxrc.json)
3. yarn add --dev eslint-plugin-detox (optional)
plugins: [...'detox'...],
- Add this to your eslint config plugins
4.Make sure your your **eas.json** has a simulator build set up that looks like this then create a simulator release build by running: **eas build --profile simulator --platform ios**
"simulator": {
"ios": {
"simulator": true,
@Noitidart
Noitidart / e.js
Last active June 16, 2019 01:48 — forked from 1yzo/e.js
if (typeof unreg !== 'undefined') unreg();
function logOnline() {
console.log('ONLINE', new Date().toLocaleTimeString())
}
function logOffline() {
console.log('offline', new Date().toLocaleTimeString())
}
function reg() {
window.addEventListener('online', logOnline);
@Noitidart
Noitidart / AXWindow.swift
Created September 29, 2016 15:41 — forked from tylerlong/AXWindow.swift
Make window frontmost (BUT not floating. I don't know how to make windows floating)
import Cocoa
class AXWindow {
let app: AXUIElement
let window: AXUIElement
init(app: AXUIElement, window: AXUIElement) {
self.app = app
self.window = window
@Noitidart
Noitidart / casesafe.sh
Created December 20, 2018 19:15 — forked from scottsb/casesafe.sh
Create and manage a case-sensitive disk-image on macOS (OS X).
#!/bin/bash
# ---------------------------------------------------------
# Customizable Settings
# ---------------------------------------------------------
MOUNT_POINT="${CASE_SAFE_MOUNT_POINT:-${HOME}/casesafe}"
VOLUME_PATH="${CASE_SAFE_VOLUME_PATH:-${HOME}/.casesafe.dmg.sparseimage}"
VOLUME_NAME="${CASE_SAFE_VOLUME_NAME:-casesafe}"
VOLUME_SIZE="${CASE_SAFE_VOLUME_SIZE:-60g}"
@Noitidart
Noitidart / _template-ff-addon-BootstrapURLIconWidget.xpi
Last active December 15, 2017 07:55 — forked from Noitidart/bootstrap.js
_template-ff-addon-BootstrapURLIconWidget - This bootstrap addon shows how to add an icon to the URL bar and when clicked it opens a panel.
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
@Noitidart
Noitidart / base-neg-2.js
Created July 4, 2017 00:14 — forked from adamloving/base-neg-2.js
Toptal Codility Problem: Convert to-and-from base -2
'use strict';
function toDecimal(A) {
var sum = 0;
for (var i = 0; i < A.length; i++) {
sum += A[i] * Math.pow(-2, i);
}
return sum;
}
@Noitidart
Noitidart / x11-keylogger.c
Last active December 18, 2016 19:21
XLib keylogger
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <signal.h>
#include <string.h>
#include <unistd.h> // for usleep() only
#include <sys/time.h>
#include <sys/types.h>
#include <time.h>
@Noitidart
Noitidart / ba-issemver.js
Created October 12, 2016 22:07 — forked from cowboy/ba-issemver.js
isSemVer - semantic version comparison for JavaScript
/*!
* isSemVer - v0.1 - 9/05/2010
* http://benalman.com/
* http://semver.org/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/