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
openssl genrsa -des3 -passout pass:x -out localhost.pass.key 2048 | |
openssl rsa -passin pass:x -in localhost.pass.key -out localhost.key | |
rm localhost.pass.key | |
openssl req -new -key localhost.key -out localhost.csr -config $(pwd)/openssl.cnf -subj "/C=SW/ST=Gothenburg/L=localhost/O=Ridestore/OU=localhost/CN=localhost/emailAddress=ivan@ridestore.com/subjectAltName=DNS.1=localhost/" | |
openssl x509 -req -days 365 -in localhost.csr -signkey localhost.key -out localhost.crt -extfile v3.ext |
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
/** | |
* simple memoize registry | |
*/ | |
const ApplicationRegistry = { | |
instance: Object.create(null), | |
getInstance() { | |
return this.instance; | |
}, | |
}; |
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
/* global window, location, navigator, Element */ | |
/* eslint comma-dangle: "off", no-prototype-builtins: "off", no-param-reassign: "off" */ | |
/** | |
* device service | |
* @version 2.0.1 | |
*/ | |
module.exports = { | |
cache: {}, | |
/** |
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
import { canRoute, customHistory, routeTo } from './preact-router.local'; | |
import { appRegistry, eventsService } from '../../../services/service-manager'; | |
/** | |
* Local setURL function overwrite from preact-router | |
* | |
* @param {string} url url, applied to router | |
* @param {string} type optional operation name, default = push | |
* @param {{ realURL: string, displayURL: string }} newState state object | |
*/ |
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
{ | |
"scripts": { | |
"script:translations:pull": "BABEL_ENV='node' babel-node util/translations/translations.script.js pull", | |
"script:translations:generate": "BABEL_ENV='node' babel-node util/translations/translations.script.js generate" | |
}, | |
"dependencies": { | |
"babel-plugin-jsx-i18n-tag-translate-replacer": "github:studentIvan/babel-plugin-jsx-i18n-tag-translate-replacer", | |
"transifex-api-es6": "github:studentIvan/transifex-api-es6#fix-deps" | |
} | |
} |
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
#!/usr/bin/python | |
"""A little script to recover deleted recording of a mongoDB db file | |
There's no optimization but it work and has saved me | |
""" | |
import struct | |
import bson | |
import pymongo |
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
.calendar-dropdown | |
min-width auto !important | |
border solid 1px lightgray !important | |
&__select2 | |
position absolute | |
top 0 | |
width 100% | |
background red | |
z-index 500 |
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 isSupportsBasicES6, isSupportsDefaultParamsDestructing, appVersionCode, | |
getScriptLocation, includeScript, scriptBasePath, modulePaths, bundleDependencies; | |
/** | |
* url to scripts on the server | |
* @type {String} | |
*/ | |
scriptBasePath = '/scripts/'; | |
/** |
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
/** | |
* iPhone mixin | |
* example: | |
* +iphone(all, landscape) | |
* body | |
* display none | |
*/ | |
iphone($version = all, $orientation = all) | |
$orientation == all ? 'and' : 'and (orientation: ' + $orientation + ') and' | |
if $version == '4' or $version == '4S' or $version == 'all' |
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
ipad($version = all, $orientation = all) | |
$orientation == all ? 'and' : 'and (orientation: ' + $orientation + ') and' | |
if $version == mini or $version == 1 or $version == 2 or $version == all | |
$query = 'only screen and (min-device-width: 768px) and (max-device-width: 1024px) %s (-webkit-min-device-pixel-ratio: 1)' % $media-orientation | |
@media $query | |
{block} | |
if $version == 3 $version == 4 or $version == all | |
$query = 'only screen and (min-device-width: 768px) and (max-device-width: 1024px) %s (-webkit-min-device-pixel-ratio: 2)' % $media-orientation | |
@media $query | |
{block} |