#!/usr/bin/bash
hexdump -v -e '16/1 "_x%02X" "\n"' $1 | sed 's/_/\\/g; s/\\x //g; s/.*/ "&"/'The output can then be copied and assigned to a const char * in a header/source file and referenced as a normal string.
| #!/usr/bin/env ruby | |
| #============================================================================== | |
| # | |
| # Searches for a library either local or on the system and prints out a sorted | |
| # list of all exported symbols found within it. (UNIX-like systems only) | |
| # | |
| # Useful for creating a wrapper/bindings for a C/C++ library. | |
| # | |
| # Example: exportsym tar |
Two different methods to automate the process of removing a submodule from a git repo with a single command. Adapted from here.
NOTE: A commit is made during removal, so it is best to commit any other changes prior to executing the command.
~/.local/bin)| #!/usr/bin/bash | |
| hexdump -v -e '16/1 "_x%02X" "\n"' $1 | sed 's/_/\\/g; s/\\x //g; s/.*/ "&"/' |
| using System; | |
| using System.Diagnostics.CodeAnalysis; | |
| using System.Numerics; | |
| using System.Runtime.InteropServices; | |
| using System.Security; | |
| namespace MyNamespace | |
| { | |
| [SuppressUnmanagedCodeSecurity] | |
| [SuppressMessage("ReSharper", "IdentifierTypo")] |
| using System; | |
| using System.Diagnostics.CodeAnalysis; | |
| using System.IO; | |
| using System.Runtime.InteropServices; | |
| using System.Security; | |
| using System.Text; | |
| namespace SndFile | |
| { | |
| [SuppressUnmanagedCodeSecurity] |
| using System; | |
| using System.Diagnostics.CodeAnalysis; | |
| using System.Runtime.InteropServices; | |
| using System.Security; | |
| // Referernce Source: https://xiph.org/vorbis/doc/libvorbis/reference.html | |
| namespace OGG | |
| { | |
| [SuppressUnmanagedCodeSecurity] |
| ############## SPOTIFY ################### | |
| 127.0.0.1 media-match.com | |
| 127.0.0.1 adclick.g.doublecklick.net | |
| 127.0.0.1 www.googleadservices.com | |
| 127.0.0.1 pagead2.googlesyndication.com | |
| 127.0.0.1 googleads.g.doubleclick.net | |
| 127.0.0.1 pubads.g.doubleclick.net | |
| 127.0.0.1 securepubads.g.doubleclick.net | |
| 127.0.0.1 www.omaze.com | |
| 127.0.0.1 omaze.com |
| require "mkmf" | |
| ext_name = 'my_extension' | |
| excluded = ['x86', 'x64'] | |
| dir_config(ext_name) | |
| $srcs = Dir.glob("#{$srcdir}/**/*.c").map { |path| File.basename(path) } | |
| Dir.glob("#{$srcdir}/*/") do |path| | |
| dir = File.basename(path) |
| class String | |
| def snake_case | |
| gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2') | |
| .gsub(/([a-z\d])([A-Z])/,'\1_\2') | |
| .tr("-", "_") | |
| .downcase | |
| end | |
| def camel_case |