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
<?php | |
function gh_symlink($target, $link) { | |
return symlink($target, $link); | |
} | |
$use_alt_symlinks_creation = FALSE; | |
function gh_symlink2($target, $link) { | |
global $use_alt_symlinks_creation; | |
$success = !$use_alt_symlinks_creation && symlink($target, $link); |
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 | |
# Detect package type from /etc/issue | |
_found_arch() { | |
local _ostype="$1" | |
shift | |
grep -qis "$*" /etc/issue && _OSTYPE="$_ostype" | |
} | |
# Detect package type |
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/sh | |
# Based on instructions found here: http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat#FFMpegInstallationonCentOSandRedHat-InstallX264 | |
if [ "`/usr/bin/whoami`" != "root" ]; then | |
echo "You need to execute this script as root." | |
exit 1 | |
fi | |
cat > /etc/yum.repos.d/centos.repo<<EOF |
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 | |
function switch_files { | |
mv $1.png $1.tmp.png | |
mv $1-inverse.png $1.png | |
mv $1.tmp.png $1-inverse.png | |
mv $1@2x.png $1@2x.tmp.png | |
mv $1-inverse@2x.png $1@2x.png | |
mv $1@2x.tmp.png $1-inverse@2x.png | |
} |
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
<?php | |
$file = '/mnt/hdd5/persistent-app-data/downloading/vvgoor1586DSFGKL.part10.rar'; | |
while (TRUE) { | |
exec("sync ; sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'"); | |
$data1 = file_get_contents($file); | |
exec("sync ; sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'"); | |
$data2 = file_get_contents($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
<?php | |
/** | |
* Use this script to check and fix a list of files that were copied, using rsync, from a bad (BAD!) hard drive to another hard drive (let's call that one the savior drive). | |
* Since the bad drive is so bad, the data that was copied off that drive might have been corrupted. | |
* So we'll find which of the listed files are wrong (different MD5 checksum on both drives), and fix them. | |
* | |
* Lucky for us, the dying drive is SO BAD that it never generates the same read errors, and when it does generate errors, the byte it reads is always exactly 0x10 (decimal 16) less than it should be. | |
* This very particular way of dying allows us to detect which of the two drive has the correct byte, and thus write a correct file on the savior drive. | |
* Hooray! |
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
<script src="http://sladex.org/blowfish.js/ext/blowfish.js"></script> | |
<script> | |
var password = 'a'; | |
var key = 'uyI5Dj9g8VCOFDnBRUbr3g'; | |
var encrypted_password = blowfish.encrypt(password, key, {cipherMode: 0, outputType: 0}); | |
console.log("Encrypted password: " + encrypted_password); | |
</script> |
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 me.netlift.mobile.activities; | |
import android.util.Base64; | |
import java.security.Key; | |
import javax.crypto.Cipher; | |
import javax.crypto.spec.SecretKeySpec; | |
public class NissanConnectEncryption { |
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
<?php | |
function encrypt($password, $key = 'uyI5Dj9g8VCOFDnBRUbr3g') { | |
$size = @call_user_func('mcrypt_get_block_size', MCRYPT_BLOWFISH); | |
if (empty($size)) { | |
$size = @call_user_func('mcrypt_get_block_size', MCRYPT_BLOWFISH, MCRYPT_MODE_ECB); | |
} | |
$password = pkcs5_pad($password, $size); | |
$iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB), MCRYPT_RAND); | |
$passcrypt = mcrypt_encrypt(MCRYPT_BLOWFISH, $key, $password, MCRYPT_MODE_ECB, $iv); |
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
# GitKraken needs diffie-hellman-group14-sha1 | |
#KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256 | |
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 |