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 node:12-stretch | |
RUN apt-get update && \ | |
apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \ | |
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \ | |
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \ | |
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \ | |
ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget dumb-init | |
RUN apt-get install chromium -y |
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
worker_processes auto; | |
events { | |
use epoll; | |
} | |
http { | |
log_format main '$remote_addr $remote_user [$time_local] "$request" ' | |
'$status "$http_referer" "$http_user_agent"'; |
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 alpine:3.8 AS base_image | |
FROM base_image AS build | |
RUN apk add --no-cache curl build-base openssl openssl-dev zlib-dev linux-headers pcre-dev ffmpeg ffmpeg-dev perl | |
RUN mkdir openresty nginx-vod-module nginx-secure-token-module | |
ENV OPENRESTY_VERSION 1.13.6.1 | |
ENV VOD_MODULE_VERSION 1.24 | |
ENV VOD_SECURE_TOKEN_MODULE_VERSION 1.3 |
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 java.util.ArrayList; | |
import java.util.Arrays; | |
public class MergeSample { | |
public static int fPoints(String phrase, String keywords) { | |
keywords = keywords.toLowerCase().trim().replaceAll(" +", " "); | |
phrase = phrase.toLowerCase().trim().replaceAll(" +", " "); | |
// matching all phrase |
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
# /etc/hosts.allow: list of hosts that are allowed to access the system. | |
# See the manual pages hosts_access(5) and hosts_options(5). | |
# | |
# Example: ALL: LOCAL @some_netgroup | |
# ALL: .foobar.edu EXCEPT terminalserver.foobar.edu | |
# | |
# If you're going to protect the portmapper use the name "rpcbind" for the | |
# daemon name. See rpcbind(8) and rpc.mountd(8) for further information. | |
# |
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
logoutput: /var/log/socks.log | |
internal.protocol: ipv4 ipv6 | |
internal: eth0 port = 1080 | |
external.protocol: ipv4 ipv6 | |
external: eth0 | |
external.rotation: same-same |
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 fnmatch | |
import os | |
import xlsxwriter | |
import collections | |
texts = {} | |
for root, dirnames, filenames in os.walk('./YourAwesomeProject/'): | |
for filename in fnmatch.filter(filenames, '*.strings'): | |
dirs = root.split("/") |
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 regs:[UIImage] = [UIImage](); | |
let src:UIImage = UIImage(named:fileName)! | |
let ci_src:CIImage = CIImage.init(image: src)! | |
let context = CIContext(options:nil) | |
let regionW:Int = Int(Int(src.size.width)/cols) | |
let regionH:Int = Int(Int(src.size.height)/rows) | |
var x = 0, y = 0 | |
for _ in 1 … rows { |
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 UIKit | |
class ViewController: UIViewController { | |
@IBOutlet weak var animView: UIImageView! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view, typically from a nib. | |
animView.setAnimSpritesheet("player.png", rows: 3, cols: 7, fps: 12) | |
animView.animationRepeatCount = 0; |
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 MainActivity extends AppCompatActivity | |
implements SampleViewModel.ISampleViewModelEventListener { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main); | |
binding.setViewModel(new SampleViewModel(this, this)); | |
} |
NewerOlder