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
#first download the packages from http://download.opensuse.org/repositories/security://shibboleth/ | |
# --- | |
sudo rpmbuild --rebuild log4shib-1.0.9-3.1.el6.src.rpm | |
sudo rpm -ivh /usr/src/rpm/RPMS/x86_64/liblog4shib1-1 | |
sudo rpmbuild --rebuild xerces-c-3.1.2-3.1.el6.src.rpm | |
sudo rpm -ivh /usr/src/rpm/RPMS/x86_64/xerces-c-bin-3.1.2-3.1.amzn1.x86_64.rpm | |
sudo rpmbuild --rebuild xml-security-c-1.7.3-3.1.el6.src.rpm | |
sudo rpm -ivh /usr/src/rpm/RPMS/x86_64/xml-security-c-bin-1.7.3-3.1.amzn1.x86_64.rpm | |
sudo rpmbuild --rebuild curl-openssl-7.42.1-1.1.el6.src.rpm |
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
function suggestion(array $words, $word) | |
{ | |
$lev = []; | |
foreach ($words as $w) { | |
$lev[$w] = levenshtein($word, $w); | |
} | |
return array_search(min($lev), $lev, true); | |
} | |
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/bash | |
openssl req -new -x509 -newkey rsa:2048 -keyout vbox.keyout -outform DER -out vbox.der -nodes -days 36500 -subj "/CN=VBoxDrv/" | |
mokutil --import vbox.der | |
### after the reboot yo are able to add it to the secure boot, please select it. | |
reboot |
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
sudo find /var/log/ -name "*.log.*" -exec rm -v {} \; |
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
def reverseInt(x: Int): Int = { | |
x.toString.reverse.toInt | |
} | |
def palindromeNumberEquation(x:Int, y:Int): Boolean = { | |
reverseInt(x) == x*y | |
} | |
def differentDigitsInt(x: Int, y: Int): Boolean = { | |
x.toString.groupBy(c => c).map(m => m._2.length).sum == y |
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 | |
ssh -fNL $target_port:$target_host:$source_port $source_host |
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 | |
// parameters, set them properly based on your needs. | |
$host = ''; | |
$username = ''; | |
$password = ''; | |
$query = 'select * from [table] limit 0'; | |
$c = mysql_connect($host, $username, $password); | |
$r = mysql_query($query, $c); | |
$n = mysql_num_fields($r); |
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
(1 to 100).map { x => | |
val str = StringBuilder.newBuilder | |
if(x % 3 == 0) str append "Fizz" | |
if(x % 5 == 0) str append "Buzz" | |
if(str.size > 0) str.toString else x.toString | |
}.mkString("\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
Cmnd_Alias VAGRANT_EXPORTS_CHOWN = /bin/chown 0\:0 /tmp/* | |
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/tee -a /etc/exports | |
Cmnd_Alias VAGRANT_EXPORTS_MV = /bin/mv -f /tmp/* /etc/exports | |
Cmnd_Alias VAGRANT_NFSD_CHECK = /usr/bin/systemctl status --no-pager nfs-server.service | |
Cmnd_Alias VAGRANT_NFSD_START = /usr/bin/systemctl start nfs-server.service | |
Cmnd_Alias VAGRANT_NFSD_APPLY = /usr/sbin/exportfs -ar | |
Cmnd_Alias VAGRANT_HOSTMANAGER_UPDATE = /bin/cp home/rbertini/.vagrant.d/tmp/hosts.local /etc/hosts | |
Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /bin/sed -r -e * d -ibak /*/exports | |
Cmnd_Alias VAGRANT_EXPORTS_REMOVE_2 = /bin/cp /*/exports /etc/exports | |
%wheel ALL=(root) NOPASSWD: VAGRANT_EXPORTS_CHOWN, VAGRANT_EXPORTS_ADD, VAGRANT_EXPORTS_MV, VAGRANT_NFSD_CHECK, VAGRANT_NFSD_START, VAGRANT_NFSD_APPLY, VAGRANT_HOSTMANAGER_UPDATE, VAGRANT_EXPORTS_REMOVE, VAGRANT |
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
val input2 = | |
""" | |
|Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum viverra sit amet ligula id imperdiet. Proin vestibulum eget tellus in viverra. Mauris eleifend malesuada nunc, non porta quam placerat non. Nunc viverra, quam ac varius posuere, sapien tortor elementum nibh, a pulvinar mi nulla vitae lorem. Duis diam dolor, luctus ut suscipit eu, sodales in est. Maecenas egestas at velit eleifend laoreet. Aliquam imperdiet lorem et dolor finibus laoreet vel et lectus. Duis finibus felis eu tempus consectetur. Quisque vestibulum metus sed pretium consequat. Sed non quam faucibus, fringilla mi vel, porttitor metus. | |
| | |
|Nulla tortor est, dignissim nec orci sit amet, vulputate commodo libero. Integer gravida non turpis malesuada fermentum. Pellentesque sollicitudin sem sed lobortis elementum. Phasellus nec est metus. Integer id vehicula velit, sit amet scelerisque tortor. Nullam fermentum ultricies sodales. Duis vitae elementum diam, sit amet dictum nulla. Cras eu velit aliquam, ven |
OlderNewer