Skip to content

Instantly share code, notes, and snippets.

View brianjd's full-sized avatar
©️
Copyright 2019

b_d brianjd

©️
Copyright 2019
View GitHub Profile
@brianjd
brianjd / nftables.xml
Created March 7, 2022 02:37 — forked from xpac1985/nftables.xml
nftables Syntax Highlighting for Notepad++
<NotepadPlus>
<UserLang name="nftables" ext="" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00# 01 02 03&quot; 04&quot;</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@brianjd
brianjd / custom-error.js
Created September 29, 2016 22:04 — forked from justmoon/custom-error.js
Creating custom Error classes in Node.js
'use strict';
module.exports = function CustomError(message, extra) {
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
this.message = message;
this.extra = extra;
};
require('util').inherits(module.exports, Error);
@brianjd
brianjd / Modal.js
Created January 24, 2016 00:11 — forked from mkonicek/Modal.js
/**
* Copyright 2004-present Facebook. All Rights Reserved.
*
* @providesModule RKModal
* @flow
*/
'use strict';
var Portal = require('Portal');
var React = require('React');
@brianjd
brianjd / gist:2dc93cee805a58dfc00b
Created November 14, 2015 02:25 — forked from JohnyDays/gist:ab352c6bab57683a2db5
Waterfall view solution
'use strict'
var React = require('react-native')
var {
View,
StyleSheet,
} = React
var {StyleSheetRegistry} = StyleSheet
@brianjd
brianjd / README.md
Created November 4, 2015 08:02 — forked from boopathi/README.md
Creating a Swift-ReactNative project

Settings

  1. Create a project in XCode with the default settings
    • iOS > Application > Single View Application
    • Language: Swift
  2. Under project General settings, add ReactKit to Linked Framework and Libraries
    • + > Add Other... and choose /path/to/react-native/ReactKit/ReactKit.xcodeproj
  3. Now ReactKit would have been imported. Link it by choosing it from the list.
    • + > lib.ReactKit.a
  4. Under project Build Settings,
@brianjd
brianjd / Parse.js
Created October 25, 2015 21:11 — forked from mattberg/Parse.js
Simple Parse REST API module for Titanium
var baseUrl = 'https://api.parse.com/1',
appId = 'XXXXXXXXXXXXXXX',
apiKey = 'XXXXXXXXXXXXXX'; // make sure to use the REST API Key
var _register = function(params, lambda, lambdaerror) {
var method = 'POST',
url = baseUrl + '/installations',
payload = (params) ? JSON.stringify(params) : '';
_helper(url, method, payload, function(data, status) {
@brianjd
brianjd / Create iOS Icons.jsx
Created October 25, 2015 01:57 — forked from twonjosh/Create iOS Icons.jsx
Photoshop Script to Create iOS Icons from a source image
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
var rotate = Ti.UI.create2DMatrix().rotate(90);
var counterRotate = rotate.rotate(-180);
var scrollView = Titanium.UI.createScrollableView({
views:[
Titanium.UI.createImageView({ image:'default_app_logo.png', transform: counterRotate }),
Titanium.UI.createImageView({ image:'KS_nav_ui.png', transform: counterRotate }),
Titanium.UI.createImageView({ image:'KS_nav_views.png', transform: counterRotate })