Skip to content

Instantly share code, notes, and snippets.

@xconnecting
xconnecting / build.gradle
Created Nov 8, 2012
Gradle: print buildscript dependencies
View build.gradle
apply plugin: 'eclipse'
apply plugin: 'maven'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.apache.commons:commons-email:1.2'
}
@toddb
toddb / userDefineLang_Gradle.xml
Created Jun 4, 2012
Gradle language for Notepad++
View userDefineLang_Gradle.xml
<NotepadPlus>
<UserLang name="Gradle" ext="gradle">
<Settings>
<Global caseIgnored="yes" />
<TreatAsSymbol comment="yes" commentLine="yes" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">&quot;&apos;0&quot;&apos;0</Keywords>
<Keywords name="Folder+"></Keywords>
@yashi
yashi / pcre.c
Last active Jan 27, 2021
PCRE Regex
View pcre.c
/* -*- compile-command: "gcc -Wall -Wextra -g $(pkg-config --cflags --libs libpcre2-8) pcre.c" -*- */
#define PCRE2_CODE_UNIT_WIDTH 8
#include <pcre2.h>
#include <string.h>
#include <stdio.h>
int main(void)
{
pcre2_code *re;
PCRE2_SPTR pattern = (PCRE2_SPTR)"^b";
@alexpeattie
alexpeattie / disable-autolinking.md
Created Feb 7, 2013
Disable Github-flavored Markdown autolinking
View disable-autolinking.md

http://example.com

http://<span></span>example.com
@ollieglass
ollieglass / kelly_colors.py
Last active Aug 10, 2021
Kenneth Kelly's 22 colors of maximum contrast
View kelly_colors.py
# theory - https://eleanormaclure.files.wordpress.com/2011/03/colour-coding.pdf (page 5)
# kelly's colors - https://i.kinja-img.com/gawker-media/image/upload/1015680494325093012.JPG
# hex values - http://hackerspace.kinja.com/iscc-nbs-number-hex-r-g-b-263-f2f3f4-242-243-244-267-22-1665795040
kelly_colors = ['F2F3F4', '222222', 'F3C300', '875692', 'F38400', 'A1CAF1', 'BE0032', 'C2B280', '848482', '008856', 'E68FAC', '0067A5', 'F99379', '604E97', 'F6A600', 'B3446C', 'DCD300', '882D17', '8DB600', '654522', 'E25822', '2B3D26']
@devster31
devster31 / example.html
Last active Aug 16, 2021
Bookmark parser for the NETSCAPE-Bookmark-file-1 format in node. Don't hesitate to comment with feedback.
View example.html
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<!-- This is an automatically generated file.
It will be read and overwritten.
Do Not Edit! -->
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><A HREF="https://developer.apple.com/library/mac/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/index.html#//apple_ref/doc/-%20uid/TP40014508" ADD_DATE="1414706885" PRIVATE="0" TAGS="javascript,mac,osx,yosemite">JavaScript for Automation Release Notes</A>
<DD>This article describes JavaScript for Automation, a new feature in OS X Yosemite.
@aalmiray
aalmiray / build.gradle
Last active Aug 30, 2021
Aggregated Jacoco reports in a multi-project Gradle build
View build.gradle
// ****************************************************************************
// The `org.kordamp.gradle.jacoco` plugin takes care of mane aspects shown here
// http://kordamp.org/kordamp-gradle-plugins/#_org_kordamp_gradle_jacoco
//
// The code shown here is obsolete. Use it at your own risk
// ****************************************************************************
allprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active Sep 27, 2021
Fix DNS resolution in WSL2
View fix-wsl2-dns-resolution
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.