This file contains hidden or 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
"use strict"; | |
const express = require('express'); | |
const gitlab = require('gitlab'); | |
const Zip = require('jszip'); | |
const got = require('got'); | |
const mimeType = require('mime-types'); | |
const glClient = gitlab({url: 'https://my.cool.gitlab.instance.io', token: 'YOUR_TOKEN_HERE'}); | |
const app = express(); |
This file contains hidden or 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
server { | |
listen 80; | |
server_name my.domain.com; | |
return 301 https://$server_name$request_uri; | |
} |
This file contains hidden or 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
node 0.10.39 | |
decode to buffer | |
13,172 op/s » bencode | |
13,310 op/s » bencoding | |
16,289 op/s » dht_bencode | |
686 op/s » bncode | |
11,969 op/s » dht | |
encode buffer |
This file contains hidden or 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
IPT=$(which iptables) | |
#IPT=echo | |
LAN=("eth1" "eth2" "wlan0") | |
WAN="eth0" | |
$IPT -F | |
$IPT -t nat -F | |
$IPT -P INPUT ACCEPT | |
$IPT -P OUTPUT ACCEPT |
This file contains hidden or 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 weechat; | |
def client_connected(data, signal, signal_data): | |
weechat.prnt("", "a client connected, new clients: %s" % weechat.info_get("relay_client_count", "connected")); | |
return weechat.WEECHAT_RC_OK | |
def client_disconnected(data, signal, signal_data): | |
left = weechat.info_get("relay_client_count", "connected"); | |
weechat.prnt("", "a client disconnected, clients left: %s" % left); | |
if left < "1": |
This file contains hidden or 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 Promise = require('bluebird') | |
var mkdirp = Promise.promisify(require('mkdirp')) | |
var fs = Promise.promisifyAll(require('fs')) | |
var request = require('request') | |
var resolutions = { | |
1: [ 1, 1 ], | |
2: [ 2, 2 ], | |
3: [ 5, 4 ], | |
4: [ 10, 9 ], |
This file contains hidden or 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
.flexTileContainer { | |
display: -webkit-box; | |
display: -moz-box; | |
display: -ms-flexbox; | |
display: -webkit-flex; | |
display: flex; | |
-webkit-flex-direction: row; | |
flex-direction: row; | |
-webkit-flex-wrap: wrap; | |
flex-wrap: wrap; |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js" id="sap-ui-bootstrap" data-sap-ui-theme="sap_bluecrystal" data-sap-ui-libs="sap.m"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body id="content" class="sapUiBody"> | |
<script id="jsbin-javascript"> | |
sap.ui.getCore().attachInit(function() { |
This file contains hidden or 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
function ms(input) { | |
if(typeof input === 'Number') { | |
return input | |
} | |
var number = parseInt(input, 10); | |
var unit = input.replace(number.toString(10), '').trim() | |
switch(unit) { | |
case 'd': | |
number *= 24 |
This file contains hidden or 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
!(function() { | |
if (!sap.ui.core.mvc.View.prototype_initCompositeSupport) { | |
try { | |
sap.ui.core.mvc.View(); | |
} catch (x) {} ; | |
} | |
var p = sap.ui.core.mvc.View.prototype, oI = p._initCompositeSupport; | |
p._initCompositeSupport = function(s) { | |
if (s.viewName) { | |
var vT = {"view.App": "<mvc:View xmlns=\"sap.m\" xmlns:mvc=\"sap.ui.core.mvc\" displayBlock=\"true\"> <Shell appWidthLimited=\"true\"> <App id=\"rootNav\"/> </Shell> </mvc:View>" /* ... */}; |