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
| root@ip-172-31-19-81:~# cat >> .bash_profile <<EOT | |
| > echo "I ran the .bash_profile for root" | |
| > EOT | |
| root@ip-172-31-19-81:~# logout | |
| (main) 23:33:16 [ joey@ip-172-31-19-81:0 ] ~ 2126 -->sudo -s | |
| 23:33:20 [ root@ip-172-31-19-81:0 ] ~ 494 -->exit | |
| (main) 23:33:21 [ joey@ip-172-31-19-81:0 ] ~ 2127 -->sudo -i | |
| I ran the .bash_profile for root |
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
| <?php | |
| $path = ''; | |
| foreach(array_filter(explode('/', '/var/run/memcached/memcached.socket')) as $p) { | |
| $path .= '/'.$p; | |
| if (file_exists($path)) { | |
| echo "{ '$path' : ", json_encode(stat($path)), "} \n"; | |
| } else { | |
| echo "PHP cannot see $path.\n"; | |
| exit(1); | |
| } |
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
| def u_filter(func, iterable): | |
| if f is None: | |
| return (item for item in iterable if item) | |
| return (item for item in iterable if func(item)) |
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
| https://blogs.msdn.microsoft.com/scottdensmore/2004/05/25/why-singletons-are-evil/ | |
| http://steve.yegge.googlepages.com/singleton-considered-stupid | |
| http://googletesting.blogspot.com/2008/11/clean-code-talks-global-state-and.html | |
| https://www.alainschlesser.com/singletons-shared-instances/ | |
| http://misko.hevery.com/2008/08/17/singletons-are-pathological-liars/ |
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
| locale/en/LC_MESSAGES: | |
| -rw-rw-r-- 1 joey joey 67 May 20 10:38 template.mo | |
| -rw-rw-r-- 1 joey joey 28 May 20 10:37 template.po | |
| template.po: | |
| msgid "foo" | |
| msgstr "foobar" | |
| locale/it/LC_MESSAGES: |
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
| This is the gist used for the Adobe Summit labs | |
| ex1 https://www.youtube.com/watch?v=mIlI2T_GXM8&feature=youtu.be | |
| ex2 https://www.youtube.com/watch?v=TtP71cZ3zBo&feature=youtu.be | |
| ex3 https://www.youtube.com/watch?v=Cemp0J34LTM&feature=youtu.be |
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
| open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 | |
| open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3 | |
| open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 | |
| open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3 | |
| open("/lib/x86_64-linux-gnu/libutil.so.1", O_RDONLY|O_CLOEXEC) = 3 | |
| open("/lib/x86_64-linux-gnu/libexpat.so.1", O_RDONLY|O_CLOEXEC) = 3 | |
| open("/lib/x86_64-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3 | |
| open("/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3 | |
| open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 | |
| open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 3 |
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 ($type == MAGIC_URL_EMAIL) | |
| { | |
| $html = "$whitespace<!-- $tag --><a$class href='$url'>$text</a><!-- $tag -->$append"; | |
| } | |
| else | |
| { | |
| $html = "$whitespace<!-- $tag --><a$class href='$url' onclick='window.open(this.href);return false;'>$text</a><!-- $tag -->$append"; | |
| } | |
| return $html; |
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 ($type == MAGIC_URL_EMAIL) | |
| { | |
| $html = "$whitespace<!-- $tag --><a$class href='$url'>$text</a><!-- $tag -->$append"; | |
| } | |
| else | |
| { | |
| $html = "$whitespace<!-- $tag --><a$class href='$url' onclick='window.open(this.href);return false;'>$text</a><!-- $tag -->$append"; | |
| } |
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
| SetEnvIf User-Agent secret_sauce let_me_in | |
| <Directory /srv/www/vhosts/SOMEDOMAIN.TLD> | |
| Deny from all | |
| Allow from env=let_me_in | |
| </Directory> |