Skip to content

Instantly share code, notes, and snippets.

Noitidart Noitidart

Block or report user

Report or block Noitidart

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View p.js
const DEFAULT_PER_PAGE = 25;
const DEFAULT_PAGE = 1;
class Paginator {
static describeParams(defaultPerPage = DEFAULT_PER_PAGE) {
return {
page: {
type: 'number',
View mobile-platofrom-colors.js
const color = {
// using "light" ios column. not the "dark" column
// using "500" material
// keys are what is seen on ios - https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/color
// and also the same exact key is seen on material - https://material.io/design/color/#tools-for-picking-colors
// - the "2014 Material Design color palettes" section
gray: isIOS ? '#8e8e93' : '#9E9E9E',
gray2: isIOS ? '#aeaeb2' : '#BDBDBD',
gray3: isIOS ? '#c7c7cc' : '#E0E0E0',
View gist:49c120c5bb462afeb551dc2dbcd7a7da
<form>
<div class="form-row">
<div class="form-group col-6">
<label for="inputEmail3" class="h6">Email</label>
<input type="email" class="form-control" id="inputEmail4" placeholder="Email">
</div>
<div class="form-group col-md-6 d-flex align-items-end">
<button type="submit" class="btn btn-primary px-4">Search</button>
</div>
</div>
View docker-commands.md
  • Terminate all docker processes -

    docker kill `docker ps -q`
    
View sails-raw-socket.ts
import io from 'socket.io-client';
import getBaseUrl from '../../../utils/get-base-url';
let mSocket: null | SocketIOClient.Socket = null;
let mIsConnecting = false;
/**
* Create io.socket if it doesn't exist. If it does, and it's disconnected
* then reconnect it. If io.socket is in process of connecting, this will
View block-npm-i-if-have-yarn.js
in package.json scripts:
scripts: {
...
"preinstall": "node -e \"if (process.env.npm_execpath.indexOf('yarn') === -1) { console.error('\\u001b[31mPlease use yarn for installing\\u001b[0m'); process.exit(1); }\""
...
}
View jest watch one file
yarn jest CurrentSchedulesScreen --watch
@Noitidart
Noitidart / e.js
Last active Jun 16, 2019 — forked from 1yzo/e.js
View 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);
View i++_vs_++i.js
pre(3); // log "hit" 3 times
post(3); // log "hit" 4 times
function pre(depth) {
let i=0;
while (true) {
console.log('hit');
if (++i === depth) return;
}
}
View swift-path-notes.md

with string of "file:///var/mobile/Containers/Data/Application/4CA477FA-1C4C-41C0-AF8D-094F364DE3BA/Documents/com.zillow.zo.rpm.dev/7C3DBCAA-0DC9-4224-A4D2-26803F032644.jpg"

doing:

  let urlString = path as String
  let url = NSURL(string: urlString)! as URL

url.path gives "/var/mobile/Containers/Data/Application/50235058-BF69-4311-A668-67D13F1566CA/Documents/com.zillow.zo.rpm.dev/7C3DBCAA-0DC9-4224-A4D2-26803F032644.jpg"

You can’t perform that action at this time.