Skip to content

Instantly share code, notes, and snippets.

@clhenrick
clhenrick / README.md
Last active Jan 16, 2021
PostgreSQL & PostGIS cheatsheet (a work in progress)
View README.md
@PrashamTrivedi
PrashamTrivedi / DownloadRequest.kt
Last active Jan 16, 2021
Download File with progress indicator, written in Kotlin with Co-routines
View DownloadRequest.kt
suspend fun downloadFile(url: String,
downloadFile: File,
downloadProgressFun: (bytesRead: Long, contentLength: Long, isDone: Boolean) -> Unit) {
async(CommonPool) {
val request = with(Request.Builder()) {
url(url)
}.build()
val client = with(OkHttpClient.Builder()) {
addNetworkInterceptor { chain ->
@lancejpollard
lancejpollard / meta-tags.md
Created Mar 5, 2012
Complete List of HTML Meta Tags
View meta-tags.md

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@kiliman
kiliman / style.css
Last active Jan 16, 2021
Cobalt2 theme on GitHub
View style.css
.highlight pre, .blob-wrapper, .blob-expanded .blob-code, .blob-expanded .blob-num { background-color: #193549 !important; color: #e1efff !important; }
.blob-code-inner, .blob-num, .highlight pre, .blob-wrapper { font-family: "Operator Mono SSm Lig" !important; color: #ffee80 !important; font-size:16px; line-height: 135% !important;}
.blob-num, .blob-expanded .blob-num {color: #aaa !important; }
.blob-code-hunk, .blob-num-hunk, .blob-num-expandable, .blob-code-expandable { background-color: #1E88E5; }
.blob-code-addition, .blob-num-addition { background-color: #005500; }
.blob-code-deletion, .blob-num-deletion { background-color: #550000; }
.pl-c, .pl-e { font-style: italic; }
.pl-k { color: #ff9d00; }
.pl-pds { color: #e1efff; }
.pl-pse { color: #e1efff; }
@mrupperman
mrupperman / Niagara Sample BQL Queries
Last active Jan 16, 2021
Niagara Sample BQL Queries
View Niagara Sample BQL Queries
Alarm Queries
local:|fox:|station:|slot:/|bql:select name as 'Point Name',out as 'Point Status' from control:ControlPoint where status.alarm = 'true'
local:|fox:|station:|slot:/|bql:select * from alarm:AlarmSourceExt where alarmClass = 'defaultAlarmClass' and status.alarm = true
alarm:|bql:select timestamp,alarmData.sourceName,sourceState,ackState,ackRequired,alarmData.msgText,alarmClass where alarmData.sourceName like 'B1J*' and alarmClass like '*1*' order by timestamp desc
alarm:|bql:select timestamp,alarmData.sourceName,sourceState,ackState,ackRequired,alarmData.msgText,alarmClass where alarmData.sourceName like 'B1J*' and alarmClass like '*2*' order by timestamp desc
alarm:|bql:select *
History Queries
local:|fox:|history:/MyStation/ZoneTemp|bql:select timestamp, value where timestamp in bqltime.today
history:|bql:select *
@currencysecrets
currencysecrets / getATRTrailingStop.mq4
Last active Jan 16, 2021
ATR Trailing Stop method - these are the ATR trailing stop functions I use to calculate my automatic stops. Aspects within this code that need to be added are the checking of the Trading Content being free and (optional) better error reporting.
View getATRTrailingStop.mq4
//+------------------------------------------------------------------+
//| calculate-atr-trailing-stop.mq4
//| Copyright 2013, Currency Secrets
//| http://www.currencysecrets.com
//+------------------------------------------------------------------+
#property copyright "Copyright 2013, Currency Secrets"
#property link "http://www.currencysecrets.com"
//--- input parameters
extern int extLookBack = 50; // bars to look back for the ATR indicator
View gist:3102414
HANDY ONE-LINE SCRIPTS FOR AWK 30 April 2008
Compiled by Eric Pement - eric [at] pement.org version 0.27
Latest version of this file (in English) is usually at:
http://www.pement.org/awk/awk1line.txt
This file will also be available in other languages:
Chinese - http://ximix.org/translation/awk1line_zh-CN.txt
USAGE:
@PurpleBooth
PurpleBooth / README-Template.md
Last active Jan 16, 2021
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@mrpeardotnet
mrpeardotnet / PVE-HP-ssacli-smart-storage-admin.md
Created Nov 25, 2019
HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)
View PVE-HP-ssacli-smart-storage-admin.md

HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

Why use HP Smart Storage Admin CLI?

You can use ssacli (smart storage administrator command line interface) tool to manage any of supported HP Smart Array Controllers in your Proxmox host without need to reboot your server to access Smart Storage Administrator in BIOS. That means no host downtime when managing your storage.

CLI is not as convenient as GUI interface provided by BIOS or desktop utilities, but still allows you to fully manage your controller, physical disks and logical drives on the fly with no Proxmox host downtime.

ssacli replaces older hpssacli, but shares the same syntax and adds support for newer servers and controllers.

Installation

@AveYo
AveYo / .. MediaCreationTool.bat .md
Last active Jan 16, 2021
Universal MediaCreationTool wrapper for all MCT Windows 10 versions from 1507 to 20H2 with business (Enterprise) edition support
View .. MediaCreationTool.bat .md

Preview1 Preview2

2018.10.10: reinstated 1809 [RS5]! using native xml patching for products.xml; fixed syntax bug with exit/b
2018.10.12: added data loss warning for RS5
2018.11.13: RS5 is officially back! + greatly improved choices dialog - feel free to use the small snippet in your own scripts
2019.05.22: 1903 [19H1]
2019.07.11: 1903 __release_svc_refresh__ and enable DynamicUpdate by default to grab latest CU
2019.09.29: UPDATED 19H1 build 18362.356 ; RS5 build 17763.379 and show build number
You can’t perform that action at this time.