Skip to content

Instantly share code, notes, and snippets.

@bijay-shrestha
bijay-shrestha / Intellij 2019.3
Last active Jul 26, 2021
Intellij Activation for 2019.3
View Intellij 2019.3
```
CATF44LT7C-eyJsaWNlbnNlSWQiOiJDQVRGNDRMVDdDIiwibGljZW5zZWVOYW1lIjoiVmxhZGlzbGF2IEtvdmFsZW5rbyIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiQUMiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQUyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiRE0iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJDTCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJTMCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiUkQiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQQyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJNIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEQiIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IkRDIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4I
anonymous
anonymous / -
Created Aug 22, 2017
View -
System: Host: ny-h-u Kernel: 4.4.0-92-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.4.4 (Gtk 3.18.9-1ubuntu3.3) dm: gdm3 Distro: Ubuntu 16.04 xenial
Machine: System: HP product: HP ENVY Notebook v: Type1ProductConfigId Chassis: type: 10
Mobo: HP model: 80EE v: 87.51 Bios: Insyde v: F.35 date: 03/04/2016
CPU: Quad core Intel Core i7-6700HQ (-HT-MCP-) cache: 6144 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 20735
clock speeds: min/max: 800/3500 MHz 1: 836 MHz 2: 899 MHz 3: 888 MHz 4: 899 MHz 5: 838 MHz
6: 808 MHz 7: 897 MHz 8: 900 MHz
Graphics: Card-1: Intel Skylake Integrated Graphics bus-ID: 00:02.0 chip-ID: 8086:191b
Card-2: NVIDIA GM107M [GeForce GTX 950M] bus-ID: 01:00.0 chip-ID: 10de:139a
@stinger
stinger / Swift3DataTaskDelegate.swift
Last active Mar 23, 2021
Swift 3: URLSessionDelegate
View Swift3DataTaskDelegate.swift
//: # Swift 3: URLSessionDelegate
//: The following example shows how to use `OperationQueue` to queue the network requests. This is useful in many ways (for delaying queued requests when the networking goes down for example)
import Foundation
import PlaygroundSupport
class Requester:NSObject {
let opQueue = OperationQueue()
var response:URLResponse?
View android_material_design_colours.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>
@joshbode
joshbode / numbered_headings.md
Last active Apr 3, 2020
Numbered Headings in Markdown via CSS
View numbered_headings.md

World

Country

State

City

Suburb
Street
<style type="text/css"> body { margin: auto;
@erickok
erickok / OkHttpGzippedLoggingInterceptor.java
Last active Jul 12, 2021
Simple logging interceptor for OkHttp that logs full request headers and response headers + body (useful for use with Retrofit 2 where logging was removed)
View OkHttpGzippedLoggingInterceptor.java
if (BuildConfig.DEBUG) {
httpclient.interceptors().add(new LoggingInterceptor());
}
public class LoggingInterceptor implements Interceptor {
@Override
public Response intercept(Chain chain) throws IOException {
Request request = chain.request();
long t1 = System.nanoTime();
@mwaterfall
mwaterfall / StringExtensionHTML.swift
Last active Jul 20, 2021
Decoding HTML Entities in Swift
View StringExtensionHTML.swift
// Very slightly adapted from http://stackoverflow.com/a/30141700/106244
// 99.99% Credit to Martin R!
// Mapping from XML/HTML character entity reference to character
// From http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
private let characterEntities : [String: Character] = [
// XML predefined entities:
"&quot;" : "\"",
"&amp;" : "&",
@edwardmp
edwardmp / gist:a0ffb3ace02ce4392b26
Created Jun 13, 2015
Working example of accepting self-signed SSL certificate in Swift
View gist:a0ffb3ace02ce4392b26
import UIKit
import Foundation
class ViewController: UIViewController, NSURLSessionDelegate {
override func viewDidLoad() {
super.viewDidLoad()
httpGet(NSMutableURLRequest(URL: NSURL(string: "https://example.com")!))
}
View Markdown Style; Numbered Headings
<style type="text/css">
body {
background:#fff;
color:#000;
font-family: Didot;
font-size:14px;
line-height:170%;
text-align: justify;
counter-reset: chapter; // FDM 130718 - Essential declaration of 'chapter' for nested counters H1 to H6 to work
}
@JakeWharton
JakeWharton / README.md
Last active May 10, 2018
A workaround for Android "L" Okio packaging problem. Place all of the following in a `libs/` folder.
View README.md