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
REPO_PATH="../j2j" | |
npm run build | |
find $REPO_PATH/* -not -name 'CNAME' -delete | |
cp -R build/* $REPO_PATH | |
cd $REPO_PATH | |
git add . | |
git commit -m "redeploy" | |
git push |
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
function generatePojoClass(json) { | |
return parseObj(json, "MyClass"); | |
} | |
function getJavaType(jsonType, key, value) { | |
switch (jsonType) { | |
case 'String': | |
return 'String'; | |
case 'Long': | |
return 'Long'; |
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
from ryu.base import app_manager | |
from ryu.controller import ofp_event | |
from ryu.controller.handler import CONFIG_DISPATCHER, MAIN_DISPATCHER | |
from ryu.controller.handler import set_ev_cls | |
from ryu.ofproto import ofproto_v1_3 | |
class MySDNApp(app_manager.RyuApp): | |
OFP_VERSIONS = [ofproto_v1_3.OFP_VERSION] | |
def __init__(self, *args, **kwargs): |
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 sys | |
import pyshark | |
from PyQt6.QtWidgets import QApplication, QMainWindow, QTextEdit, QVBoxLayout, QWidget | |
from PyQt6.QtCore import QTimer | |
import threading | |
def capture_packets(text_edit): | |
capture = pyshark.LiveCapture(interface='Wi-Fi') |
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
public class WayForPayClient { | |
private final RestTemplate restTemplate; | |
private final WayForPayProperties wayForPayProperties; | |
public void createPayment(SubscriptionType subscriptionType, Long userId) { | |
String formUrl = "https://secure.wayforpay.com/pay"; | |
String orderReference = subscriptionType.name() + ":"+userId + ":" + System.currentTimeMillis(); | |
long time = System.currentTimeMillis(); |
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 asyncio | |
from telethon import TelegramClient | |
from telethon.tl import functions | |
from telethon.tl.types import UserStatusOnline, UserStatusOffline | |
async def authorize(client): | |
is_authorized = await client.is_user_authorized() | |
if not is_authorized: |
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
version: '3.7' | |
services: | |
app-landing: | |
image: landingimage #nginx or smth | |
container_name: app-landing | |
restart: always | |
labels: | |
- traefik.http.routers.landing.rule=Host(`landing.${DOMAIN}`) | |
- traefik.http.routers.landing.entrypoints=https | |
- traefik.http.routers.landing.tls=true |
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
public class Lab1Application { | |
public static void main(String[] args) { | |
count( 1, 0.5,5, 7); | |
} | |
static void count(double l, double Tobs, int n, int m) { | |
// параметр завантаження системи | |
double alpha; | |
// імовірність того, що всі канали обслуговування вільні | |
double Po; |
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
{ | |
"application_fee_percent": null, | |
"automatic_tax": { | |
"enabled": false | |
}, | |
"billing_cycle_anchor": 1652282579, | |
"billing_thresholds": null, | |
"cancel_at": null, | |
"cancel_at_period_end": false, | |
"canceled_at": null, |
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
public String createSubscription(SubscriptionType subscriptionType, AuthenticatedUser user) { | |
OrganizationUser organizationUser = organizationUserRepository.getById(user.getOrganizationUserId()); | |
if (!organizationUser.isOwner()) { | |
throw new AccessDeniedProblem("This user not allowed to set up subscription! Just organization owner allowed to do that."); | |
} | |
String stripeCustomerId = organizationUser.getStripeCustomerId(); | |
if (stripeCustomerId == null) { | |
stripeCustomerId = createCustomer(organizationUser.getUser()); |
NewerOlder