The collections of code snippets que will make your life pretty much easy!
Make your life easy! 😃
# built application files | |
*.apk | |
*.ap_ | |
# files for the dex VM | |
*.dex | |
# Java class files | |
*.class |
ActiveAdmin.register User do | |
filter :enterprise, collection: proc { Enterprise.all.map { |enterprise| [enterprise.name, enterprise.id] } } | |
end |
sudo apt-get install compiz | |
sudo apt-get install compizconfig-settings-manager | |
sudo apt-get install compiz-fusion-plugins-extra | |
sudo apt-get install compiz-plugins-extra |
[1,2,3].map(&:inspect).join(", ") # "1, 2, 3" |
/** | |
* Created by fernandomartinez on 12/22/14. | |
*/ | |
public class HashUtils { | |
public static Map map(Object... keyValuePair) { | |
Map<Object, Object> map = new HashMap<>(); | |
for (int i = 0; i < keyValuePair.length; i += 2) { | |
if (( i + 1 ) < keyValuePair.length && | |
keyValuePair[i] != null && |
/** | |
* You have to use: compile 'commons-codec:commons-codec:1.4' | |
* as dependency | |
*/ | |
public static String HMACSHA512(String value, String securityHmac) throws UnsupportedEncodingException, | |
NoSuchAlgorithmException, InvalidKeyException { | |
SecretKeySpec key = new SecretKeySpec((securityHmac).getBytes("UTF-8"), "HmacSHA512"); | |
Mac mac = Mac.getInstance("HmacSHA512"); | |
mac.init(key); |
Letras:
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z
Números:
Número | Escrita |
---|
/* | |
The MIT License (MIT) | |
Copyright (c) [email protected] | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION W |
#!/bin/sh | |
rm -rf ~/Library/Developer/XCode/DerivedData/* | |
rm -rf "~/Library/Developer/XCode/iOS Device Logs/*" | |
rm -rf "~/Library/Logs/*" | |
rm -rf ~/.Trash/* |