Skip to content

Instantly share code, notes, and snippets.

View aktowns's full-sized avatar
👾

Ashley Towns aktowns

👾
View GitHub Profile
@aktowns
aktowns / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../code-mirror/code-mirror.html">
<polymer-element name="my-element">
<template>
<style>
:host {
(function () {
return {
on_load: function () {
print("Testing 1 2 3");
},
on_message: function(user, message) {
print("NO U " + user);
}
@aktowns
aktowns / envset.fs
Last active December 23, 2015 08:49
open System
open System.IO
[<EntryPoint>]
let main argv =
let file = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "/envpath.txt"
if File.Exists(file) then
let contents = File.ReadAllText(file)
let currentEnv = Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.User)
Environment.SetEnvironmentVariable("PATH", contents + ":" + currentEnv, EnvironmentVariableTarget.User)
diff --git a/libplist-1.10 2/src/CMakeLists.txt b/libplist-1.10/src/CMakeLists.txt
index c4f5483..384f616 100644
--- a/libplist-1.10 2/src/CMakeLists.txt
+++ b/libplist-1.10/src/CMakeLists.txt
@@ -45,6 +45,16 @@ if(APPLE)
SET_TARGET_PROPERTIES( plist PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endif()
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPLIST_BYTE_ORDER=${PLIST_BYTE_ORDER}")
+ADD_LIBRARY( pliststatic STATIC ${libplist_SRC} ${libcnary_object_files} )
#!/usr/bin/env ruby
# Quick and dirty script to fix up .fsproj build orders
# to compile under xbuild when enabled in xamarin studio
#
# this relies on a propper build order set the normal way under
# project options -> general -> build order. Output should be something like
#
# $ fixorder.rb gitopc/gitopc.fsproj
# Make sure you have set a valid build order in 'Project options -> General -> Build order' before running this script
# Press enter to continue, Ctrl+C to abort.
Ξ repos/crystal git:(master) ▶ cat test.cr
class Hello
def initialize(wow)
@wow = wow
end
def do_it
puts @wow
end
end
let rec readUntilEOL' (line: string) (stream: NetworkStream) : Async<String> =
printfn "readUntilEOL': %s %A" line stream
async {
if line.EndsWith(String.NLCR) then return line
else
let! output = stream.AsyncRead(1)
let! result = readUntilEOL' (line + Encoding.ASCII.GetString(output)) stream
return result
}
#config/initializers/datamapper_readonly.rb
module DataMapperReadOnly
def read_only!
[:valid?, :create, :update, :save, :destroy].each do |t|
before t do
raise Exception.new "read-only class attempted write"
end
end
end
end
#!/usr/bin/env ruby
require 'digest/sha1'
sums=File.open('SHA1.txt', 'r') {|fp| fp.read.downcase.split("\n")}
while true
pa = Digest::SHA1.hexdigest(gets().strip).downcase
puts sums.include?(pa) ? "Password is in dump, not decrypted" \
: sums.include?(pa.gsub(/^.{5}/,'00000')) ? "Password exists and has been decrypted" \
: "All good!"
end
<h1>HAI GUYS</h1>