Skip to content

Instantly share code, notes, and snippets.

Avatar
🚧
Building

Eddy WM eddywm

🚧
Building
View GitHub Profile
@slightfoot
slightfoot / main.dart
Last active Apr 16, 2020
Animated Button: Animates is size and content after being pressed - by Simon Lightfoot
View main.dart
// MIT License
//
// Copyright (c) 2020 Simon Lightfoot
//
// 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 the following conditions:
@ultraon
ultraon / build.gradle
Last active Aug 19, 2020
Good example of the merged Jacoco code covarage Gradle configuration
View build.gradle
apply plugin: 'com.android.application'
apply from: "$rootDir/coverage.gradle"
//...
android {
//...
buildTypes {
//...
debug {
@nakov
nakov / ECDSA-secp256k1-example.java
Last active Nov 26, 2020
ECDSA with secp256k1 in Java: generate ECC keys, sign, verify
View ECDSA-secp256k1-example.java
import org.bouncycastle.util.encoders.Hex;
import org.web3j.crypto.*;
import java.math.BigInteger;
public class ECCExample {
public static String compressPubKey(BigInteger pubKey) {
String pubKeyYPrefix = pubKey.testBit(0) ? "03" : "02";
String pubKeyHex = pubKey.toString(16);
String pubKeyX = pubKeyHex.substring(0, 64);
@diegopacheco
diegopacheco / tracker-miner-fs-cpu-linux.md
Created May 21, 2017
tracker-miner-fs eating up my CPU on Linux
View tracker-miner-fs-cpu-linux.md
echo -e "\nHidden=true\n" | sudo tee --append /etc/xdg/autostart/tracker-extract.desktop /etc/xdg/autostart/tracker-miner-apps.desktop /etc/xdg/autostart/tracker-miner-fs.desktop /etc/xdg/autostart/tracker-miner-user-guides.desktop /etc/xdg/autostart/tracker-store.desktop > /dev/null

gsettings set org.freedesktop.Tracker.Miner.Files crawling-interval -2  

gsettings set org.freedesktop.Tracker.Miner.Files enable-monitors false  

tracker reset --hard   
@trandaison
trandaison / starUML.md
Last active Jun 13, 2021
Get full version of StarUML
View starUML.md
@collinjackson
collinjackson / main.dart
Last active Jun 20, 2021
PageView example with dots indicator
View main.dart
// Copyright 2017, the Flutter project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:math';
import 'package:flutter/material.dart';
void main() {
runApp(new MyApp());
}
@ianhanniballake
ianhanniballake / PlayerService.java
Created Jul 12, 2015
Minimal MediaSessionCompat needed to get RemoteControlClient to appear
View PlayerService.java
package com.example.remotecontrolclient;
import android.app.Service;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.graphics.BitmapFactory;
import android.media.AudioManager;
import android.os.IBinder;
import android.support.v4.media.MediaMetadataCompat;
@alexbosworth
alexbosworth / inotify-channel-backup.md
Last active Jun 21, 2021
Backup channel.backup file using systemd and inotify
View inotify-channel-backup.md

LND backup script for channel.backup using inotify

Install inotify

sudo apt install inotify-tools

Create script to watch for changes and copy on change

@JosiasSena
JosiasSena / DeCryptor.java
Last active Jun 22, 2021
Encryptor and Decryptor for data encryption.decryption using the Android KeyStore.
View DeCryptor.java
/**
_____ _____ _
| __ \ / ____| | |
| | | | ___| | _ __ _ _ _ __ | |_ ___ _ __
| | | |/ _ \ | | '__| | | | '_ \| __/ _ \| '__|
| |__| | __/ |____| | | |_| | |_) | || (_) | |
|_____/ \___|\_____|_| \__, | .__/ \__\___/|_|
__/ | |
|___/|_|
*/
@CristinaSolana
CristinaSolana / gist:1885435
Created Feb 22, 2012
Keeping a fork up to date
View gist:1885435

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream