View init.vim
" TODO(ym): Learn Vimscript.
" TODO(ym): Make a Sessions/Projects plugin.
" Auto install vim-plug if not found
if empty(glob('~/.config/nvim/autoload/plug.vim'))
silent !curl -fLo ~/.config//nvim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall
endif
View create_alert_rule_example.py
import requests
url = "https://sentry.io/api/0/projects/<ORG_SLUG_HERE>/<PROJECT_SLUG_HERE>/rules/"
payload = "{\"environment\":null,\n \"actionMatch\":\"all\",\n \"frequency\":\"30\",\n \"name\":\"Hearsay API Example 2\",\n \"conditions\":[{\"name\":\"An event is first seen\",\n \t\t\t\t\"id\":\"sentry.rules.conditions.first_seen_event.FirstSeenEventCondition\"},\n \t\t\t {\"interval\":\"1h\",\n \t\t\t \"name\":\"An event is seen more than 50 times in 1h\",\n \t\t\t \"value\":50,\n \t\t\t \"id\":\"sentry.rules.conditions.event_frequency.EventFrequencyCondition\"}],\n \"id\":\"412675\",\n \"actions\":[{\"name\":\"Send a notification (for all legacy integrations)\",\n \"id\":\"sentry.rules.actions.notify_event.NotifyEventAction\"},\n {\"channel_id\":\"CA6MX2DE2\",\n \"name\":\"Send a notification to the vu Slack workspace to #ember-errors and show tags [] in notification\",\n \"workspace\":\"1305\",\n \"tags\":\"\",\n \"id\":\"sen
View KthLargestElementInArray.java
class Solution {
public int findKthLargest(int[] nums, int k) {
Arrays.sort(nums);
return nums[nums.length - k];
}
}
View publickey-git-error.markdown

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "your_email@example.com". Th
View output_log.txt
Log uploaded on Thursday, April 19, 2018, 6:39:58 PM
Loaded mods:
Core: (no assemblies)
HugsLib[4.1.1]: 0Harmony(1.0.9.1), HugsLib(0.18.0.0)
Psychology: $HugsLibChecker(0.3.0.0), Psychology(18.3.18.0)
Firepit + Torch Sconce: Firepit(1.0.6294.31913)
AnimalCollabProj: AnimalVariations(1.0.6508.29519), SpiritWolfEvent(1.0.0.0)
Masturbation: (no assemblies)
Water Power: WaterPower(1.0.6536.1314)
Dye Vat: GT_Utilities(1.0.0.0)
View app.py
import os
import falcon
import jinja2
def load_template(name):
path = os.path.join('templates', name)
with open(os.path.abspath(path), 'r') as fp:
return jinja2.Template(fp.read())
View person.py
class Person
def __init__(self, height, weight):
self.height = height
self.weight = weight
View Auto-approve-offline-donations.php
/**
* Give Auto Approve Offline Donations
*
* If you would like to have donations skip the "pending" stage and auto-approve
*
* @param array $payment_args
* @param array $payment_data
*
* @return array @$payment_args
*/
View Decrypt.java
---Java
//I used this on Android
//before you proceed, you need to ensure your private key is PKCS8 since that is what can be read natively in java.
//If your key begins with -----BEGIN RSA PRIVATE KEY-----, the it is ssleay and you need to convert it using the openssl command below
//openssl pkcs8 -topk8 -inform pem -in ssleay-private-key.key -outform pem -nocrypt -out pkcs8-private-key.pem
final private static String RSA_PRIVATE_KEY =
"-----BEGIN PRIVATE KEY-----\n" +
"MI...\n" +
View spongevanilla0.jar.conf
## See the default craftbukkit.jar.conf for a detailed documentation of the
## format of this file.
[config]
name = SpongeVanilla0
source = https://repo.spongepowered.org/maven/org/spongepowered/spongevanilla/1.12.2-7.0.0-BETA-370/spongevanilla-1.12.2-7.0.0-BETA-370.jar
configSource = https://gist.githubusercontent.com/rwoodr/cbb6f5ae4e5ee4fcd2958c8cbeef67c2/raw/spongevanilla0.jar.conf
[encoding]
#encode = system
#decode = system