// get utc of Feb2 2021 10am in New York - moment.tz('America/New_York').month(1).date(2).hour(10).minute(0).second(0).valueOf()
// now with the return of the above is Date.now() as if i ran it in New York timezone on Feb2 2021 10am - so doing moment.utc(1612278000203).tz('America/New_York').format('llll') gives 'Tue, Feb 2, 2021 10:00 AM'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://stackoverflow.com/questions/2661536/how-to-programatically-take-a-screenshot-on-android/16109978#16109978 | |
// public Bitmap screenShot(View view) { | |
// Bitmap bitmap = Bitmap.createBitmap(view.getWidth(), | |
// view.getHeight(), Config.ARGB_8888); | |
// Canvas canvas = new Canvas(bitmap); | |
// view.draw(canvas); | |
// return bitmap; | |
// } | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var my_jenv = null; | |
try { | |
my_jenv = JNI.GetForThread(); | |
// We declare the classes, methods, etc we will be using: this part is not seen in the native example | |
var SIG = { | |
CharSequence: 'Ljava/lang/CharSequence;', | |
Context: 'Landroid/content/Context;', | |
GeckoAppShell: 'Lorg.mozilla.gecko.GeckoAppShell;', | |
Toast: 'Landroid/widget/Toast;', // can use .'s or /'s so `android.widget.Toast` and `android/widget/Toast` both work // from docs page header http://developer.android.com/reference/android/widget/Toast.html#makeText%28android.content.Context,%20int,%20int%29 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///////// | |
var chunk_cnt = 0; | |
var upload = function() { | |
// /{user-id}/feed?message={message}&access_token={access-token} | |
aReportProgress({ | |
body_prefix: 'Chunk ' + (++chunk_cnt) + ' - ', | |
reason: formatStringFromName('uploading_init', 'app') | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://data.stackexchange.com/stackoverflow/query/1027054/search-posts-by-userid-comment-text?CommentText=ios&TagName=react-native | |
SELECT Posts.Id AS [Post Link], Comments.Text, Comments.CreationDate | |
FROM Comments | |
LEFT JOIN Posts ON Posts.Id = Comments.PostId | |
WHERE UPPER(Comments.Text) LIKE UPPER('%##CommentText##%') | |
AND Comments.UserId = '1828637' | |
AND Posts.Tags LIKE '%<##TagName##>%' | |
ORDER BY Comments.CreationDate DESC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { routes } = require('../../../config/routes'); | |
const pluralize = require('pluralize'); | |
const { camelCase } = require('lodash'); | |
/** | |
* implicitRoutes hook | |
* | |
* | |
* @description :: A hook definition. Extends Sails by adding shadow routes, implicit actions, and/or initialization logic. | |
* @docs :: https://sailsjs.com/docs/concepts/extending-sails/hooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cu.import("resource://gre/modules/ctypes.jsm"); | |
var lib_ntdll = ctypes.open("ntdll.dll"); | |
var lib_kernel32 = ctypes.open("kernel32.dll"); | |
var STATUS_BUFFER_TOO_SMALL = 0xC0000023>>0; | |
var STATUS_INFO_LENGTH_MISMATCH = 0xC0000004>>0; | |
var SystemHandleInformation = 16; | |
var UNICODE_STRING = new ctypes.StructType("UNICODE_STRING", [ | |
{'Length': ctypes.unsigned_short}, //USHORT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cu.import('resource://gre/modules/ctypes.jsm'); | |
var lib = { | |
ntdll: ctypes.open('ntdll.dll'), | |
kernel32: ctypes.open('kernel32.dll'), | |
} | |
//HANDLE WINAPI GetCurrentProcess(void); | |
var GetCurrentProcess = lib.kernel32.declare("GetCurrentProcess", ctypes.winapi_abi, ctypes.voidptr_t); | |
//DWORD WINAPI GetCurrentProcessId(void); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cu.import("resource://gre/modules/ctypes.jsm"); | |
var lib_ntdll = ctypes.open("ntdll.dll"); | |
var lib_kernel32 = ctypes.open("kernel32.dll"); | |
var _pPID = null; | |
var STATUS_BUFFER_TOO_SMALL = 0xC0000023>>0; | |
var STATUS_INFO_LENGTH_MISMATCH = 0xC0000004>>0; | |
var SystemProcessInformation = 5; | |
var SystemBasicInformation = 0; | |
var SystemProcessorPerformanceInformation = 8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2020-02-22T05:47:29.811462184Z - GET /vod_installer/.env (4ms 404) | |
2020-02-22T05:47:30.201288566Z - GET /login/.env (2ms 404) | |
2020-02-22T05:47:30.590670434Z - GET /apps/.env (6ms 404) | |
2020-02-22T05:47:30.975336099Z - GET /docker/.env (2ms 404) | |
2020-02-22T05:47:31.356389783Z - GET /engine/.env (2ms 404) | |
2020-02-22T05:47:31.755648105Z - GET /.env (5ms 404) | |
2020-02-22T05:47:32.139752236Z - GET /inc/.env (3ms 404) | |
2020-02-22T05:47:32.523264401Z - GET /development/.env (2ms 404) | |
2020-02-22T05:47:32.905328696Z - GET /system/.env (2ms 404) | |
2020-02-22T05:47:33.288912713Z - GET /admin/.env (1ms 404) |