Skip to content

Instantly share code, notes, and snippets.

View m2049r's full-sized avatar

m2049r

View GitHub Profile
@m2049r
m2049r / jekyll.md
Last active February 19, 2018 18:09

Source: https://stackoverflow.com/a/28252200

Depending if you deal with a User/Organization (UO) site or a Project site (P), do :

  1. from your working folder git init
  2. git remote add origin git@github.com:userName/userName.github.io.git (UO) or git remote add origin git@github.com:userName/repositoryName.git (P)
  3. jekyll new . creates your code base
  4. in _config.yml, set the baseurl parameter to baseurl: '' (UO) or baseurl: '/repositoryName' (P)
  5. in .gitignore add _site, it will be versioned in the other branch
  6. jekyll build will create the destination folder and build site.
@m2049r
m2049r / ReadNfcUIDActivity.java
Created February 19, 2018 08:34 — forked from luixal/ReadNfcUIDActivity.java
Read NFC Tag UID
// Needed in AndroidManifest:
<!-- Permission for using NFC hardware -->
<uses-permission android:name="android.permission.NFC"/>
<!-- Forcing device to have NFC hardware -->
<uses-feature android:name="android.hardware.nfc" android:required="true"/>
<!-- Registering app for receiving NFC's TAG_DISCOVERED intent -->
<intent-filter>
<action android:name="android.nfc.action.TAG_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
@m2049r
m2049r / dub_techno_in_sonic_pi.rb
Created September 6, 2017 21:10 — forked from jindrichmynarz/dub_techno_in_sonic_pi.rb
Dub techno in Sonic Pi
use_debug false
use_bpm 130
# Our mixer!
master = (ramp *range(0, 1, 0.01))
kick_volume = 1
bass_volume = 1
revbass_volume = 1
snare_volume = 0.5
hats_volume = 0.5
@m2049r
m2049r / Keeping a fork up to date.md
Last active March 24, 2018 09:22 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

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
@m2049r
m2049r / Android cli building
Last active September 6, 2017 08:16
Android cli building from scratch
# assuming NDK already insalled
# install java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-set-default
# install SDK
mkdir /opt/android/sdk
cd /opt/android/sdk
monerod --db-sync-mode fastest --rpc-bind-ip 192.168.1.123 --confirm-external-bind --restricted-rpc

Start 2 nodes of a testnet on Windows (for non-Windows ommit the "start")

start monerod --testnet --no-igd --hide-my-port --testnet-data-dir .\node1 --p2p-bind-ip 127.0.0.1 --add-exclusive-node 127.0.0.1:38080
start monerod --testnet --testnet-p2p-bind-port 38080 --no-igd --hide-my-port --testnet-data-dir node2 --p2p-bind-ip 127.0.0.1 --add-exclusive-node 127.0.0.1:28080 --testnet-rpc-bind-port 38081 --rpc-bind-ip 0.0.0.0 --confirm-external-bind

Start cli wallet on same machine:

monero-wallet-cli --testnet --daemon-port 38081
@m2049r
m2049r / gist:487eea2175afa93a86bffd9ed3bc190e
Last active August 1, 2017 08:13
CMakeLists changes to compile moenro 0.10.3.1 with openssl
src/common/CMakeLists.txt:82: cncrypto
src/daemon/CMakeLists.txt:90: cncrypto
src/ringct/CMakeLists.txt:51: cncrypto
src/crypto/CMakeLists.txt:71:monero_private_headers(cncrypto
src/crypto/CMakeLists.txt:73:monero_add_library(cncrypto
src/crypto/CMakeLists.txt:77:target_link_libraries(cncrypto
src/wallet/CMakeLists.txt:111: cncrypto
src/wallet/CMakeLists.txt:129: set(libs_to_merge wallet cryptonote_core cryptonote_basic mnemonics common cncrypto ringct)
src/simplewallet/CMakeLists.txt:48: cncrypto
src/cryptonote_basic/CMakeLists.txt:65: cncrypto
@m2049r
m2049r / GitHub-Forking.md
Created July 25, 2017 11:40 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j