This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<code_scheme name="Default (1)"> | |
<option name="OTHER_INDENT_OPTIONS"> | |
<value> | |
<option name="INDENT_SIZE" value="2" /> | |
<option name="CONTINUATION_INDENT_SIZE" value="8" /> | |
<option name="TAB_SIZE" value="2" /> | |
<option name="USE_TAB_CHARACTER" value="false" /> | |
<option name="SMART_TABS" value="false" /> | |
<option name="LABEL_INDENT_SIZE" value="0" /> | |
<option name="LABEL_INDENT_ABSOLUTE" value="false" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This script fixes the naming on some video files which were numbered wrong - The last file 2x8 was actually the first | |
//and all the others were one down from where they should be (2x1 was actually the second 2x2 etc.) | |
//I have run it on the second series (2xX) but none of the others | |
import ammonite.ops._ | |
val dir = home/'Movies/"Sapphire and Steel (1979-82 ITV)" | |
//get a list of the files in a particular series | |
val seriesNumber = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int maxScrollExtent = (int) ((mOverlayTop.getContentHeight() * mOverlayTop.getScale()) - mOverlayTop.getHeight()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rename 's//text-to-prepend/' *.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed 's_.*clientIp\":\"\([^\"]*\)\".*dt\"\:\"\([^\"]*\)\".*_\2 \1_' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String fastReadTextFromFile(File file) { | |
FileInputStream inputStream = null; | |
try { | |
inputStream = new FileInputStream(file); | |
FileChannel ch = inputStream.getChannel(); | |
MappedByteBuffer mb = ch.map(FileChannel.MapMode.READ_ONLY, | |
0L, ch.size()); | |
byte[] barray = new byte[Math.min(mb.remaining(), BYTE_ARRAY_SIZE)]; | |
int getSize; | |
StringBuilder sb = new StringBuilder(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find ~/Library -iname *intellij* -exec rm -rf {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk 'END{print FNR}'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global color.ui true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.matchWeek.find({number:{$gt:18, $lt:23}}, {number: 1, startDate:1, endDate:1}).sort({number:1}).pretty() |
NewerOlder