Skip to content

Instantly share code, notes, and snippets.

View antonmry's full-sized avatar

Antón Rodríguez antonmry

View GitHub Profile
@antonmry
antonmry / markdown2pdf.sh
Created September 24, 2014 17:00
Markdown to PDF with format
pandoc -r markdown -w odt --reference-odt=~/Template.ott README.md -o README.odt
libreoffice --headless -convert-to pdf README.odt
@antonmry
antonmry / screen.md
Last active August 29, 2015 14:07
Shortcuts
  • Ctrl+a c: new window
  • Ctrl+a n: next window
  • Ctrl+a p: previous window
  • Ctrl+a ": select window from list
  • Ctrl+a Ctrl+a: previous window viewed

  • Ctrl+a S: split terminal horizontally into regions (Ctrl+a c to create new window there)
  • Ctrl+a |: split terminal vertically into regions
@antonmry
antonmry / oracle.md
Last active August 29, 2015 14:07
Oracle database commands

Create user

$ ORACLE_SID=XE sqlplus /nolog
SQL> connect / as sysdba;
SQL> CREATE USER username IDENTIFIED BY apassword;
SQL> GRANT CONNECT TO username;
SQL> GRANT CREATE SESSION TO username;
SQL> GRANT CREATE TABLE TO username;
SQL> GRANT UNLIMITED TABLESPACE TO username;
@antonmry
antonmry / Shrew
Last active August 29, 2015 14:12
Shrew
Here is what you need to install under Oracle Linux or Red Hat Enterprise Linux to install the VirtualBox Guest Additions:
<pre>yum -y install gcc kernel-uek-devel-$(uname -r)</pre>
Y lo de siempre, luego. reboot
# Guest
route add default gw 10.174.65.2
@antonmry
antonmry / Create bootable USB.md
Last active August 29, 2015 14:13
Linux tricks
  • Insert the USB device, then open GParted.
  • Select the USB device from the list near the upper-right corner of the GParted window and detect where it was mounted: /dev/sd[1 letter]. Mine was /dev/sdc.
  • Make sure the USB device is unmounted (right-click and select unmount). Don't forget to format it to NTFS or VFAT.
  • Open a Terminal window and navigate to the iso file you want to use. I used this line:
  • The last step is to write this line:
sudo dd if=[UR .ISO] of=/dev/sd[THAT 1 LETTER]
@antonmry
antonmry / Accessing Weblogic Runtime Information with WLST.sh
Last active August 29, 2015 14:13
Accessing Weblogic Runtime Information with WLST
. /<Weblogic Installation Dir>/ocsg510/wlserver_10.3/server/bin/setWLSEnv.sh
java weblogic.WLST
connect('weblogic','your_password','localhost:8001')
wls:/mydomain/serverConfig> domainRuntime()
wls:/mydomain/domainRuntime> cd('ServerRuntimes/myserver')
wls:/mydomain/domainRuntime/ServerRuntimes/myserver> cd('JVMRuntime/myserver')>
wls:/mydomain/domainRuntime/ServerRuntimes/myserver/JVMRuntime/myserver> ls()
@antonmry
antonmry / Replace.sh
Created February 3, 2015 09:37
Replace a string recursively
grep -ilr '10.0.2.15' * | xargs -i@ sed -i 's/10.0.2.15/ocsg/g' @
@antonmry
antonmry / command.sh
Created October 15, 2015 11:57
Created gradle dependencies directly from bash
for i in *.jar; do echo "providedCompile files(\"\${projectDir}/src/main/resources/$i\")"; done
@antonmry
antonmry / Call 1234
Last active April 26, 2016 11:58
Restcomm using Amazon ECS
19:35:02,214 INFO [gov.nist.javax.sip.stack.SIPTransactionStack] (SIP-TCP-Core-PipelineThreadpool-9) <message
from="91.116.135.52:49532"
to="172.17.0.3:5063"
time="1461612902214"
isSender="false"
transactionId="z9hg4bk-363539-444588cfc4915bd2042802134f4b13bb"
callId="1461612902182"
firstLine="REGISTER sip:ec2-54-194-81-211.eu-west-1.compute.amazonaws.com SIP/2.0"
>
<![CDATA[REGISTER sip:ec2-54-194-81-211.eu-west-1.compute.amazonaws.com SIP/2.0
{
"requiresAttributes": [],
"taskDefinitionArn": "arn:aws:ecs:eu-west-1:742070958976:task-definition/restcomm-task-ayuste:4",
"status": "ACTIVE",
"revision": 4,
"containerDefinitions": [
{
"volumesFrom": [],
"memory": 3000,
"extraHosts": null,