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
#!/bin/bash | |
set -o errexit | |
# Author: David Underhill | |
# Script to permanently delete files/folders from your git repository. To use | |
# it, cd to your repository's root and then run the script with a list of paths | |
# you want to delete, e.g., git-delete-history path1 path2 | |
# | |
# retrieved from: http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/ | |
# |
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
/* | |
* crypttest.cs: Demonstrates how to serialize and encrypt any object | |
* | |
* Gaute Hope <eg@gaute.vetsj.com> | |
* | |
* To deserialize it you need to know the unencrypted serialized length. | |
* So to store or send also pass the length, e.g. create a struct like this: | |
* | |
* public struct EncryptedObject { | |
* public int length; |
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
### Based on: https://gist.github.com/b0644f5ed1d94bd32805 | |
### This version strips unicode characters from the downloaded script | |
### to work around the currently limited unicode support of the editor | |
### module. | |
# This script downloads and opens a Gist from a URL in the clipboard. | |
# It's meant to be put in the editor's actions menu. | |
# | |
# It works with "raw" and "web" gist URLs, but not with gists that | |
# contain multiple files or non-Python files. |
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
Tricks to add encrypted private SSH key to .travis.yml file | |
To encrypt the private SSH key into the "-secure: xxxxx....." lines to place in the .travis.yml file, generate a deploy key then run: (to see what the encrypted data looks like, see an example here: https://github.com/veewee-community/veewee-push/blob/486102e6f508214b04414074c921475e5943f682/.travis.yml#L21 | |
base64 --wrap=0 ~/.ssh/id_rsa > ~/.ssh/id_rsa_base64 | |
ENCRYPTION_FILTER="echo \$(echo \"-\")\$(travis encrypt veewee-community/veewee-push \"\$FILE='\`cat $FILE\`'\" | grep secure:)" | |
split --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_base64 id_rsa_ | |
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
search = [ notebook , separator ] , | |
[ "any:" , separator ] , | |
term , | |
{ separator , term } ; | |
notebook = "notebook:" , ( word | quoted ) ; | |
word = wordchar , { wordchar } ; | |
quoted = '"' , { ( any - '"' ) | '\"' } , '"' ; |
This file has been truncated, but you can view the full file.
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
[ | |
{ | |
"id": "001", | |
"name": "Bulbasaur", | |
"img": "http://img.pokemondb.net/artwork/bulbasaur.jpg", | |
"type": [ | |
"Grass", | |
"Poison" | |
], | |
"stats": { |
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
using Newtonsoft.Json; | |
using System; | |
using System.Collections.Specialized; | |
using System.Net; | |
using System.Text; | |
//A simple C# class to post messages to a Slack channel | |
//Note: This class uses the Newtonsoft Json.NET serializer available via NuGet | |
public class SlackClient | |
{ |
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
import struct | |
import math | |
import os | |
import sys | |
if sys.version > '3': | |
buffer = memoryview | |
def getWord(b, k, n=4): | |
return sum(list(map(lambda c: b[k+c]<<(c*8),range(n)))) |
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
class DeferredAttribute(object): | |
"""Minor hackery used with `deferred_attr_factory`.""" | |
# Hopefully, more or less, self-explanatory. The __call__ is triggered at | |
# class creation time by declared_attr, which passes in the class itself, | |
# and then we do the "post" setup by listening for mapper_configured. | |
def __init__(self, generator): | |
self.generator = generator | |
self.done = False | |
def __call__(self, mapped_class): |
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
package com.deviant.security.shield; | |
public final class BuildConfig { | |
public static final String BUILD_TYPE = "debug"; | |
public static final boolean DEBUG; | |
public static final String FLAVOR = ""; | |
public static final String PACKAGE_NAME = "com.deviant.security.shield"; | |
public static final int VERSION_CODE = 4; | |
public static final String VERSION_NAME = "2.2"; |
OlderNewer