/Applications/Spotify.app/Contents/Resources/Spotify.sdef
# read-only
osascript -e 'tell application "Spotify" to player state' # stopped,playing,paused
osascript -e 'tell application "Spotify" to current track' # The current playing track.
osascript -e 'tell application "Spotify" to artwork of current track' # Image data in TIFF format.
osascript -e 'tell application "Spotify" to artist of current track' # The artist of the track.
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
| class MathClass: | |
| def sqrt(self, x): | |
| import math | |
| return math.sqrt(x) | |
| class TestAdapterMathClass(MathClass): | |
| def sqrt(self, x): | |
| self.assert (x >= 0) | |
| ret = super().sqrt(x) |
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
| ls .config/chromium | grep -E "^Profile [0-9]*$" | while read x; do echo "$x: $(cat .config/chromium/$x/Preferences | jq '. | .profile.name')"; done |
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
| BITS 64 | |
| ; syscall: | |
| ; | |
| ; ptr = mmap(NULL, size, PROT_EXEC | PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0) | |
| ; | |
| ; | |
| ; arguments: | |
| ; |
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
| #include <dirent.h> | |
| #include <fcntl.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sys/stat.h> | |
| #include <sys/syscall.h> | |
| #include <unistd.h> | |
| struct linux_dirent { | |
| unsigned long d_ino; |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sys/ptrace.h> | |
| void anti_debugging(void) __attribute__ ((constructor)); | |
| void run_evil_code(); | |
| void anti_debugging(void) | |
| { | |
| // if we are not traced: |
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
| /* % ./a.out "hello, world. this is an example" ".," | |
| * hello | |
| * world | |
| * this is an example | |
| */ | |
| #include <stdio.h> | |
| #include <string.h> | |
| int main(int argc, char **argv) |
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
| #!/usr/bin/env python3 | |
| class Expression: | |
| OPERATORS = ['+', '-'] | |
| @staticmethod | |
| def parse(expression): | |
| # If it is a leaf-expression return even a leaf: | |
| if len(expression) == 1: | |
| return Expression(int(expression[0]), None, None) |
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
| #!/usr/bin/env python3 | |
| class Expression: | |
| OPERATORS = ['+', '-'] | |
| @staticmethod | |
| def parse(expression): | |
| # If it is a leaf-expression return even a leaf: | |
| if len(expression) == 1: | |
| return Expression(int(expression[0]), None, None) |