Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
set -eou pipefail
cd /home/pi
git clone https://github.com/popcornmix/omxplayer.git
cd omxplayer
sudo apt-get update && sudo apt install -y git libasound2-dev libva2 libpcre3-dev libidn11-dev libboost-dev libdbus-1-dev libssh-dev libsmbclient-dev libssl-dev
# see https://github.com/popcornmix/omxplayer/issues/731
@JoaoMotondon
JoaoMotondon / git_clean_fxd_command.bat
Created December 16, 2017 18:05
Windows batch script that searches for git repositories in a given directory and executes "git clean -fxd" command in all of them (except those which have untracked files)
@echo off
REM We need to delay expansion, otherwise variables inside 'for' block will get replaced when the batch processor reads them in the 'for' loop, before it is executed.
REM See this link for details: https://stackoverflow.com/questions/5615206/windows-batch-files-setting-variable-in-for-loop
setlocal enabledelayedexpansion
REM Iterate over all git repositories
for /f %%l in ('find . -name ".git"') do (
echo Checking dir:%%~dpnl
@young40
young40 / tab2space.lua
Created March 30, 2017 02:38
replace tab with 4 space
local function tab2space(filename)
local lines = {}
io.input(filename)
for line in io.lines() do
table.insert(lines, line)
end
local newLine = {}
for _, line in ipairs(lines) do
@jhorsman
jhorsman / semver-regex.md
Last active March 29, 2024 05:25
Semantic versioning regex
@wavezhang
wavezhang / java_download.sh
Last active July 6, 2024 18:07
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@alixandru
alixandru / userDefineLang_Groovy_Dark.xml
Created August 2, 2016 12:04
Notepad++ User-Defined Language file containing dark-theme-compatible syntax highlighting for Groovy files
<NotepadPlus>
<UserLang name="Groovy" ext="groovy" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">03/* 04*/ 00// 01 02</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@kakopappa
kakopappa / WindowUtil.cs
Created March 4, 2016 06:26
How to get the parent window title using child window handle
[DllImport("user32.dll", ExactSpelling = true, CharSet = CharSet.Auto)]
static extern IntPtr GetParent(IntPtr hWnd);
[DllImport("user32", CharSet = CharSet.Auto, SetLastError = true)]
static extern int GetWindowText(IntPtr hWnd, [Out, MarshalAs(UnmanagedType.LPTStr)] StringBuilder lpString, int nMaxCount);
public static String GetWindowTitle(IntPtr handle) {
IntPtr windowParent = IntPtr.Zero;
while (handle != IntPtr.Zero) {
@muthuishere
muthuishere / userDefineLang_Groovy.xml
Last active September 5, 2023 16:33
Groovy User defined language for notepad++ plugin
<NotepadPlus>
<UserLang name="Groovy" ext="groovy">
<Settings>
<Global caseIgnored="no" />
<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>
@dgageot
dgageot / FindParametersTypes.java
Created August 19, 2014 10:03
Find Lambda parameter types
package test;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Arrays;
import java.util.function.Function;
import static java.util.stream.Stream.of;
public class FindParametersTypes {
@frogstarr78
frogstarr78 / git-spawn-repo-from-commit_hash
Created April 23, 2010 06:54
Start a new repository based on the commit hash of another repository
#!/bin/bash
# Copyright (c) 2009 Frogstarr78 Software
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to