Skip to content

Instantly share code, notes, and snippets.

@toddb
toddb / userDefineLang_Gradle.xml
Created June 4, 2012 20:26
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>
@xconnecting
xconnecting / build.gradle
Created November 8, 2012 06:30
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'
}
@alexpeattie
alexpeattie / disable-autolinking.md
Created February 7, 2013 07:32
Disable Github-flavored Markdown autolinking
View disable-autolinking.md

http://example.com

http://example.com

@ollieglass
ollieglass / kelly_colors.py
Last active October 19, 2022 08:55
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 March 19, 2023 01:31
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.
@yashi
yashi / pcre.c
Last active January 27, 2021 08:37
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";
@arieljannai
arieljannai / pycharm.bat
Created January 8, 2017 11:07
Add PyCharm to context menu (right click menu)
View pycharm.bat
@echo off
@rem throw this file in jetbrains installation folder, it takes the last created PyCharm folder (the latest ide update) for the script
FOR /F "delims=" %%i IN ('dir /b /ad-h /t:c /od -filter "PyCharm*"') DO SET a=%%i
SET PyCharmPath=C:\Program Files (x86)\JetBrains\%a%\bin\PyCharm64.exe
echo %PyCharmPath%
echo Adding file entries
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active March 20, 2023 01:06
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.