Skip to content

Instantly share code, notes, and snippets.

@youngchief-btw
youngchief-btw / HTTP --> HTTPS.js
Last active Jul 6, 2020
HTTP --> HTTPS enforcement in Javascript
View HTTP --> HTTPS.js
// HTTP --> HTTPS
if (location.protocol === "http:") {
location.replace(window.location.href.replace("http:", "https:"));
}
@wbroek
wbroek / genymotionwithplay.txt
Last active Jul 6, 2020
Genymotion with Google Play Services for ARM
View genymotionwithplay.txt
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@yonglai
yonglai / playbook_centos_install_docker.yaml
Created Nov 15, 2017
An Ansible playbook to install docker-ce on Centos
View playbook_centos_install_docker.yaml
---
- name: Install docker
gather_facts: No
hosts: default
tasks:
- name: Install yum utils
yum:
name: yum-utils
state: latest
@vfdev-5
vfdev-5 / tech-share.md
Created Jul 6, 2020
PyTorch Tech Share (July 06 2020) - Simple PyTorch distributed computation functionality testing with `pytest-xdist`.
View tech-share.md

PyTorch Tech Share (July 06 2020) - Simple PyTorch distributed computation functionality testing with pytest-xdist.

It is about one of many other approaches on how we can test a custom distributed computation functionality by emulating multiple processes.

What is "distributed setting" in PyTorch ?

  • Communications between N application's processes
    • send/receive tensors
@nesquena
nesquena / PatternEditableBuilder.java
Last active Jul 6, 2020
PatternEditableBuilder - Easy way to create colored clickable spans within a TextView!
View PatternEditableBuilder.java
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.TextPaint;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.view.View;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.regex.Matcher;
@Grohden
Grohden / shrekd.dart
Created Jul 6, 2020
Shrek ascii art found somewhere on internet
View shrekd.dart
// ⡴⠑⡄⠀⠀⠀⠀⠀⠀⠀⣀⣀⣤⣤⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
// ⠸⡇⠀⠿⡀⠀⠀⠀⣀⡴⢿⣿⣿⣿⣿⣿⣿⣿⣷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠑⢄⣠⠾⠁⣀⣄⡈⠙⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⢀⡀⠁⠀⠀⠈⠙⠛⠂⠈⣿⣿⣿⣿⣿⠿⡿⢿⣆⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⢀⡾⣁⣀⠀⠴⠂⠙⣗⡀⠀⢻⣿⣿⠭⢤⣴⣦⣤⣹⠀⠀⠀⢀⢴⣶
// ⠀⠀⢀⣾⣿⣿⣿⣷⣮⣽⣾⣿⣥⣴⣿⣿⡿⢂⠔⢚⡿⢿⣿⣦⣴⣾⠁⠸⣼
// ⠀⢀⡞⠁⠙⠻⠿⠟⠉⠀⠛⢹⣿⣿⣿⣿⣿⣌⢤⣼⣿⣾⣿⡟⠉⠀⠀⠀⠀
// ⠀⣾⣷⣶⠇⠀⠀⣤⣄⣀⡀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀
// ⠀⠉⠈⠉⠀⠀⢦⡈⢻⣿⣿⣿⣶⣶⣶⣶⣤⣽⡹⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠉⠲⣽⡻⢿⣿⣿⣿⣿⣿⣿⣷⣜⣿⣿⣿⡇⠀⠀⠀⠀⠀
View atg-tests.md

ATG

ASSOCIATE_EDGE_GW_REAL_DEVICE

1. Performs setup via super.performSetup() (method from parent class TestBaseFlow.java)

  • Checks if Network is created by CE in db
    • returns networkId
  • Checks if Network is created by UemDms in db
  • Checks if Network is created by EnbDms in db
    • should be checking coreComponents for uem-network, hss, mme for domestic
  • Checks if Network state is CREATED in db
@ungoldman
ungoldman / curl_post_json.md
Last active Jul 6, 2020
post a JSON file with curl
View curl_post_json.md

How do you POST a JSON file with curl??

You can post a json file with curl like so:

curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION

so for example:

@bradtraversy
bradtraversy / docker-help.md
Last active Jul 6, 2020
Docker Commands, Help & Tips
View docker-help.md

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

You can’t perform that action at this time.