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
# This is a non-functional example formula to showcase all features and | |
# therefore, it's overly complex and dupes stuff just to comment on it. | |
# You may want to use `brew create` to start your own new formula! | |
# Documentation: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md | |
## Naming -- Every Homebrew formula is a class of the type `Formula`. | |
# Ruby classes have to start Upper case and dashes are not allowed. | |
# So we transform: `example-formula.rb` into `ExampleFormula`. Further, | |
# Homebrew does enforce that the name of the file and the class correspond. | |
# Check with `brew search` that the name is free. |
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
Homebrew build logs for remake on macOS 10.13.6 | |
Build date: 2020-07-06 15:16:07 |
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
require 'digest' | |
# Get SHA256 Hash of a file | |
puts Digest::SHA256.hexdigest File.read "data.dat" | |
# Get MD5 Hash of a file | |
puts Digest::MD5.hexdigest File.read "data.dat" | |
# Get MD5 Hash of a string | |
puts Digest::SHA256.hexdigest "Hello World" | |
# Get SHA256 Hash of a string using update |
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
FILE SPACING: | |
# double space a file | |
sed G | |
# double space a file which already has blank lines in it. Output file | |
# should contain no more than one blank line between lines of text. | |
sed '/^$/d;G' |
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
java.io.FileNotFoundException: /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/ext/sunmscapi.jar (No such file or directory) | |
at java.util.zip.ZipFile.open(Native Method) | |
at java.util.zip.ZipFile.<init>(ZipFile.java:225) | |
at java.util.zip.ZipFile.<init>(ZipFile.java:155) | |
at java.util.zip.ZipFile.<init>(ZipFile.java:169) | |
at com.javadeobfuscator.deobfuscator.utils.Utils.loadBytes(Utils.java:390) | |
at com.javadeobfuscator.deobfuscator.utils.TransformerHelper.newVirtualMachine(TransformerHelper.java:159) | |
at com.javadeobfuscator.deobfuscator.transformers.stringer.v3_1.StringEncryptionTransformer.transform(StringEncryptionTransformer.java:39) | |
at com.javadeobfuscator.deobfuscator.Deobfuscator.runFromConfig(Deobfuscator.java:325) | |
at com.javadeobfuscator.deobfuscator.Deobfuscator.start(Deobfuscator.java:285) |
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
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# By Uğur Özyılmazel, @vigobronx | @ugurozyilmazel | |
# http://vigodome.com | http://ugur.ozyilmazel.com | http://github.com/vigo | |
def get_paged_memory_usage(match_string, paging=4096) | |
mvar = 3 | |
if match_string.split(/[^\w]/).length > 1 | |
mvar = 4 |
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
window.namespace = -> | |
args = arguments[0] | |
target = global || window | |
loop | |
for subpackage, obj of args | |
target = target[subpackage] or= {} | |
args = obj | |
break unless typeof args is 'object' | |
Class = args |
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
// Tests: http://jsfiddle.net/yumitsu/k18fkfgt/ | |
var MobileDevice = { | |
init: function() { | |
var j, device, _this = this; | |
device = { | |
'mobile': _this.isMobileDevice(), | |
'mobileDimensions': _this.isDimsMatching(), | |
'webkit': _this.isWebKitDevice(), | |
'mobileSafari': _this.isMobileSafari(), |
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
Vagrant.configure(2) do |config| | |
config.vm.define "boot2docker" | |
config.vm.box = "parallels/boot2docker" | |
config.vm.box_check_update = false | |
config.ssh.private_key_path = [ | |
'~/.vagrant.d/insecure_private_key', | |
'~/.ssh/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
// Intercepting HTTP calls with AngularJS. | |
angular.module('MyApp', []) | |
.config(function ($provide, $httpProvider) { | |
// Intercept http calls. | |
$provide.factory('MyHttpInterceptor', function ($q) { | |
return { | |
// On request success | |
request: function (config) { | |
// console.log(config); // Contains the data about the request before it is sent. |
NewerOlder