This file contains hidden or 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 | |
send_time_file="http_alerts_last_fail_sms.txt" | |
# Details http://prinfum.wordpress.com/2011/02/08/alerte-sms-cind-cade-siteul/ | |
# To edit | |
cd /home/unde_va_fi_scris_fisierul_Care_Salveaza_Ora | |
function test { | |
# To edit | |
h=`curl --connect-timeout 60 --max-time 60 http://siteulvostru.com | grep "un careva text din html"` | |
if (( ("$?" != "0") || ("${#h}" == "0") )); then |
This file contains hidden or 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
#to generate: | |
#curl http://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.txt | grep "/8" | egrep "LEGACY|ALLOCATED" | sed -e "s/^[ \t]*//g" | cut -f 1 -d " " | awk '{split($0,a,"/");print a[1]".0.0.0/"a[2]} |
This file contains hidden or 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
Now you can verify thats really me who sent something. | |
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
mQINBFKUmVwBEAD0R5jfFQBQ/bQBHjAR9l5db4S76sFjxJyelPzMB/Q0GNQYyhVs | |
Ren/PaYR8g3xOVC60bv2swH3PWZfaAhenlnvVxXmymUnWeuB+TULoxY74xSuEpFa | |
jKdC2Z+hgXLKBMJZNtOWnnLWuCdpCNr+JhA8vL42fzfK9pXMpxi+UzrS2VGe8/7t | |
+e+6s2G/FuBLBq1PGAzswsouziZQ+XI4BLCZzz4K0TV5pZQ6fc6l2yMCeiVaOqF8 | |
TOAO3+Zx4qvSCeO1cJcJ8Jh+mCCkhe1aUHMjiiVGew0aBJpxov339zOy325VdZ7K | |
Y67ozytQxR7qly1yI7SakuQM/SYhviL9KnveHzYyJZTT/d6Glc4pZFEbVKo/fHEj |
This file contains hidden or 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
# Declare a env. variable with JPDA params | |
export SBT_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999 " | |
sbt run | |
# You should see: "Listening for transport dt_socket at address: 9999" | |
# From your IDE, configure Remote Debugging. As described here http://www.playframework.com/documentation/2.2.x/IDE |
This file contains hidden or 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
# Connect to ssh throughout a socks server at localhost:9150 | |
ssh -o "ProxyCommand /usr/bin/nc -x localhost:9150 %h %p" user@hostname | |
# Download something and resume. Useful when "Copy cURL" from chrome://inspector | |
curl -C - -o "some_name" |
This file contains hidden or 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
GET /scds/common/u/images/themes/katy/ghosts/person/ghost_person_50x50_v1.png HTTP/1.1 | |
Host: s.c.lnkd.licdn.com | |
Connection: keep-alive | |
Cache-Control: no-cache | |
Accept: image/webp,*/*;q=0.8 | |
Pragma: no-cache | |
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36 | |
Referer: http://www.linkedin.com/.. | |
Accept-Encoding: gzip,deflate,sdch | |
Accept-Language: en-US,en;q=0.8 |
This file contains hidden or 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
If you get "object cache is not a member of package play.api" error with play 2, that mean that you don't have the cache lib dependency. | |
To solve this issue, add: | |
libraryDependencies += cache | |
To your build.sbt. |
This file contains hidden or 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
/** | |
* Cache a remote resource with WS and put it into cache with Playframework 2.2.0 | |
* | |
* Here I'm doing the caching of google images, but you can easily adapt it to your needs | |
*/ | |
package controllers | |
import play.api.cache.Cache | |
import play.api._ |
This file contains hidden or 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
Add to application.conf | |
db.default.logStatements=true | |
logger.com.jolbox.bonecp=DEBUG | |
Ref: http://stackoverflow.com/questions/4832056/java-jdbc-how-to-connect-to-oracle-using-service-name-instead-of-sid |
This file contains hidden or 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
/* | |
routes: | |
GET /test controllers.Application.test(route: String) | |
GET /guessThat controllers.Application.guessIt | |
// To check: | |
/test?route=/guessIt |
OlderNewer