diff --git "a/ragqa_arena_tech_500.json" "b/ragqa_arena_tech_500.json" new file mode 100644--- /dev/null +++ "b/ragqa_arena_tech_500.json" @@ -0,0 +1 @@ +[{"question":"how to transfer whatsapp voice message to computer?","response":"To transfer voice notes from WhatsApp on your device to your computer, you have the option to select the \"Share\" feature within the app and send the files via Email, Gmail, Bluetooth, or other available services. \nYou can also move the files onto your phone's SD card, connect your phone to your computer via a USB cable, then find and transfer the files via File Explorer on your PC. \nAlternatively, you can choose to attach all the desired voice notes to an email and, from your phone, send them to your own email address. \nUpon receiving the email on your computer, you can then download the voice note attachments."},{"question":"how the f*&% to stop voice-to-text from censoring profanity?","response":"In most Android devices, you can find an option to block offensive words within the settings for voice input and output. \nFor example, on Android 8.1, it's under Settings, then System, followed by Languages & Input, Virtual Keyboard, Google voice typing, and finally the Block offensive words option."},{"question":"what are high memory and low memory on linux?","response":"\"High Memory\" refers to the application or user space, the memory that user programs can use and which isn't permanently mapped in the kernel's space, while \"Low Memory\" is the kernel's space, which the kernel can address directly and is permanently mapped. \nThe user cannot access the Low Memory as it is set aside for the required kernel programs."},{"question":"should curly braces appear on their own line?","response":"The decision of whether curly braces should appear on their line is subjective and depends on various factors. \nSome individuals are fine with both approaches. \nIf there isn't an established precedent, placing the braces on the next line is often considered the appropriate choice. \nHowever, some argue that braces are not worth a separate line, while others express a preference for having brackets on a separate line. \nThe cardinal rules include following the project's existing coding standard. \nIf there is a blank line before it, indicating a paragraph change, wasting lines for braces when proper indentation is in place may not be necessary. \nWhen dealing with large applications, allowing some lines with only braces can be afforded. \nOn the other hand, some argue that braces, being a part of the thought containing the conditional or loop, should belong on the same line for better contextual clarity. \nHowever, it's noted that putting braces on their line can decrease readability."},{"question":"zip everything in current directory","response":"Install zip and use zip -r foo.zip. \n\nAn alternative to the zip format is tar: tar -czf copy.tar.gz whatever\/ (where \"whatever\" is the folder)."},{"question":"how does the authentication in the new uk \u00a31 coin work?","response":"The authentication in the new UK \u00a31 coin works through a plating system called iSIS, which detects the material of the coins to determine their authenticity cheaply and accurately. \nThis system involves micro-tagging embedded within the currency and utilizes a special type of particle added to the coin as an additive. \nThe iSIS technology can be integrated with aRMour technology to add a 25-micron coating on coin blanks, allowing for detection at both simple point-of-sale sites and advanced banking systems."},{"question":"is pvst compatible with rstp?","response":"It's feasible to combine PVST and MST, considering that RSTP necessitates MST, though stability might be a concern and planning is essential. \nUsing RSTP alongside PVST+ while deactivating STP in interconnection links is an option if maintaining two separate STP instances is possible. \nFor interoperability between RSTP and PVST+ regions, it is critical to have VLAN 1 enabled on any trunk connections."},{"question":"is there a way to mute sound from one application on macos?","response":"Audio Hijack Pro is an application that allows you to mute sound from any other application. \nHear is a systemwide audio program that does mixing, equalization, etc. \nVolume Mixer, a program which is accessible with the Mac menu bar, is recommended as easy to learn and simple to use, offering straightforward features like application muting and volume control. \nAdditionally, BackgroundMusic is an open-source application that provides per app volume control on OSX10.10+."},{"question":"what is the real difference between apt-get and aptitude? (how about wajig?)","response":"Aptitude is favored for its user-friendly command-line interface. \nOn the other hand, using apt-get and its associated companion tools results in less memory consumption and offers slightly faster performance."},{"question":"how to remove an app stuck in waiting mode from the mac app store?","response":"If you cannot stop an old OS from downloading, holding down the 'option' key on your keyboard within the launchpad will cause the apps to jiggle like on an iPhone, enabling you to click the 'x' to delete or halt the download. \nDownloads that become stuck could be due to the 'storeagent' process, and to resolve this, exit the App Store, terminate the 'storeagent' using a tool like Activity Monitor, and then restart the App Store. \nIn some cases, it might be necessary to restart the storeagent process through the Activity Monitor to resume a download rather than removing downloaded parts or files. \nIf another Apple ID was used to log in to the App Store, logging back in using the original ID to complete or cancel the downloads and then logging in with your ID could clear the issue. \nAdditionally, killing the 'storedownloadd' process, especially in OS X version 10.10.3, can resolve issues with iBooks downloads and other app downloads stuck in waiting mode."},{"question":"what is the offical name of the third on-screen button?","response":"This is a function commonly referred to as 'Recents' in the context of Android devices and is officially named \"Overview\". \nIt is also known by the term \"Task Switcher or Recent Tasks\". \nThe Overview function displays a collection of thumbnails representing apps and Chrome tabs that have been recently accessed; touching a thumbnail will open the respective app, and swiping a thumbnail left or right will remove it from the list. \nFor devices running on Android 4.4 or lower, the icon for the Overview function has a distinct appearance."},{"question":"what is the difference between protocol and port number?","response":"The protocol number is essential as it allows layer-3 protocols, like IPv4 or IPv6, to identify which layer-4 protocol should receive the packet's payload. \nIt is worth noting that the protocol number is located in the IP header, which is part of the layer-3 section of the network stack, not in the TCP header of layer 4."},{"question":"can devices on different subnets communicate?","response":"Devices within different subnets have the capability to communicate with one another."},{"question":"how to open rar file in linux?","response":"To work with .rar files on Linux, you have options such as installing unrar, which is not non-open source, or unar, which is and works on systems like Linux Ubuntu and Mint. \nOn Ubuntu or Fedora, you can also utilize the Archive Manager, a GUI tool for extracting files. \nFinally, the RAR \"rar e \" command is available, created by the brother of the original RAR file developer."},{"question":"why do we need to fork to create new processes?","response":"The reason forking is a part of Unix is because it was relatively simple to implement within the existing system, mirroring the concept used in the Berkeley time-sharing system that was a predecessor to Unix. \nIntegration into Unix was facilitated due to the Berkeley system's capability to handle a rudimentary form of process control, and the initial set-up of forking didn't require extensive changes to that system."},{"question":"why and how are ethernet vlans tagged?","response":"If you have more than one VLAN on a port (a \"trunk port\"), you need some way to tell which packet belongs to which VLAN on the other end; a VLAN tag is used on the trunk port, where the Ethernet frames are tagged in accordance with the 802.1Q standard."},{"question":"when is a big rewrite the answer?","response":"A BIG rewrite can be justified when switching to another language or platform, or switching frameworks\/external components or the existing code-base is no longer maintainable. \nA rewrite may also be appropriate when the cost of rewriting the application and maintaining the rewritten application is less than the cost of maintaining the current system. \nIt's not only down to the system or application in question though, you must also justify the rewrite and get the full support of any project sponsors, as well as your superiors at an executive level and the end user. \nYou'll also need a crack team of developers to actually do the work. \nAlso, when rewriting a whole system, ideally it should be possible to incrementally redesign it. \nThere may also be business reasons that necessitate a rewrite, such as the rewrite giving the organization a competitive edge or allowing it to better serve its customers that cannot be done with the current architecture. \nAlso, if the software has high business value and the quality of the code is poor, then a re-engineering is justified. \nFurthermore, on the business end, company mergers can result in a huge overlap in systems functionality, while other circumstances include, the existing system not being scalable, switching to completely new technologies, or switching to a new platform without having the necessary migration tools. \nTime is also a factor, with maintenance becoming more and more expensive as developers for older technologies become rare. \nThen the hardware itself begins to age and it gets harder and harder to find new hardware, operating systems, and frameworks to support an likewise ageing system or application. \nIn some cases the source code for the original application is lost, and recovery is more expensive than rewriting. \nOf course, rewrites don't have to be on a big scale, and can be implemented on applications that are considered trivial. \nThey can also be required on a project level, when a fundamental change to the architecture is sometimes the only way forward. \nLastly be aware that a rewrite is not necessary if the code was written by you, has no fundamental flaws and you aren't changing technologies. \nIn this case, it might be more appropriate to refactor."},{"question":"right-click, create a new text file. how?","response":"You could assign a shortcut to a script. \nThe cleanest way is to use a Automator script available on Github. \nThere is a little-known feature of the Finder called Stationary Pad which will also work. \nNew File Applescript with Toolbar Icon will add a new file widget to the Finder toolbar. \nOr try using XtraFinder plugin for Mac OS's built-in Finder. \nAlternatively, if you download and install BetterTouchTool, you can set up this action easily. \nNew File Menu.app can be configured to provide an experience familiar to Windows users. \nRemember that if you upgraded to macOS Sierra, you may need to reinstall New File Menu (try the free version). \nUsing this, you can right click in any Finder window to create a new file. \nIf you use Alfred, you can try a workflow available on packal.org. \nIn High Sierra: go to System Prefs\/Keyboard\/Shortcuts, choose SERVICES and check \"Open Selection in a TextEdit window\"."},{"question":"why is rhel not free?","response":"Red Hat charges for compiling the software from source RPMs and for providing enterprise-level support; additionally, it does freely provide the source RPMs, from which users can build the binary version of their distribution."},{"question":"is there a keyboard shortcut to navigate one level up in finder?","response":"When navigating in Finder on a Mac, you can use the \u2b06\ufe0e keyboard shortcut to go back to the parent folder. \nAdditionally, right-clicking on the title in a Finder's window allows you to jump directly to any location in the file's path. \nFor further customization, you can also add the Path button to the Finder's toolbar for more convenience."},{"question":"are vectors and arrays the same?","response":"Vectors aren't exactly arrays, but a vector is a 1-dimensional array. \nIn programming, vectors and arrays are the same thing and are used interchangeably."},{"question":"password management for kids - whats a good way to start?","response":"We could focus more on educating the kids about why password management is crucial to do so. \nAllowing them to write down their passwords in a notebook and coming up with a fun method for concealing them in case the notebook is lost could be a good option. \nAdditionally, we could teach them about creating backups and storing them in a secure place. \nSuggesting the repeated use of the \"forgot password\" process as a password management strategy, or using an online family password manager to share passwords securely are other possible techniques. \nMoreover, you can impart the skill of developing a strong password pattern as an additional method. \nAdditionally, guiding them to memorize a strong master password could be beneficial and is achievable even for young children."},{"question":"how do i stop my ipad connecting to my iphone?","response":"To ensure that personal and company data are kept separate on your Apple devices, it's recommended to use different Apple IDs for your iPad and iPhone. \nIf you prefer to use the same Apple ID for both devices, you can manage which data to sync by going to the iCloud settings and disabling the switch for apps where you don't want to sync data. \nFor example, to prevent website history from syncing across your devices, you should turn off iCloud for Safari, and turn off iCloud for Messages to stop text messages from syncing. \nAdditionally, you may need to disable Text Message Forwarding on your iPhone to stop SMS from appearing on your iPad."},{"question":"whats wrong with comments that explain complex code?","response":"While documenting work is generally considered good practice, comments often fail to update automatically along with the code, leading to inconsistencies, and comments don't make code easier to test. \nAdditionally, comments are always failures and since they cannot be executed, they cannot serve as substitutes for well-written code. \nMoreover, relying on comments to convey the true functionality of the code may not be ideal, as comments unlike code are not always accurate representations of the code. \nFurthermore, maintaining and updating comments as the code changes can be cumbersome, and there's a risk that individuals with varying language skills may misinterpret them. \nUsing comments as a shortcut to avoid improving the code itself is seen as lazy, a disservice, and disrespectful to those who maintain the code."},{"question":"my device is getting slow, apps start misbehaving\/crashing. what can i do?","response":"The typical elements responsible for a malfunctioning system may include the Application Cache and the Dalvik Cache. \nOne effective way to address a sluggish device may involve deleting unnecessary apps. \nDisabling bloatware, or unnecessary system apps, can also contribute to device optimization. \nSimply deleting apps was effective for one user, particularly when the app 'You Don't Know Jack' was identified as the source of the problems, leading to a notable speed enhancement. \nAltering specific settings, such as disabling the fastboot feature in the power settings, then restarting the phone, can offer a simple fix to prevent more drastic measures. \nAdditionally, managing auto-updates, especially in the Samsung Galaxy Store, and handling automatic app processes via device maintenance or developer options can have a positive impact on your phone's performance. \nIt's advised to uninstall or reset to factory default those apps that seem unnecessary and are understood well enough to be removed safely."},{"question":"why does argv include the program name?","response":"The command-line argument vector, or `argv`, includes the program name to enable the crafting of informative error messages."},{"question":"how to write out a normal tilde sign (~) in mac?","response":"Press shift + ` (grave accent key), then space. \nIf your keyboard is set to \"U.S. International PC layout,\" you might consider switching to \"U.S. layout\" to make this easier. \nAlternatively, press alt + \u00a8 (diaeresis key) to achieve the same result. \nOn a U.S. layout keyboard, using shift + \\ (backslash key) also works; this key is often adjacent to the left shift or above the enter key on MacBooks from other countries. \nIf you want to place a tilde accent over another character, you can find additional modified character options in the keyboard preferences accessed through the toolbar or using the Accent Menu that appears when holding down the key for the base letter. \nFor Finnish and other international Mac keyboard layouts, pressing Alt ^\u00a8 (caret and diaeresis key) followed by space produces the tilde symbol. \nOn French, Spanish, or German Mac keyboards, typing \u2325+N and then space or n gives you the normal tilde or a tilde over an 'n', respectively. \nIf you use a Spanish keyboard, holding the Alt key and pressing \"\u00f1\" creates the tilde symbol."},{"question":"how to move a window to another space without using the mouse?","response":"While dragging a window, press a key combo to move it to a numbered space: \"Control + 1, Control + 2, Control + 3, etc\". \nYou can also explore third-party tools like SizeUp, which provides additional features for window management. \nAmethyst is another option that allows you to send windows to specific spaces using configurable keyboard shortcuts. BetterTouchTool is a free tool that not only facilitates window movement but also offers additional functionalities; it can be used in combination with ShiftIt for window resizing. \nAdditionally, yabai is a window management utility designed to work as an extension to the built-in window manager of macOS."},{"question":"how to scroll in a terminal using keyboard?","response":"To scroll back through the command history in a terminal emulator, you can generally use C-a [ to engage scrollback mode, allowing you to navigate using your keyboard. \nIn most terminals, you can use Shift+PageUp and Shift+PageDown. \nIn certain environments like Ubuntu\u2019s default terminal, you can use Ctrl + Shift + Up or Ctrl + Shift + Down to go up\/down by line. \nIf you're using VirtureBoxVM on a Mac, you\u2019d press SHIFT + fn + up_arrow or down_arrow. \nOn FreeBSD systems, toggling screen scrolling is achieved by using the Scroll Lock key. \nAdditionally, on Linux systems with an Apple\/Mac keyboard, like on a MacBook Pro, you would use shift+fn+UpArrow and shift+fn+DownArrow."},{"question":"what can someone do with your imei number?","response":"They will only be able to take over your phone number and receive future messages."},{"question":"the slash after an ip address - cidr notation","response":"The slash following the IP address represents the bit length of the subnet mask, and is called Classless Inter-Domain Routing (CIDR) notation."},{"question":"can i change the brightness on a secondary display?","response":"Controlling the brightness on external displays for Macs is typically managed using the physical buttons or menus found on the display itself. \nHowever, if using an Apple Cinema Display, you can adjust the brightness by connecting the display's USB cable to your Mac, which will then allow a \"Brightness\" slider to appear in the \"Displays\" System Preferences. \nFor Apple Cinema displays, the brightness can also be adjusted through the \"Displays\" preference pane, and the settings will appear on both the main display and the MacBook Pro, enabling separate brightness adjustments. \nAdditionally, on Apple displays, pressing Control+F1 or Control+F2 can adjust the brightness on a secondary display, providing that the USB cable is connected to the MacBook Pro, which enables the keyboard shortcuts. \nConnecting only one Thunderbolt display at a time to the MacBook Pro allows you to adjust its brightness before reconnecting both, however, this method excludes displaying a brightness slider for both screens. \nFor a dual display arrangement where the second screen's USB is connected to the first screen, Ctrl+F1 and Ctrl+F2 can adjust the brightness of the second screen without the need for disconnection. \nUsing the command cmd+F1 can mirror the displays to duplicate brightness levels, and repeating this command allows each screen to be adjusted separately. \nThis mirroring technique can also be used for adjusting brightness when working with an extended desktop setup on an MBP connected to an LED or Thunderbolt display. \nFinally, there are software solutions available, such as the free \"Brightness Slider\" on the App Store, and a program called \"Brightness Control\" that allows for dimming multiple external monitors."},{"question":"how does gratuitous arp work?","response":"Gratuitous ARP is sent as a broadcast frame, and is a sort of \"advance notification\" that updates the ARP cache of other systems before they ask for it (no ARP request); in the Gratuitous ARP, the Opcode field is set to 2, which indicate a Response."},{"question":"how do i transfer files from my mac with a broken screen?","response":"The simplest thing to do is boot the Mac in target mode (hold the T key down) and connect it via Thunderbolt or Firewire to another Mac, so you can have visibility without repairing your Mac's screen; alternatively, you could just remove the drive from the Mac and use a cheap $5 USB to SATA connector to mount the volume on a Mac to enter the Filevault passphrase to decrypt the volume."},{"question":"what to do if caught in a physical pentest?","response":"When engaging in a Red Team Engagement, if you are caught by security, ensure you follow the police's orders. \nThey will verify your Permission to Attack and contact the individual responsible for authorizing your activity. \nClaiming to be a \"security researcher\" or attempting to flee the scene are inadvisable strategies, as these could lead to further complications and misunderstandings with security personnel."},{"question":"google backup: multiple devices using the same account - what happens on restore?","response":"Each device maintains its own backup, as evidenced by the individual apps and data linked to specific devices that do not cross over upon factory resets."},{"question":"can you connect two airpods to one apple watch?","response":"No, you can use Airpods, an Apple watch, and a Bluetooth keyboard with an iPhone all at the same time, but you cannot use more than one of each at a time."},{"question":"how do i hide the spotlight icon on yosemite, but keep the spotlight functionality?","response":"The utility app Bartender can help reorganize menu bar icons by keeping them in the bar, relocating them to the bar, or hiding them completely. \nAlternatively, icons can be made invisible by patching the status bar size to zero, which requires modifying the Spotlight binary and using Terminal commands. \nThere's also Vanilla, a minimalist app for hiding menu bar icons, as well as Dozer, a completely free app serving the same purpose. \nIn macOS Big Sur, unchecking 'Show in Menu Bar' in System Preferences under Dock & Menu Bar settings removes the Spotlight icon."},{"question":"what is the difference between writing test cases for bdd and tdd?","response":"Behavior Driven Development (BDD) emerges as an extension and revision of Test Driven Development (TDD). \nWhile the differences between the two are nuanced, they primarily revolve around language and perspective, with BDD often associated with 'outside-in' or 'mockist' tests. \nBDD introduces a novel vocabulary, shifting the focus when writing unit tests. \nIn TDD, the emphasis lies on unit tests for every function, irrespective of what it does, whereas BDD a subset of TDD concentrates on software that holds relevance. \nNotably, BDD allows modification at a lower abstraction level through code refactoring. \nIt's worth noting that employing a BDD framework, such as Fit or Cucumber, may result in slower tests and necessitate additional infrastructure."},{"question":"how do i get f11 and f12 to behave like normal function keys?","response":"To get F11 and F12 to behave like normal function keys, you can adjust settings in Preferences under Mission Control. \nIn this section, two options are configured to use the F11 and F12 keys; to make them behave like normal function keys, set these options to '-'."},{"question":"how can i shutdown my android phone using an adb command?","response":"To power off your phone, you can execute the adb shell reboot -p command, which will shut down the device. \nAlternatively, you can access the Android shell and issue the shutdown command to turn off the phone."},{"question":"where are books stored after ibooks migration on mavericks?","response":"After migrating iBooks on Mavericks, your books are now stored within the user Library folder at the following path: ~\/Library\/Containers\/com.apple.BKAgentService\/Data\/Documents\/iBooks\/Books."},{"question":"how can i export my private key from a java keytool keystore?","response":"The PKCS#12 format supports the transfer of private keys, which was introduced due to operational needs and the evolution of Public Key Infrastructure (PKI) certificates. \nIn response to security challenges, Java incorporated the ability to import PKCS#12, but exporting private keys remains unsupported as a security measure. \nSince Java 6, keytool has been capable of importing and exporting private keys to and from PKCS#12 files. \nKeystore Explorer is a recommended third-party tool for managing Java keystores, praised for its ease of use and comprehensive features, with keytool being the ultimate tool when dealing with Java keystore. \nLastly, to convert from JKS to P12, followed by OpenSSL, the Java keytool can be utilized to export from keytool's native format to the standardized PKCS #12 format."},{"question":"how do i run proper https on an internal network?","response":"Use public certificates, but for internal addresses; a reverse proxy such as Caddy, for example, can handle the certificates (issue & renewal), if you set up a DNS server to point all internal hostnames to the Caddy server, and if you want to limit access to internal only, you can close port 80 until your certificates requires renewal."},{"question":"how do i set os x to boot by default?","response":"It is possible to set the default boot disk in System Preferences>Startup Disk. \nAlternatively, if you press and hold the Control key while selecting the desired boot device during startup, this choice will be saved in the Startup Disk preferences, ensuring it remains set for future reboots."},{"question":"why are hard links to directories not allowed in unix\/linux?","response":"Allowing hard links to directories would break the directed acyclic graph structure of the filesystem (filesystem is organized as trees and a tree cannot have a cyclic reference), possibly creating infinite directory reference loops and dangling directory subtrees, which will confuse programs which traverse filesystem, such as making fsck and any other file tree walkers error prone. \n\nWith the exception of mount points, each directory has one and only one parent, enabling the use of '..': this algorithm relies on this fact, because if hard links to directories were allowed, which one of the multiple parents should .. point to? \n\nHardlink creation on directories would be unrevertable; for example, recursively deleting files in \/dir2... would delete them from \/dir1 too, risking data loss. \n\nTo resolve this, the system would have to traverse the entire file system until it finds the first pointer to the deleted directory, or the file system would have to maintain a list of all directories pointing to a hard linked directory; either would be a performance overhead and an extra complication for the file system meta data and\/or code."},{"question":"why is it dangerous to open a suspicious email?","response":"Opening a suspicious e-mail is riskier because more stuff is processed when you actually open it, and it is possible your mail client has an unknown bug\u2013 or a known but unpatched one\u2013that could allow an attack. \n\nEven if nothing actively bad happens, many passively bad things can happen, as just by opening an email in Gmail, or other email clients that do not block images, you may be sending data to potential attackers, for example you might view a one pixel transparent image tagged with your email address that flags you as the kind of person who opens and reads suspicious email, putting you on a list for subsequent email-spam bombardment, that could cause you to be scammed."},{"question":"you are in emergency mode after logging in type journalctl xb to view?","response":"Emergency Mode might get triggered if there is a corruption in your file system or if the device IDs have undergone a change. \nYou should check the file system using commands tailored to your specific file system type, such as fsck.ext4 or fsck.ext3, followed by your partition, like \/dev\/sda3. \nEmergency Mode can also be triggered due to changes in partitioning, either through the creation of a new partition or the modification of an existing one."},{"question":"what is the difference between authorized_keys and known_hosts file for ssh?","response":"The files \"known_hosts\" and \"authorized_keys\" possess subtle differences both in their format and how they are utilized."},{"question":"is there any option with ls command that i see only the directories?","response":"You can list directories within the current working directory by using the command `ls -ld -- *\/`. \nThis command will output all the non-hidden directories, but it will also include symbolic links to directories. \nIf you're looking to list subdirectories in a different folder, you should execute `ls -ld \/path\/to\/directory\/*\/`. \nRemember, the `-l` option is not mandatory for this command to work."},{"question":"list only regular files (but not directories) in current directory","response":"There is no option to do that, but unix & linux do allow long-winded and inelegant pipelines to be turned easily into a shell script, function, or alias, and these can, in turn, be used in pipelines, just like any other program. \n\nWith zsh and Glob Qualifiers you can easily express it directly, for example: echo *(.) will either only return the list of regular files or an error depending on your configuration; for non-directories: echo *(^\/) will include symlinks (including to directories), named pipes, devices, sockets, and doors; for regular files and symlinks to regular files use echo *(-.); and for non-directories and no symlinks to directories either use echo *(-^\/). \n\nYou can use: bash-4.2$ ls -F | grep -v '[\/@=|], and then use grep to exclude the non-regular file characters from output and you have the files. \n\nTo list regular files only: ls -al | grep '^-'. \n\nAnother solution is: #!\/bin\/bash for f in * do if [ -f $f ]; then echo \u201c$f\u201d; fi done, or it can be done as a one liner: for f in *; do [ -f $f ] && echo \u201c$f\u201d; done."},{"question":"what is the right way to close apps in android?","response":"There is no cause for concern about closing apps on Android. \nYou can simply proceed to the next application you wish to use and not close any application, as operating system takes care of memory for idle apps. \nThe Android system effectively manages memory and closes applications using the back button, signaling that you are finished with them. \nIf you opt to use the back button, it will trigger onDestroy() on the current Activity, whereas choosing the home button will only call onPause(). \nIt is the responsibility of app developers to decide if an app should close when the home or back button is pressed. \nRegardless of the method used to leave an app, the activity ceases to run."},{"question":"how can i export the list of open chrome tabs?","response":"To retrieve information about your current tabs after a browser crash, you should navigate to the Sync Data folder to find the synced information with Google. \nIf you wish to recover your Chrome tabs on Android, you must locate and utilize the file that contains the current tabs. \nAnother method to access Chrome tabs on a device is to use the Remote Devices feature in Chrome's debugger, where you can expand the list of tabs to view them all, and then highlight and copy the data. \nAlternatively, you can convert the list of open Chrome tabs into a markdown formatted text string and copy it directly to the clipboard using a JavaScript snippet within Chrome's developer tools. \nA different approach involves using the Android command line tools on a development machine with USB debugging enabled on your Android device; by executing wget -O tabs.json http:\/\/localhost:9222\/json\/list, you can obtain a JSON file listing the open tabs."},{"question":"how do i make my pc speaker beep","response":"You could make Perl script, such as \" print \"\\007\"; \". \nAnother approach is to try \"echo -n Ctrl+V Ctrl+G\", however, this will only work when the output device is a terminal. \nOn a terminal, pressing Ctrl+G and then Enter will produce a beep sound. \nIn addition, simply echoing \"\\a\" or \"\\07\" should trigger a beep. \nThe utility 'beep' offers various methods for achieving this, including writing an ASCII BEL (\\007) character to standard output, opening \"\/dev\/tty\" and send the BEL character there, or using an X display command. \nFor Linux systems, tools like beep can use an \"ioctl\" on the console device to emit a given sound, more specifically, beep will use the \"KIOCSOUND ioctl\", but there is also a \"KDMKTONE ioctl\" which can be used to generate sound. \nWhen traditional PC speakers aren't available, sounds can be played using commands like `paplay \/usr\/share\/sounds\/sound-icons\/capital` on systems with sound chips and speakers."},{"question":"should ipv4 icmp from untrusted interfaces be blocked?","response":"No, ICMP should not be blocked because it's vital signalling protocol and the internet does not function without it."},{"question":"changing the default size of iterm2 when it opens","response":"To configure iTerm2 to open with a specific layout, first set it up the way you'd like to see it when it opens. \nThen, save this window arrangement through the Window menu and set it as the default configuration in Preferences. \nYou can adjust the settings any time by placing things as you like them and re-saving the default arrangement."},{"question":"is basic-auth secure if done over https?","response":"The answer is variable as it depends entirely on how secure it needs to be and it may be better to hash the password with a nonce, or better yet, use a claims model that passes the authority over to a trusted third party. \nThe HTTPS protects the password in transit but this may not be adequate depending on what your site and how secure it needs to be. \nIt is acknowledged that many large and popular sites use basic or forms-based authentication over HTTPS, even though it may not completely align with best security practices. \nBasic Auth over HTTPS is considered good, but not foolproof, as potentials for decrypted interactions exist, particularly with corporate HTTPS proxies. \nHowever, as long as the password is a good one, then this is what the SSL was designed for and will work fine, and as long as you don't ignore any TLS warnings from the browser you should be good. \nUsing basic auth + HTTPS is generally not less or more secure than a form-based authentication method over HTTPS. \nIt's important to consider the limitations of mobile devices when using basic auth, as they may not allow certificate validation before entering credentials, potentially posing a risk when an attacker uses a valid certificate. \nFinally, while Basic Auth over TLS works well if you can live with a few limitations; for more robust needs, consider additional measures such as signature schemes or TLS Client Auth."},{"question":"why isnt java used for modern web application development?","response":"Java is generally considered overkill for small web applications, typically being more suitable for larger systems such as those used by banks and insurance companies. \nIt is easier to find hosting for PHP compared to Java or ASP, which isn't a flaw of the languages but rather a reflection of market availability. \nJava web applications are not typically associated with rapid development due to their structure and the arduous process of debugging and implementing a business logic layer. \nStartups need to launch quickly, contradicted by the six-month timeline often required to release a Java web application, and the development process in Java is not as productive compared to frameworks like Rails\/Django\/Grails. \nJava's earlier presence in web browsers through applets, which performed poorly and had security issues, has negatively impacted its perception in web development. \nJava has the stigma of being unfun and too enterprise-oriented for the needs of startups, which prioritizes a rapid development cycle and the ability to make quick iterative changes. \nIn terms of cost and work involved, Java usually demands more effort and financial resources, and there's a perceived lack of synergy between the operating system and Java. \nStartups may choose other technologies over Java because they are deemed \"sexier\" with a stronger open source community driving them. \nJava doesn't have the \"sexy\" appeal of languages like Ruby for many modern web developers, often leading to a preference for languages that promise faster and easier development cycles. \nJava web development frames can be difficult to learn, often unreasonable for the requirements, and the layer of abstraction can be painful to work with. \nStartups, particularly those driven by under-30 visionaries, favor languages that allow them to program quickly and affordably, and they often choose non-mainstream languages as a natural filter for less committed developers. \nJava is seen as complicated, with developers finding it easier and quicker to make changes in PHP compared to the restarts often required for Java applications, and the cost of hosting Java applications is also a concern. \nFramework-based systems like Ruby on Rails provide an easier learning curve and faster setup than Java, which requires learning the language and additional frameworks or tools. \nJava's syntax is criticized as too verbose and the development process is seen as cumbersome, especially when compared to the simplicity of other languages and frameworks. \nThe issue with Java in startups is about the trade-off between speed and scalability; startups need to move fast and iterate, which can be done more effectively with simpler languages and frameworks. \nJava is seen as requiring a medium-sized team to see efficient implementation results, and the options in Java's ecosystem can be overwhelming, coupled with a lack of proper web hosting solutions. \nJava is verbose and the community is seen as less innovative, with developers gravitating towards languages like Ruby, Python, or PHP, which are seen as more \"friendly\" and \"fun\". \nTo differentiate from the masses, developers learn new languages as Java is seen as the language of everyone, with other languages being more connected to modern web development. \nJava is complex to learn and its ecosystem can be overwhelming, especially for beginners, whereas properly configured Java environments can be highly productive. \nJava and J2EE may have been associated with long development cycles and heaviness, and alternatives in other languages are seen as offering a unified solution rather than a multitude of options. \nJava is associated with a slower development time compared to languages like Python, and in web frameworks, Java's heavy resource requirements and lack of good shared hosting options are disadvantages. \nThe complexity often found in Java applications is seen as a result of the mindset of some developers within the Java community. \nJava's verbosity and lack of certain modern language features can make development frustrating in comparison to dynamic languages that offer faster iterations in web development. The \"cool kids\" in the developer community may use languages like Ruby because they solve problems in still simpler and time- and effort-saving ways, leaving Java due to its perceived difficulty and annoyance. \nJava's lack of multiline string support and unsatisfactory web frameworks contribute to a challenging environment for creating web applications. \nJava can be used efficiently and \"hackily\" to quickly build systems, but the inclination to overcomplicate projects can result from the extensive knowledge and tools available within the Java ecosystem."},{"question":"is source code generation an anti-pattern?","response":"When we generate code, it is not source even if it is text that is readable by humans, because the true definition of source code is that which is created by a human or other similar intelligence. \nMost opinions offer that this is not an anti-pattern and that generating code and considering it as source code can be problematic, as it forgets the purpose of code generation and how new languages evolve from the inadequacies of their predecessors. \nWhile the act of generating source code is not inherently an anti-pattern, care must be taken to ensure that the generated code remains understandable and does not complicate maintenance or debugging processes. \nOther opinions advise that source code generation is a workaround for programming languages that lack expressive meta-programming, and there's no need for generation in languages with adequate built-in meta-programming capabilities. \nCode generation is not always an anti-pattern and can be particularly useful in frameworks where it helps keep code in sync across different languages. \nHowever, if you are using source code generation for replacing features like generics, it would be considered an anti-pattern. \nGenerating intermediate code is also not considered an anti-pattern, as it has played a historical role in the development of programming languages like C and C++ and can serve various practical purposes. \nMoreover, it is not an anti-pattern to generate code just once, especially when porting code from one language to another, since it can streamline the transition and maintenance process. \nLastly, not using a code generator when it facilitates efficiency and understandability would actually be an anti-pattern."},{"question":"when is it a good idea to force garbage collection?","response":"Garbage collection is typically triggered when the system experiences \"memory pressure\". \nIt's advised against forcing garbage collection in general unless there's a situation where you have just created a lot of garbage or when you expect the system to be non-responsive due to a heavy load operation. \nManual garbage collection might be a wise preemptive measure to clear out space when preparing to create a large collection of objects and use a significant amount of memory. \nLikewise, after loading a significant collection of big objects and not expecting to load more, invoking garbage collection can help to improve cache locality and overall system performance. \nIn certain situations, such as benchmarking, you'd want a known managed heap state so manual garbage collection can ensure that the GC does not randomly activate during the process. \nForced garbage collection might also be used when suddenly releasing a large amount of resources, like closing a major GUI window or coping with third-party leaks. \nGaming applications might schedule garbage collections during less critical moments to avoid frame rate hiccups. \nIn environments where non-memory resources are used, such as RMI, inducing GC can prove practical to mitigate resource wastage. \nWhen coding for platforms like the Xbox, timing garbage collection is critical to avoid FPS issues. \nIn rare cases with a significant creation of objects set for collection, manual GC can be beneficial, especially when performance dips are tolerable, but such actions should be validated through profiling. \nGenerally, it's not recommended to force garbage collection; however, there are exceptional cases where this knowledge surpasses the garbage collectors'."},{"question":"how do you explain the necessity of nuke it from orbit to management and users?","response":"Analogies comparing computer viruses to biological viruses can be used to illustrate how these threats work and their potential impacts. \nAnother method for illustration is to draw parallels with spy stories, explaining how compromised security systems are similar to compromised agents within a spy network, and how complete eradication is the only way to ensure security. \nSome stakeholders are more persuaded by a straightforward explanation of the consequences in terms of tangible losses, such as dollars or hours of productivity, rather than evocative analogies. \nA pragmatic approach that resonates with management includes providing a clear analysis of risk versus cost, offering choices without relying on biological or non-business analogies, and demonstrating these analyses in an easy-to-understand tabular format. \nThe notion of 'nuke it from orbit' as the most effective, yet costly, approach demonstrates the extent of measures that might be necessary for ensuring security, emphasizing the need to calculate potential costs and benefits in clear terms for business decisions. \nRisk management tools can help underline the probability and impact of a security breach, facilitating a decision based on informed assessments. \nLastly, to impress upon management the severity and need for absolute measures, one can restate the famous quote from the movie \"Aliens,\" emphasizing that certain drastic actions are the only way to be completely sure of security."},{"question":"how to rsync over ssh when directory names have spaces","response":"If you need to transfer a filename that contains whitespace, you can either specify the --protect-args (-s) option, or you'll need to escape the whitespace in a way that the remote shell will understand. \nFor instance: rsync -av host:'file\\ name\\ with\\ spaces' \/dest."},{"question":"why is my imessage texting from my email?","response":"The Messages app on your iPhone is used to send messages to other devices, utilizing Apple's servers to determine the best method of delivery. \nIf the recipient uses an Apple device, the message is sent through the Apple network, thereby avoiding SMS charges. \nFor recipients not on Apple devices, such as Android phones, the message is transmitted through regular text messaging services, which may incur fees. \nMessages are not sent via email; rather, your email, linked to your Apple ID, serves as an identifier that allows you to be contacted on devices that don't support phone numbers."},{"question":"unable to modify the volume with the keyboard","response":"One hack to fix this that might work is to simply plug a pair of headphones in, then unplug them. \nAfter this you might need to go to \"System Preferences\" then \"Sound\" and adjust the slider bar at the bottom, where it says \"Output volume\". \nAnother way, might be to simply shutdown the Mac and turn it on again, while rebooting via safe mode might be required too. \nOne alternative way to adjust the volume is to open the Terminal window and type the command: sudo osascript -e \"set Volume 5\". \nIn this command 5 can be set as a higher or lower number to make the volume go up or down."},{"question":"how to know whether wayland or x11 is being used","response":"To restart the Xorg environment without losing your current windows and processes, you should run the 'r' command in the Alt+F2 menu. \nIf you are using Wayland, this command will not work and instead will display a message indicating that restart is not available. \nA straightforward way to determine if you're running on Wayland is to check if the WAYLAND_DISPLAY variable is set."},{"question":"how should i securely type a password in front of a lot of people?","response":"Some options you have are: tell them politely to look away; create a new junk email account for work; use two-factor authentication; place a blanket over you and\/or the computer; store your password in KeePass; use the auto-type\/AutoHotKey or a plugin to enter the password or parts of it automatically; rotate it regularly; learn to use the Dvorak keyboard layout; use a YubiKey to store a fixed string; buy a simple fingerprint scanner or use a laptop with fingerprint scanner; bring in your own laptop, tablet or phone to access your email; use an email client that stores your password; use a device that requires a pin, fingerprint or eye reading to unlock; fake a few extra key-presses between the real ones, by putting your finger on the key but not pushing it; cover up a small section of the keyboard with your other hand while typing; use technology called OTP (One-Time Password), such as the S\/Key implementation, which allows you to type in a password onto a trusted device; login using keypairs via an ssh tunnel or similar; or use very strong passwords and learn to type them at high speed."},{"question":"is there a legitimate reason i should be required to use my companys computer? (byod prohibited)","response":"Standard corporate security policies generally disallow personal devices on company networks for security reasons. \nCompanies are better positioned to enforce security procedures on their hardware. \nTo prevent security risks and data leaks, it's advised to consult with the IT Security department regarding these policies. \nControlling software licenses also plays a critical role in ensuring legal compliance and practical management of resources. \nCompanies may impose restrictions on using personal computers to monitor productivity and protect against economic espionage or other malicious activities. \nLegally, they may need to install employee monitoring software, which is simpler on company-owned equipment. \nMoreover, companies have hardware standards that facilitate security settings, use of technology, and software requirements."},{"question":"is java an open source?","response":"Java is not open source. \nAdditionally, the Java Technology Compatibility Kit (TCK), which is the test suite for Java, is not open-sourced."},{"question":"what is the difference between us and canadian keyboard layout?","response":"There's no difference, except for the flag icon."},{"question":"does auto make c++ code harder to understand?","response":"If the type of the variable is obvious, tedious to write, hard to determine\u2013or if you explicitly want a conversion\/commit to a type, or if there is no clear type, use auto, which declutters long declarations and can make code easier to understand. \nHowever, using \"auto\" in coding can lead to a loss of readability and clarity, (which is not outweighed by the perceived aesthetic cleanliness or reduced typing effort) and in the case of iterators or platform-specific types, understanding and determining the exact type becomes a significant effort, reducing code readability."},{"question":"how to get over device or resource busy?","response":"The tool `lsof`, which stands for list open files, is useful for identifying and managing open files and can be used to see all open files under a directory. \nAfter determining which processes have files open, you may close or terminate the applications using the kill command. \nAlternatively, you might use `fuser`, a different tool, to find out which process is using a specific file or files within a mount. \nIf you encounter mounting issues, it might be necessary to unmount the filesystem or directory in question using unmount \/path. \nA more aggressive solution involves the command \" lsof +D .\/ | awk '{print $2}' | tail -n +2 | xargs -r kill -9\" that utilizes `lsof` to list PIDs and then `kill -9` to force-terminate the associated processes. \nDeleting the directory from the server or performing a lazy unmount (`umount -l`) can be considered if the regular unmount command does not work. \nIn some cases, simply rebooting the system resolves the issue. \nWhen dealing with persistent files, particularly on servers with NFS network file systems, a workaround is to rename or move the parent directory and return later in a day or two to remove the file."},{"question":"how to switch or close the new split terminal pane?","response":"You need to press Shift-Cmd-D on your keyboard. \nAlternatively, if you are using OS-X shortcuts, the combination \u2318 Shift \u2318Command D will accomplish the same task."},{"question":"is centos exactly the same as rhel?","response":"CentOS is derived from the Red Hat Enterprise Linux (RHEL) distribution, offering an enterprise-class computing platform, maintaining 100% binary compatibility with its upstream source, Red Hat. \nUnlike RHEL, with CentOS, users do not pay for commercial support from RedHat, and updates are generally available for RedHat first before being released to CentOS; Other than that they are the same. \nCentOS closely mirrors RHEL except for the branding and support, with library versions are the same, ensuring compatibility of binaries and administration tools that are configured similarly. \nThe release notes on the CentOS pages will reveal a list of RPMs that differ from Red Hat, mostly related to branding or the update mechanism that is proprietary to Red Hat. \nCentOS is described as more flexible compared to other clone projects and offers various advantages such as a growing community, responsiveness of developers, and multiple free support avenues, positioning CentOS as the community counterpart to Red Hat, akin to the relationship between Linux Mint and Ubuntu. \nAs a community project that is developed, maintained, and supported by and for its users, CentOS is divergent from Red Hat Enterprise Linux in terms of build environments, QA processes, kernels and other open source components, and the additional software that is not part of the Red Hat Enterprise Linux codebase, maintained by the CentOS Project. \nNonetheless, there are vital differences such as the lack of certified cryptographic protection on CentOS as required by government networks, and the fact that Common Vulnerabilities and Exposures (CVEs) are not tested on CentOS, making it unsuitable for certain secure network environments."},{"question":"hold cmd-q to quit from chrome","response":"In Chrome's menu bar, select the option to uncheck \"Warn before Quitting (\u2318Q)\" if you prefer the application not to warn you before it quits. \nThis setting is also accessible within Chrome's Preferences (Cmd,) under the Appearance section."},{"question":"can i install android on my non-android device?","response":"In theory, every device that satisfies the minimal conditions stipulated by Android can run the operating system; it simply involves tailoring Android to suit the specific device's architecture. \nHowever, the implementation is constrained by the availability, or more commonly, the lack thereof, of firmware and hardware drivers, specifically their source code, which is seldom provided openly. \nWithout drivers engineered for the particular device, Android will not operate on that device."},{"question":"is ping tcp or udp?","response":"The standard ping command operates without utilizing TCP or UDP protocols, instead, it relies on ICMP, specifically types 8 and 0 for echo messages and echo reply messages respectively."},{"question":"what is the difference between curl and wget?","response":"One of the key strengths of wget over curl is its capability to download content recursively. \nWget is a command-line tool without an accompanying library. \nIn contrast, curl can run across more platforms than wget can. \nWget operates under the GNU GPL, which is a copyleft license, whereas curl is under a permissive license similar to MIT. \nCurl also differs from wget in functionality, as it allows for file downloads and provides upload and a wide variety of other capabilities. \nThe included library with curl, libcurl, is heavily used by other software, making curl versatile beyond being a standalone tool. \nWget is specifically tailored to download files from servers, whereas curl is designed to exchange a variety of requests and responses with a server. \nPrimarily, wget is limited to HTTP\/HTTPS and FTP for file downloads, whereas curl supports an extensive range of protocols for debugging and testing different server configurations. \nTest results indicate that curl is generally faster in downloading files than wget and has a smaller command size on the system."},{"question":"why must a crl be issued periodically?","response":"To prevent CRLs from being faked, they are secured with the CA's public key signature and include a timestamp after which the CRLs themselves expire."},{"question":"where can find older versions of apps?","response":"Freeware Lovers is a site that collects freeware Android apps and retains old versions for a number of them. \nContacting the developer directly offers a safe and correct method to obtain an older version of an app. \nAdditionally, in alternative repositories like F-Droid, it is possible to choose from all offered versions of an app for download. \nAPKMirror, provided by Android Police, can also be a source for previous versions of common apps. \nThe site APKPure is another resource for a comprehensive collection of smartphone apps and their historical versions, with a guarantee that no additional extensions are required."},{"question":"how to move and overwrite subdirectories (and files) to parent directory?","response":"You will have to copy them to the destination and then delete the source, using the commands 'cp -r *' followed by 'rm -rf *' as there is no direct way to merge directories utilizing the 'mv' command. \nYou can also use 'cp' and 'rm' without the need to transfer a large volume of data by creating hard links to files rather than copying their actual data\u2014this is achieved via the command 'cp -rlf source destination' followed by 'rm -r source'."},{"question":"pass the output of previous command to next as an argument","response":"The grep & pcre:`command | grep -oP '\\$>\\s+rate\\s+\\(\\K[^\\)]+'` Pass the output of a previous command to the next as an argument. \nIn practice, one might use a command to retrieve the output of another command, which could involve extracting process IDs or other relevant data."},{"question":"how to monitor file access for an os x application?","response":"One approach is to use launchd, the main system-level tool for monitoring files. \nPrograms like Hazel can provide a graphical user interface around launchd to make the process more user-friendly. \nAnother command-line option is to utilize the lsof command in Terminal.app, which can provide information about open files. \nAdditionally, you can use the opensnoop command to monitor file access. \nActivity Monitor, found in the \/Applications\/Utilities folder, allows you to inspect processes and view open files and ports associated with them. \nIf you prefer a more comprehensive solution, Instruments, part of the Apple Xcode development suite, can monitor all file access and writes. \nFor specific needs, you may also explore iosnoop and iotop."},{"question":"what is a closure?","response":"At its core, a closure consists of combined local state and code, essentially acting as a contained package. \nIt is a function that can be stored as a variable characterized by its capability to retain access to the scope it was created in, even when used elsewhere. \nFurthermore, closures provide a new perspective on objects, as they are functions with one or more variables bound to them, emphasizing their function nature over the data. \nClosures are also characterized by their connection to associated states, making them similar to functions with attached state. \nIn programming languages that treat functions as first-class values, closures represent a mechanism that supports saving the entire state of a function, adding another layer to their capability."},{"question":"how to find live hosts on my network?","response":"The simplest approach to performing host discovery on a network is to execute the command nmap -sP with the appropriate IP range. \nThe easiest way to check this is to verify the ARP-tables after doing the ping sweep using nmap: arp -a -n, and this will list all hosts that which responded to an ARP query, even the ones which filter ICMP. \nWireshark is a powerful tool that logs all network traffic and can help identify broadcasting nodes and transmitted data. \nThe following bash script will output the IP addresses of all the live hosts on a network: #!\/bin\/bash nmap $1 -n -sP | grep report | awk '{print $5}'. \nTo fetch IP addresses that `arp -a -n` may not retrieve, performing nmap with `nmap -sP 192.168.1.1\/24` is suggested as a reliable alternative. \nTo find live hosts, you can also employ the command arp-scan 192.168.12.0\/24 # if vlan tagged interface use -Q vlanid etherape (GUI) show graphs of network activity. \nWith administrator privileges, you can use netdiscover(8) with -r flag to specify different class and mask. \nAdditionally, fing is a faster alternative for host fingerprinting and network scanning: sudo fing -r 1."},{"question":"how to disable command-q for quit?","response":"One method to disable command-Q for Quit is to use a keyboard remapper, such as Keyremap4MacBook, which allows you to map the command Q key combination to a function that does nothing. \nAlternatively, you can create a new shortcut within System Preferences under the Keyboard settings specifically for the application you're trying to protect from quitting; this involves assigning a different key combination for the quit command. \nAnother option is to utilize a tool like BetterTouchTool to set up a new shortcut or key sequence that remaps Cmd + Q to \"No Action.\" via the \"Keyboard\" then \"Add new shortcut or key sequence\" menus."},{"question":"confused by the many locations of the virtual \/sdcard\/","response":"The change to \/sdcard\/0\/ from \/sdcard\/ with the introduction of Android 4.2 Jelly Bean was due to the introduction of multi-user functionality. \nThese changes imply that the memory layout for the internal virtual SD card shifted to account for multiple users on a single device, with the path \/storage\/emulated\/0\/ representing the ownership by the initial user. \nAdditionally, it's noted that paths could vary for additional external devices connected to the system; for instance, another SD card or a USB device could lead to different mount points."},{"question":"is there any way to view saved wifi passwords on the iphone?","response":"If you have a jailbroken iPhone, you can explore the Wifi Passwords tweak available on Cydia, which provides a direct method for accessing saved passwords on your device. \nUnfortunately, for non-jailbroken iPhones, direct access to this information is not possible. \nAlternatively, if you have a Mac connected to the same network, you can retrieve the stored password from its Keychain using the Keychain Access app. \nIt's worth noting that, as of iOS 11 (beta), there seems to be a potential method involving requesting the password from another device via Bluetooth."},{"question":"what software programming languages were used by the soviet unions space program?","response":"The third generation of Argon airborne computers employed Pascal, Fortran, and Si, with Assembler also in the mix. \nPL-1 and Fortran were utilized, along with PROL2 (\u041f\u0420\u041e\u041b2) for onboard programs, Dipol (\u0414\u0438\u043f\u043e\u043b\u044c) for earth tests, and Laks (\u041b\u0430\u043a\u0441) for modeling during the Buran program, and eventually, these were amalgamated into a new language called Drakon. \nAdditionally, APL found its place in the Soviet Union's space program."},{"question":"is there any way to safely examine the contents of a usb memory stick?","response":"If you suspect a USB drive to be harmful or containing malware, creating a \"condom\" Virtual Machine is a viable option, especially if you already have a Linux machine, which allows you to make the disk read-only. \nHowever, it's critical to recognize that no system is entirely impervious to all potential threats. \nExamining the stick's contents through a Linux Live-CD can be considered a reasonable action. \nAdditionally, inspecting a USB stick's contents on a separate Linux-based system is deemed to be relatively safe. \nIf physical tampering is a concern, opening up the drive to check for legitimacy, or using a disposable device like an old machine or a Raspberry Pi, are suggested methods. \nAlternatively, using an opto-isolated USB hub can protect your PC from electrical threats. \nFor those concerned about malware affecting the BIOS, plugging it into a machine that doesn't have a BIOS is a safer approach, with a SPARC machine being a suggested option. \nA Raspberry Pi Model A\/A+ without a network connection is also suggested due to its minimal non-volatile storage and its ability to read various filesystems on a USB stick. \nHowever, remember that exploring a USB stick is never completely risk-free, as it could potentially deploy harmful substances, exploit vulnerabilities, or induce users to run malicious files; hence, some suggest delegating the task or using a highly secure, non-auto executing and non-auto mounting operating system like OpenBSD or NetBSD. \nAs a solution to safely check the contents of suspicious USB sticks, CIRClean offers automated file transfer and scrubbing from an untrusted USB drive to a trusted one, albeit one should be aware of its current limitations."},{"question":"are java pattern thread safe?","response":"Java Pattern objects are thread-safe."},{"question":"how accurate is business logic should be in a service, not in a model?","response":"The appropriate placement of business logic depends on the use case. \nIn most generic scenarios, it is advised to adhere to business logic situated in the service layer."},{"question":"do cron jobs run when not logged in?","response":"Cron is a system service that handles executing scheduled tasks regardless of user login status, so it's not necessary to have a session running when a task is scheduled to be carried out."},{"question":"are all macs 64 bit?","response":"Depending on the version of the OS, Mac kernels can be 32-bit or 64-bit. \nMac OS X 10.6 Snow Leopard is the final version that supports 32-bit Intel Macs, while subsequent versions default to 64-bit."},{"question":"internal keyboard and trackpad stop working after plugging in usb device","response":"The intermittent problem can be attributed to a faulty cable that occasionally causes the connection to drop and reconnect. \nA temporary workaround for this issue involves unplugging and re-plugging the phone multiple times until the trackpad and keyboard respond. \nMoreover, removing or managing the Android File Transfer application on OS X has been reported to alleviate the issue for some users."},{"question":"what causes this green background in ls output?","response":"Black text with green background indicates that a directory is writable by others apart from the owning user and group, and has the sticky bit set (o+w, +t). \nBlue text on a green background indicates that a directory is writable by others apart from the owning user and group, and does not have the sticky bit set (o+w, -t)."},{"question":"can a macs model year be determined with a terminal command?","response":"Execute the command 'system_profiler SPHardwareDataType | grep \"Model Identifier\"' in Terminal. \nAlternatively, for faster results, use 'sysctl hw.model'. \nOnce you have the model ID, you can input it online to get the launch month and year for your model. \nTo get your serial number, use the following command: system_profiler SPHardwareDataType | awk '\/Serial\/ {print $4}'. \nIf you're dealing with a Mac, the correct marketing name and model year can be discerned from a plist file on El Capitan and Sierra, containing a dictionary of information for each model identifier. \nIn contrast, for a 2019 MacBook Pro, 'system_profiler SPHardwareDataType' provides accurate results, distinguishing it from the previous year's model."},{"question":"should i refactor the code that is marked as dont change?","response":"Refactoring code when there are warnings may generally not be advisable if the system is currently functioning properly. \nHowever, when there is a need to make significant changes or additions to the codebase, you should indeed refactor the code, particularly in the parts marked with warnings. \nTo proceed with confidence, establishing tests is a prerequisite to refactoring. \nRefactoring should be approached incrementally and should include only what's necessary to create and pass the test suites, especially for brittle modules. \nThere is room for improvements and fixing underlying issues in the codebase, which can be identified by warnings or comments indicating dissatisfaction with the current code or lazy problem-solving. \nWhen adding new features or fixing bugs, employ the \"boy scout principle\" of improving and refactoring exactly the parts of the codebase that are being worked on. \nIn summary, before embarking on major refactoring, it is crucial to have solid testing in place to ensure stability and confidence in the changes made."},{"question":"homebrew: rollback from python 3.7 to python 3.6.5.x?","response":"If you still have the previous Python version installed, you can easily switch using the command `brew switch python 3.6.5_1`. \nIn case you don't have the earlier version available, you can install Python 3.6.5_1 from the previous formula by using the appropriate command. \nAnother approach is to execute `brew switch python 3.x.x_x` where you replace '3.x.x_x' with the specific version you want to switch to, for example, '3.6.5_1'. \nAlternatively, if you are using the ASDF version manager, you can unlink the current version with `brew unlink python`, add the Python plugin with `asdf plugin-add python`, install Python 3.6.9 with `asdf install python 3.6.9`, and set it as the global version with `asdf global python 3.6.9`."},{"question":"im a subversion geek, why should i consider or not consider mercurial or git or any other dvcs?","response":"Merging large commits in subversion can be uncomfortable. \nIn contrast, Git, designed for distributed work, encourages individuals to work on their projects, providing a more streamlined merging experience. \nA significant advantage of Git and other DVCS is their performance, particularly when switching between branches or navigating through revisions, where they outperform SVN. \nGit, in particular, emphasizes the importance of bug detection through the git bisect feature, contributing to an easier backup process. \nWhile Subversion has its merits, it does have shortcomings, prompting the recommendation to explore alternatives to assess if they better align with your needs than what you are familiar with."},{"question":"official way to obtain an os x iso file","response":"You can obtain the OS file directly from Apple by downloading it from the Mac App Store; this is considered the official method to acquire the file if you don't already have access to a Mac computer. \nNote that this method will not work with Maverick or Yosemite. \nIf seeking an ISO file for Maverick, information can be sourced from a post on the InsanelyMac site that offers an automated bash script to create a bootable ISO."},{"question":"how do i find out which processes are preventing unmounting of a device?","response":"To identify the processes hindering the unmounting of a device, the lsof command is useful. \nAlternatively, if you are certain and wish to terminate all related processes and proceed with unmounting, you can use the following approach: fuser -Mk \/mnt\/path umount \/mnt\/path."},{"question":"how do i install r on macos using homebrew?","response":"To install R on a Mac, you can straightforwardly download the binary from the Comprehensive R Archive Network (CRAN). \nSpecifically, you can click \"download R for (Mac) OS X\" and proceed with the installation of the latest package binary. \nAdditionally, it's possible to install the R.app GUI using the command-line tool Homebrew. \nAlternatively, if you're using MacPorts, the command 'sudo port install R' will handle the installation."},{"question":"silencing your disk is almost full notification","response":"To address the persistent \"Your disk is almost full\" notifications on Sierra, you can enable the Optimize Storage feature, without selecting Store in iCloud. \nYou could also alter the GB threshold for what your computer considers \"almost full\". \nAnother approach is to disable the system daemon that triggers these notifications. \nIf you're being disturbed by notifications and want a broad solution, activating Do Not Disturb mode could be helpful, but it will suppress all notifications, not just the ones for disk space."},{"question":"cant use exclamation mark (!) in bash?","response":"To use it you need it enclosed in single quotes (e.g., 'http:\/\/example.org\/!132'), or to directly escape it with a backslash (\\) before the character (e.g., \"http:\/\/example.org\/\\!132\"). \n\nYou can use curl -v, thus: curl -v \"http:\/\/example.org\/\"'!'\"287s87asdjh2\/somepath\/someresource\" or curl -v \"http:\/\/example.org\/\"\\!\"287s87asdjh2\/somepath\/someresource\". \n\nAlternatively, use a variable, thus: E=! curl -v \"http:\/\/example.org\/${E}287s87asdjh2\/somepath\/someresource\". \n\nSince Bash 4.3, you can use double quotes to quote the history expansion character."},{"question":"what features of mavericks are beneficial to you?","response":"Some examples of beneficial features of OS X Mavericks are: move Dashboard in Mission Control; Secret Wallpapers; using the Show Desktop gesture, the motion of the windows now follows the motion of your fingers on the trackpad; preview PSD files (Photoshop Documents) directly in Safari; battery life; improved Multiple Screen support; disable App Nap on a per app basis; Apple TV makes it easy to see on your TV the media content that is on your Mac with AirPlay; driving directions for iOS; the energy consumption view that collects 8 hours of history; the battery menu in the top bar now shows apps using high amounts of energy; move Dock between monitors; new Safari setting to power off plugins when inactive to save battery life; Control \u2303 + Command \u2318 + Space opens a characters panel including Emojis; bring your home folder's library back with one checkbox; responsive scrolling in Mountain Lion; Mac App Store Notifications now include multiple \"Later\" options; iCloud Sync Automator and AppleScript Editor; enhanced Dictation; ColorSync utility; iCloud Keychain stores and syncs Secure Notes across Macs; disable Notification Center on the Lock Screen; Gatekeeper; iMessages can be created quickly in Notification Center; see all apps are using your location; full screen finder; Messages now has a color setting called auto, using Speakable Items and Automator to command your Mac by voice; Zoom pictures in QuickLook; Finder messages are now Notification Center alerts; Safari tells you when a tab crashed; LinkedIn and a few others are now supported in Internet Accounts; Mail.app supports exporting emails now as PDF files; automatically installs updates; charging state of an iPad is notified to the user; Finder Tabs Safari Style (Command + T opens a new tab); Activity Monitor tells you what pages a Safari process has open; Side dock has new UI; and Event reminders based on travel time."},{"question":"what is the difference between bash_profile and profile?","response":"\"bash_profile\" works under Bash, while \"~\/.profile\" works under Bourne and Korn Shell."},{"question":"what is the fastest way to send massive amounts of data between two computers?","response":"For straightforward situations where security is not a concern, netcat is a good tool to use for transferring data. \nAnother effective tool for fast data transfer speeds is bbcp. \nIn cases where having a backup is more important than exact hard drive copies, backupPC can significantly reduce transfer times for large volumes of data. \nWhen transferring data, using direct NFS mounts then local cp or rsync maximizes network capacity, much more so than encrypted transfers. \nIf you don't have budget constraints, implementing an Intel Xeon E5 12 core drive connector provides an effective and powerful solution. \nIf transfers faster than 1Gb are needed and 10Gb options are too expensive, NIC-teaming may offer a satisfactory lower cost solution. \nFinally, setting up systems with shared storage could be an advantageous approach, especially if data transfer between machines is a recurring task."},{"question":"how do i remove the first 300 million lines from a 700 gb txt file on a system with 1 tb disk space?","response":"To modify a file and remove initial 'n' lines, one approach uses the `dd` command in conjunction with other utilities like `truncate` without using a temporary file and there is no size limit, but it is dangerous since there is no track of progress, and any error leaves you with a broken file. \nThe `losetup` command offers an alternative to the `dd` method but presents similar dangers. \nAnother method involves compressing the file with: 'gzip file && zcat file.gz | tail -n +300000001 | gzip > newFile.gz'. \nThe `fallocate()` system call is mentioned as a viable option on specific filesystems such as ext4 or xfs. \nUsing tools like `hexpeek` or a custom program to find the 300-millionth newline, written in languages such as C, Perl, or Python offers additional strategies like so: read your big file from the end counting line-breaks, after gathering some pre-defined amount of lines that you can safely fit in free space, write this chunk as separate file and cut the big file's tail and use chunk's filename to store line numbers. \nYou will split the big file into smaller files with line numbers as names, deleting the original file, and keeping the same space usage. \n\"tail -n +300000001 < file<>; file\" is another solution in the `ksh93` shell with its truncation capabilities when using specific file redirection operators. \n`vim` can be employed for in-place editing: `vim -c \":set nobackup nowritebackup\" -c\":300000000delete\" -c \":wq\" filename`, sequences to delete large numbers of lines and save the file. \nLastly, for safety and fallback purposes, splitting the file into chunks, and then concatenating them after editing is suggested."},{"question":"why is such a large ipv4 range assigned to localhost?","response":"In FC 990, the class A network number 127 is assigned the \"loopback\" function, that is, a datagram sent by a higher level protocol to a network 127 address should loop back inside the host; at that time, nobody really gave much thought to allocating this much space to the loopback address."},{"question":"how to install desktop environments on centos 7?","response":"To install the GNOME Desktop Environment using YUM, input the command \"# yum -y groups install 'GNOME Desktop'\" directly into the terminal. \nAlternatively, you can use Systemd to set up a graphical interface by installing GNOME with the command \"$ sudo yum groupinstall 'GNOME Desktop'\" and then creating a symbolic link to set the graphical target as default with the command \"$ ln -sf \/lib\/systemd\/system\/runlevel5.target \/etc\/systemd\/system\/default.target\"."},{"question":"how to transfer data from one mac to another using wifi?","response":"If both Macs are on the same network, or have wifi enabled, you can use Airdrop, or AirPort, available in Finder on both Macs; just drag files to the other computer's picture. \n\nAlternatively, try Dropbox or DropCopy."},{"question":"runaway distnoted process","response":"In managing distnoted issues, a cron job can be set up to routinely terminate distnoted. \nYou can debug distnoted by initializing a log file which causes the CFNotificationCenter service to log all notifications. \nAlso, the distnoted process settles quickly once Emacs is closed. \nOr you could choose to kill it automatically every minute. \nAnother approach to managing distnoted includes checking for excessive CPU usage and only then terminating it. \nFinally, errors with distnoted often arise when an application misuses macOS's notification API. \nNoted culprits have been iTerm2, Emacs and iTunes."},{"question":"why are statements in many programming languages terminated by semicolons?","response":"The syntax of many programming languages is modeled after C which uses the semicolon as a statement terminator. \nAnother reason the semicolon was chosen is possibly because of its use in English \"to indicate interdependent statements\" or to separate items in a list of statements. \nIt is a method that makes it easy to parse individual program statements while still remaining close to normal English punctuation. \nALGOL introduced the semicolon to separate programming statements and it seems that every subsequent block-structured language followed ALGOL's lead and used semicolon to separate or terminate statements. \nALGOL picked a specific terminator which would allow a statement to flow over several lines and picked one that was visible and easily noticed by human readers. \nThe semicolon is easy to type, less confusing, and it adds meaning to a character with limited meaning in a less complicated manner because special cases don't really exist with its use. \nAdditionally, there was a need for an explicit statement-terminator other than a carriage-return\/new-line and semicolons are convenient because they're not commonly used in logical or mathematical statements, avoiding conflicts within code. \nDespite its origins in ALGOL 60 primarily as a statement separator, PL\/I, which was the IBM's successor to line-oriented Fortran, decided to make the semicolon a statement terminator rather than a separator, which was well-received by programmers, influencing its extensive use in modern languages."},{"question":"delete line in vi","response":"Use the \"dd\" command, which will remove the line, allowing you to paste it later with \"p\" and also accepts positional modifiers, allowing you to use \"dk\" to delete the previous line or specify a repetition like \"5dd\" to delete multiple lines. \nPress ESC to make sure you're in normal mode for the \"dd\" command to work. \nIn visual mode, you can select multiple lines with \"shift+v\" or columns using \"ctrl+v\", and then pressing \"d\" to delete. \nYou can also use \"S\" delete rather than \"dd\", which puts you in Insert mode."},{"question":"why do many exception messages not contain useful details?","response":"From a security perspective, omitting information in exception messages is seen as a safer practice to avoid potential information leakage, particularly in scenarios where the code lacks a clear understanding of what went wrong. \nAlso, people are lazy, programmers more than most, and there are scenarios where the code has no idea what went wrong. \nSome developers intentionally exclude details they don't want users to see, either for security reasons or to prevent confusion. \nThe concept of exceptions, as it stands, has not fully matured, and there is no cause for worry because the exception should not contain a human-readable message. \nAdditionally, so many in the industry were originally self-taught, and they didn't have lessons in communication. \nAgain, messages are meaningless because when created, they were to be placeholders that no one got back to. \nFurthermore, exceptions come with language and implementation-specific costs, influencing the decision on what details to include. \nIt's essential to note that the logic for understanding why something failed often lies in the calling code, leading to a lack of detailed information in exceptions."},{"question":"how to auto-hide the address bar in google chrome?","response":"To exit full-screen mode and ensure the toolbar is visible in MacOS, simply uncheck the option \"View > Always Show Toolbar in Full Screen (\u21e7\u2318F)\". \nFor achieving a full-screen view without an address bar in Chrome on OSX, use the keyboard shortcut Cmd-Shift-F. \nShould you wish to run Chrome in application mode, initiate it via Terminal by using the command \"\/Applications\/Google\\ Chrome.app\/Contents\/MacOS\/Google\\ Chrome --app=http:\/\/www.google.com\". \nHowever, it's important to note that you cannot 100% disable the address bar in any browser anymore. \nAlternatively, to get an immersive fullscreen experience in Chrome, you can navigate to \"chrome:\/\/flags,\" search for \"Immersive Fullscreen Toolbar,\" and enable this setting."},{"question":"how can i show typing keyboard in record screen","response":"One method involves using Screenflow, a software that includes this feature and is priced at $99. \nAdditionally, standalone apps like Keycastr and Mousepos\u00e9 can be used for the same purpose. \nAnother alternative is showing the on-screen keyboard, although this results in a different aesthetic."},{"question":"how do you calculate the prefix, network, subnet, and host numbers?","response":"Calculate the prefix by backing into the number of host bits required to contain 100 hosts. \n\nTo find the maximum number of hosts, look at the number of binary bits in the host number. \n\nMaximum Number of hosts = 2(32 - netmask_length) - 2, where 2 is subtracted because the all-ones and all-zeros host numbers are reserved, the all-zeros host number being the network number, and the all-ones host number is the broadcast address; using the example subnet of 128.42.0.0\/21 above, the number of hosts is given by, Maximum Number of hosts = 2(32 - 21) - 2 = 2048 - 2 = 2046."},{"question":"how do you know if someone checks your location on iphone?","response":"On the device, there is no clear indication that it is being tracked, as the GPS usage alone is not a definitive sign of tracking. \nHowever, by navigating to the General -> Privacy settings, the user can discern if a service like Find My iPhone (FMI) is actively using location services or has been used recently, based on the color of the arrow icon. \nIf desired, location sharing can also be facilitated through the installation of the Find Friends application, which openly communicates location requests to the user."},{"question":"if you ^z from a process, it gets stopped. how do you switch back in?","response":"To manage a suspended job in a shell, you can issue the command fg to bring the job into the foreground and continue its execution. \nThis command is particularly useful if you have paused a job by pressing Ctrl Z and want to resume it promptly without any additional arguments."},{"question":"how do you prevent rogue wireless access points on a network?","response":"Assuming the laptops are running Windows, you probably want to use a GPO to set to infrastructure mode only, and you must take measures at the PC level or users will simply be able to run NAT on their PC and bypass your network security measures. \n\nEnforcing IPSec is also a good idea, particularly with good key management and trusted enforcement. \n\nFrom a monitoring standpoint, you could run a tool like NetDisco to find switchports with more MAC addresses connected than you would expect, and WCS controlled APs (lightweight and normal) have the ability to detect and report when non-trusted SSIDs pop up and how many clients are connected to it (if the AP is in bridging mode, can you catch it with port security). \n\nYou can look at port security (you can run 802.1x on wired ports) and DHCP Snooping, which is a helpful way to guard against this type of issue."},{"question":"list all devices connected, lsblk for mac os x","response":"To list all disks, including unmounted ones, along with their identifiers on a Mac, you can use the command 'diskutil list' in the Terminal. \nIf you are running High Sierra 10.13.6 or newer, the system profiler can be used to view all mounted SATA devices and the UUID of each mounted disk. \nTo list all USB devices and all PCI devices connected to your Mac, commands like 'system_profiler SPUSBDataType' and 'system_profiler SPPCIDataType' respectively can be run in the Terminal app."},{"question":"what is the difference between cat and less command in linux?","response":"For simplicity, \"cat\" consists of three characters whereas \"less\" has four characters. \nAdditionally, typing \"cat\" requires only the use of your left hand."},{"question":"what is the difference between screen sharing and remote management?","response":"With the El Capitan system, you have to configure Screen Sharing under Screen Sharing first, even if Remote Management is on, and then turn Remote Management back on again."},{"question":"is there a way to rename remaining to apple juice remaining?","response":"You will need to modify line 92 of the XML version."},{"question":"how are globals any different from a database?","response":"Databases serve a different purpose than global variables. \nWhile databases are designed for storing and managing large quantities of organized data, global variables fulfill specific niches within the application. \nThe difference between them becomes apparent in their intended use cases; databases model different data than global variables, and each is suited for particular tasks. \nGlobal state in an application lacks the strong consistency guarantees provided by a database. \nMoreover, how they are employed differs, as databases are typically used for storing and searching extensive data, while global variables may serve in-process or operational functions. \nOne critical distinction concerning global variables is that they form hidden and unprotected lines of communication. \nAdditionally, using a database is much more like using explicit state than using global variables. \nDespite the potential for a database to represent a global state, it doesn't have to be all the time. \nIn a sense, the distinction between global variables and a database is similar to the distinction between private and public members of an object. \nThe globals are the private variables, and the database is the public fields. \nThe key distinction here is one of assumed responsibility."},{"question":"how can i configure mac terminal to have color ls output?","response":"You can add alias ls='ls -G' to your ~\/bash_profile to get colored ls output. \nEdit: ~\/bash_profile or ~\/profile and add the following line to simply enable color output via ls: export CLICOLOR=1. \nFor the Catalina version, you need to add export CLICOLOR=1 in ~\/zshrc. \nAnother option is to use the GNU ls which is part of the 'coreutils' program. \nYou can also customize the prompt color (and its format) by adding: PS1='\\[\\e[0;33m\\]\\h:\\W \\u\\$\\[\\e ' to ~\/bash_profile or ~\/profile file. \nOr add export PS1=\" \\[\\033[34m\\]\\u@\\h \\[\\033[33m\\]\\w\\[\\033[31m\\]\\[\\033[00m\\] $ \". \nAlternatively, use the built in Terminal --> Preferences, Settings pane to set the default skin, and edit the ANSI colors to your liking. \nIt's also easy to use Oh My Zsh for adding color and other tricks to my Terminal."},{"question":"looking for vnc client solutions that work reliably on a mac running os x 10.9.5","response":"OS X is designed to work with the VNC protocol directly out of the box, enabling you to work with VNC connections. \nAdditionally, Real VNC is available as a free iOS app. \nThe built-in VNC client in OS X works effectively in connecting to most VNC servers. \nTigerVNC is a recommended choice for use with OS X's VNC client due to its speed. \nAn alternative recommendation is that the built in Screen Sharing app which resides in System\/Library\/CoreServices can connect to most VNC servers and is slightly faster than other options such as RealVNC. \nFor connecting to remote Linux machines, Mac's native VNC client can be utilized, facilitating the setup through the \"Connect to Server\" option in Finder."},{"question":"homebrew permissions & multiple users needing to brew update","response":"To grant Homebrew permissions for multiple users, you first need to enable Homebrew permissions for more than one user by adding them to the admin group or any other user group. \nNext, ensure that the necessary permissions are granted to the Homebrew path by running the command: sudo chown -R $USER \/usr\/local in the command line."},{"question":"can hackers access ipad camera?","response":"Yes, it\u2018s possible, as any app you install can (if you allow it) access the camera."},{"question":"what are the real life implications for an apache 2 license?","response":"Your project appears to be subject to the '4 Redistribution' clause of a certain license, which mandates that the text of the Apache 2 license must be included in the project's documentation for derivative works. \nYou can modify the software as you desire for software under the Apache License Version 2.0. \nYet, it is crucial to closely examine section 4(b) of the APLv2 to understand your obligations concerning the NOTICES file and how to display its contents properly as part of your modified work."},{"question":"how can we run a command stored in a variable?","response":"The safest approach to execute a non-trivial command stored in a variable is to use eval. \nWith eval, you can write the command in the same manner as you would on the command line, and it gets executed precisely as if you had entered it directly."},{"question":"how can i make cron run a job right now, for testing\/debugging? without changing the schedule!","response":"Cron has a special purpose\u2013running schedules commands at a specific time\u2013so the best thing is to either to manually create a (temporary) crontab entry or write a script which removes and resets the environment. \nTo simulate the cron user environment, you can follow a two-step process: writing a temporary line in the crontab `* * * * * \/usr\/bin\/env > \/home\/username\/tmp\/cron-env` and then using a bash script `#!\/bin\/bash \/usr\/bin\/env -i $(cat \/home\/username\/tmp\/cron-env) \"$@\" `. \nAdditionally, you can force a crontab to run immediately by using the following command: run-parts \/etc\/cron.daily."},{"question":"what does the clock symbol mean on facebook messenger?","response":"The Clock icon signifies that the message has not yet been sent."},{"question":"why dhcp request is broadcast?","response":"The client does not have an IP address until the server sends a DHCPACK. \nA broadcast is sent to inform other DHCP servers that may have sent offers that their offer has not been accepted. \nThis ensures that any server that could have issued an offer is updated about the client's selection through the broadcasted request message."},{"question":"how to exclude a sub folder from icloud drive in macos sierra?","response":"Directories named \"tmp\" or those ending in \".tmp\" are not synchronized, as indicated by a cloud icon with a line through it. \nFurthermore, placing a single empty file named .nosync in a folder prevents it from syncing, and this method can be applied to specific files as well. . \nAutomator workflow facilitates creating these non-syncable items via the context menu in Finder. \nA list of excluded file and folder names, including any name containing \".nosync\" or \"tmp\", suggests possible workarounds for managing sync behavior. \nLastly, it's worth noting that a directory must be renamed to include \".nosync\" to prevent syncing and possible additional naming tricks like chaining the words for further functionality."},{"question":"what is the difference between iterative and incremental development?","response":"The Waterfall Model is a traditional incremental development approach that uses a set number of steps and development goes from start to finish in a linear path of progression. \nContrary to this, the Iterative Approach does not prescribe a specific number of steps; it evolves through repetitive cycles."},{"question":"how long does it take to replace a battery in a mac?","response":"The battery is easily swapped in 10 to 35 minutes."},{"question":"meltdown and spectre attacks","response":"Meltdown exploits globally present a lower barrier to implementation compared to Spectre. \nMeltdown and Spectre exploit a CPU property triggered by normal programs, making it hard to distinguish malicious programs from benign ones. \nSpectre, Meltdown, and Rowhammer are conceptual flaws in CPU design, and thus cannot be fully mitigated by software updates, which unfortunately tend to reduce system performance. \nSpectre and Meltdown's intricacies are a testament to the complex nature of the underlying vulnerabilities, and given their complexity, expect a gradual unveiling of complete technical explanations."},{"question":"what is the difference between -m conntrack --ctstate and -m state --state","response":"The state is a part of conntrack and just a simpler version of it."},{"question":"what are the differences between the security onion and kali distributions?","response":"In the realm of IT operations and cybersecurity, Kali Linux is recognized as an offensive security distribution tailored for Penetration Testing and research, while Security Onion is designed for Network Security Monitoring as a defensive tool."},{"question":"how can i grep in pdf files?","response":"To search within a PDF file via the command line, you can use string manipulation by channeling the file through strings and then employing grep. \nIf you wish to grep a PDF file, you ought to decompress it first, extracting the text before searching can be done. \nYou could try installing the pdfgrep package and using the command, \"find\/path - iname '*.pdf' -exec pdfgrep pattern {} +\", \"pdfgrep 'pattern' your.pdf\" or \"pdfgrep -r --include \"*.pdf\" -i 'pattern'\". \nIt's possible to convert the text within PDFs to stdout and grep the output by using pdftotext. \nIf your goal is to look for simple strings that aren't compressed or encoded within a PDF, you can use the following grep, \"-a STRING file.pdf cat -v file.pdf | grep STRING From grep --help: --binary-files=TYPE\", instead of strings."},{"question":"difference between control plane, data plane and management plane?","response":"The Data plane is also known as the forwarding plane and refers to all the functions and processes that forward packets\/frames from one interface to another, that is, from input to output. \n\nControl plane refers to all the functions and processes that determine which path to use, and makes decisions about where traffic is sent. \n\nManagement plane is all the functions you use to configure the control plane (CLI, SNMP, etc.) and monitor devices; covering the User\/Operator\/Tools managing the Network Infrastructure."},{"question":"are dell docking stations compatible with mac?","response":"Dell does not support mac OS for this product, and they do not guarantee that it will work with your MacBook Pro, noting that your MacBook Pro does not support MST (multi-stream transport) via the USB-C cable you plug in, which is required for this dock's \"extended mode\" to work even with just two monitors. \n\nIn addition, this product is not fully compatible with a MacBook as it doesn't communicate powerinfo with the Macbook, so doesn't supply it with enough power."},{"question":"how is mono magical?","response":"Binfmt_misc is a mechanism that instructs the kernel on how to execute unfamiliar binary files. \nIt permits the dynamic management of binary types, making possible addition, removal, enabling, and disabling of binary descriptors."},{"question":"how do you check if a port is blocked on linux?","response":"To see if the service is on and is listening to the IP address or not, you can use: netstat -tuplen | grep 25. \nTo see if there is any rule set by your firewall, use: iptables -nL | grep \/."},{"question":"what is the fedora equivalent of the debian build-essential package?","response":"The closest equivalent is likely to be installing the packages: sudo dnf install make automake gcc gcc-c++ kernel-devel. \n\nYou could use the yum-builddep package: sudo yum install yum-utils sudo yum-builddep $the_pkg_you_want_to_build. \n\nFor Fedora 23 and above try using: dnf install @development-tools."},{"question":"how do i remap a key in macos sierra, e.g., right alt to right control?","response":"Apple's Technical Note TN2450 provides information on how to remap keys. \nHowever, for a more user-friendly approach, you can use Karabiner-Elements. \nAdditionally, you can simply go to the \uf8ff Apple menu, choose \u201cSystem Preferences,\u201d and then navigate to the \u201cKeyboard\u201d preference panel."},{"question":"how do i type \u00b2 or \u00b3 on an apple keyboard (international english layout)?","response":"To type the characters \u00b2 or \u00b3 on an Apple keyboard with the International English layout, an approach is to enter the characters once and then set up substitutions in System Preferences under Language & Text. \nAnother approach is to use Ukelele to create custom keymaps easily. \nFor users on OS X 10.7, adding the desired characters to the Character Picker is a potential solution. \nIn Office programs like Word, you can use the shortcut (Command + Shift) + plus\/equals key, followed by typing the desired number. \nAdditionally, you can utilize the Character Viewer by going to Edit > Emoji & Symbols \u2303\u2318Space."},{"question":"do you need a wsdl for soap?","response":"SOAP can be used without WSDL, but such services will not be found using the discovery mechanics offered by WSDL."},{"question":"why is mercurial considered to be easier than git?","response":"Mercurial's syntax is considered more familiar, especially for those accustomed to SVN, and is well documented. \nIt focuses on interface aspects, which initially makes learning easier than Git. \nIn the defaults set by Mercurial, user-friendliness is a noticeable trait. \nAdditionally, the branching model and history editing features in Mercurial are framed as easy to follow. \nMercurial can accomplish tasks requiring multiple commands in Git with just one command. \nMercurial's simplicity extends to its lack of an index, which contrasts with Git's powerful but complex system, and it uses revision numbers instead of shas, making daily commands easier. \nUsers often find Mercurial the more approachable tool, attributing it to features such as its different branching model and basic usability. \nLearning and extending Mercurial with Python is also feasible due to its simplicity. \nCompared to Git, Mercurial is characterized by a more user-friendly culture and interfaces, such as the standardized TortoiseHg GUI, whereas Git's command-line-centric approach can deter new users. \nMercurial's relative ease becomes apparent as it lets users grasp its functionalities within minutes."},{"question":"open finder window from current terminal location?","response":"If you type 'open .' in Terminal, it will open the current directory in a Finder window. \nAlternatively, you can execute the command open `pwd` to achieve the same result."},{"question":"how to import secret gpg key (copied from one machine to another)?","response":"It is advised that it is necessary to add `--import` to the command line to import the private key and that according to the man page, the `--allow-secret-key-import flag` is an obsolete option."},{"question":"using the not equal operator for string comparison","response":"When setting conditions in a script, combining multiple exclusion conditions with ANDs rather than ORs is recommended to achieve the desired control flow logic. \nUsing a switch or case statement might offer a more structured alternative for handling different values of a given variable, such as \"PHONE_TYPE\"."},{"question":"what is the page size in linux?","response":"Most architectures, including Linux, typically support a 4kB page size as a default. \nOn some architectures, this default page size can be different, with Linux supporting values like 16kB for ARM64 or 8kB, 16kB, or 64kB for IA64. \nAdditionally, the operating system can allocate more than one page at a time if needed, and thus implement 8kB, 16kB, or 32kB."},{"question":"how can i recursively delete empty directories in my home directory?","response":"To remove directories using command-line operations, it is possible to call rmdir on each directory, as it will only delete directories that are empty."},{"question":"what is the need for `fakeroot` command in linux","response":"Fakeroot can be used for package building scripts. \nSpecifically, it allows the creation of archives such as tar files without requiring root-level access, by simulating file ownership by root. \nThis is particularly useful when the archives are deployed on different systems, preventing file ownership issues with non-existing users. \nAnother application of fakeroot is to diagnose which files a failing binary actually wants to access. \nThis helps in identifying and resolving issues related to hard coded paths and improper exception handling."},{"question":"turn off buffering in pipe","response":"To address issues with command buffering in Unix-like systems, you could employ the `unbuffer` command, part of the `expect` package, when executing long-running commands to prevent the system from using the default 4-KiB buffering, which often causes delays. \nAdditionally, it may be necessary to apply `unbuffer` to each command within a pipeline to achieve the desired interactivity. \nAlternatively, the `stdbuf` program from GNU Coreutils can be used, with the option `-i0 -o0 -e0` to turn off buffering for input, output, and error or with `-oL -eL` for line buffering, provided the application adheres to stdio buffering policies and is dynamically linked. \nFor more granular control, setting the pipe ulimit to a single 512-byte block is another approach, which greatly reduces the buffer size involved while not turning off buffering completely. \nCreative solutions can bypass issues by directly manipulating the input stream by using a combination of `echo` and `cat` commands to feed instructions to an executable shell. \nLastly, there is also the `scriptee` method, which is a workaround to the `tee` command, especially on BSD-unix systems, although, on Linux, it comes with the inconvenience that the prompt will not return until after an additional enter press."},{"question":"is xss client or server side?","response":"XSS, or Cross-Site Scripting, is a security vulnerability that can manifest on both the client and server sides depending on the entity responsible for the actual HTML construction. \nOn the client side, where the attack itself occurs, there are mitigation measures available, such as XSS-Protection. \nThe nature of XSS makes it a server-side vulnerability, often categorized as a \"client-side exploit of a server-side vulnerability\"."},{"question":"where can i find the task manager in mac os x lion?","response":"It is called the Activity Monitor on a Mac and can be found in the Applications\/Utilities folder. \nAlternatively, you can use the shortcut cmd + space to open Spotlight, then type \"Activity Monitor\" to access it quickly. \nIf you need to force quit an application, look for the apple\/Mac icon, commonly at the top left of the screen, where you'll find the \"Force Quit\" option. \nAnother method to launch the Activity Monitor is by typing its name into Spotlight, and for force quitting, use the shortcut Alt + Command (\u2318) + Esc."},{"question":"are online password generators safe?","response":"No, It is not safe to generate passwords online."},{"question":"how many points are required to draw a rectangle?","response":"To draw a rectangle, you need two points. \nIn two dimensions, storing a rectangle as two points is clearer, but a rectangle should be defined as three points to be well-defined in three dimensions."},{"question":"list files sorted numerically","response":"When working with Bash, braces {} can be used to generate a sequence of items in an order, as demonstrated by using 'for file in log{1..164}.gz; do process \"$file\" done' to process multiple files sequentially. \nAn alternative approach for ordering files is to use the built-in GNU ls feature with the -v option, which naturally sorts numbers within the text with 'ls -1v log*'. \nHowever, for situations where the input does not come from ls, one can utilize 'ls -1 | sort -n -k1.4', where the -n option applies numeric sorting, and -k 1.4 designates the sort key as starting from the fourth character of the filename. \nUsers of Mac or BSD systems have the option to use 'ls -1 *.jpg | sort -n'."},{"question":"how do i find how long ago a linux system was installed?","response":"To check the creation date of the root filesystem, one can utilize the \"dumpe2fs\" command on systems where this is applicable. \nFor Red Hat-based distributions such as CentOS, Scientific or Oracle, the command \"rpm -qi basesystem\" can be used to reveal the installation date of the base system, which is typically the system installation date."},{"question":"which hashing algorithm is best for uniqueness and speed?","response":"In Java, the hashing algorithm for a String object is a simple multiply-and-add process. \nGoogle's CityHash is recommended for unique hash generation, though it is not suitable for cryptographic purposes. \nCityHash excels on 64-bit processors but may perform poorly on 32-bit systems where Murmur may be a better option. \nAmong non-cryptographic hash functions, Murmur3, Cityhash, and Spooky are comparable, with SpookyHash usually slightly ahead. \nIn comparison, SipHash offers fast and secure hashing, which is resistant to hash-based denial of service attacks and can be used as a MAC."},{"question":"why doesnt mac os x source ~\/.bashrc?","response":"Bash only reads the .bashrc file for non-login shells by default; since Terminal launches bash as a login shell (which can be seen in the output of the \"w\" command), it doesn't automatically read the .bashrc file."},{"question":"what are the best practices for battery longevity?","response":"In order to optimize battery life, it is recommended to keep the battery plugged in as close to 100% of the time as possible. \nSome users frequently allow their batteries to drain. \nStoring the battery at a 50% charge level while conducting a full charge and discharge cycle monthly is ideal for longevity. \nAlso, maintaining the battery at cool temperatures between 40 and 60 degrees Fahrenheit will contribute to longer battery life. \nHowever, Apple advises against keeping a portable device plugged in constantly. \nAs a best practice, using the laptop unplugged at least once daily is recommended, and maintaining the battery charge between 40%-80% can be beneficial."},{"question":"my dad is impatient with the pace of my learning to program. what do i do?","response":"There are several ways to approach this problem, starting with communication. \nWalk your dad through your code, share your learning journey to convey how much work you have put into it, and how much you understand, and thank him for being so engaged\u2013maybe he will come away with a more positive impression of how much you have actually accomplished. \nYou can also educate him in this process, explaining the challenges of programming through metaphors that may help bridge the generation gap in understanding. \nIt also might be beneficial to get your father to help you to help him realize how tough it is to code). \nIf you can get him to listen, try to break down all the things that you had to learn to write your little program\u2013chances are he doesn't understand how it all works. \nAnd remember to tell him whenever you learn something or make headway. \nSharing Peter Norvig's post (Norvig is head of R&D at Google and teaches at Stanford, specifically Artificial Intelligence might help. \nOn a coding level, you should hack, build and tinker\u2013doing your own projects because they are fun\u2013and pick a language, (a simple one like Java )or paradigm and stick with it (the Head First books might help). \nYou could also put the more formal stuff away for now, and have a look at Scratch. \nFinding an introductory programming book for novices could provide a structured learning path, focusing on fundamentals and breaking down the complexities of coding. \nRemember that anything worth learning is worth learning well. \nSome advice is to simply not worry so much, to keep at it, and to do whatever you want because it's your life, (\"you shouldn't let anybody control your life\") and advise you to keep doing what you enjoy and what you have fun doing (and ignore your dad in this context). \nAlso, do not get discouraged by any disappointment your dad may express. \nAs for feeling criticized, some say that you should accept that what you accomplished until now is not enough and try to do better, while others put a more positive spin on it by noting that one of the sharpest tools in your toolbox is going to be the ability to remain open, work productively amidst criticism, and not dismiss advice based on the source. \nSome advice encourages holding your ground with your father, by not letting him ruin it for you. \nSome say to probe him about when he started out or ask him if he drew skyscrapers with detailed plumbing plans, calculated the forces and stress on material a month after starting. \nOne poster recommends bringing in someone external in the situation to better evaluate your progress and bring your father down to earth. \nOthers assume that your father is on your side, and so showing him all the answers that posted here will help him understand better and he will support you."},{"question":"whats a good ssh tunneling client for os x?","response":"SSHTunnel, a free application for managing SSH tunnels, is still going and is stable despite not being updated for a while. \nIt does, however, enjoy support, is currently available in the Mac App Store and works on Lion. \nMeanwhile, Coccinellida also works on Lion but has some bugs, while Meerkat is also worth looking at. \nFor a front-end application to \"ssh\" on Lion, iSSH is used, providing an easy way to start an SSH connection. \nMeanwhile, Secure Pipes is free option you might want to consider. \nAn SSH Tunnel via OSX's built-in Terminal is another approach, which involves setting up an SSH tunnel through the Terminal and configuring a web browser to route traffic through it. \nAlso, Core Tunnel, supported by Codinn, offers a user-friendly tunnel management system, compatible with various protocols. \nSshuttle is highly recommended for being a handy solution, while BitBar, a secure, open-source solution, provides a way to install an SSH tunneling script after initial configuration. \nYou could also establish a tunnel through the terminal using the command line: $ ssh -N -L SOURCE-PORT:127.0.0.1:DESTINATION-PORT USER@SERVER-IP."},{"question":"what is the single most effective thing you did to improve your programming skills?","response":"A person once realized that their typing speed was not keeping up with their rate of thought and dedicated a week to enhancing their typing abilities, which significantly improved their programming experience. \nIt is also suggested to read \"Code Complete\" by Steve McConnell, which presumably offers insights related to programming."},{"question":"what is a tainted kernel in linux?","response":"A kernel becomes tainted when it enters a condition that is not supported by the community, often leading to disabled debugging functions and ignored bug reports related to that kernel. \nLoading a non-GPL-compatible module or unsigned module will trigger a taint flag in the kernel, which can be checked through kernel logs or specific runtime queries."},{"question":"how to explain heartbleed without technical terms?","response":"The fatal flaw, known as Heartbleed, exists in the OpenSSL library, which failed to verify that the Heartbeat payload size matched the actual length of the payload. \nAn example of data leakage from a vulnerable server demonstrates a serious issue whereby memory contents could be exposed to attackers. \nAttackers can exploit this by claiming to send a data packet of size \"x\" while actually sending a much smaller packet, resulting in the server sending back additional data outside of the intended payload, often containing sensitive information. \nFor example, a bank system update allowed users to send a request to reset multiple debit cards; however, when a user sent a request for only one card, the system returned existing codes for 65,534 other cards belonging to random users. \nIf an attacker sends a manipulated message with a falsely claimed size like \"HEARTBEAT, 1000 letters, CHEESE\", OpenSSL would erroneously transmit back more data than it should, potentially including confidential information. \nThe Heartbleed bug allows for random access to protected information, similar to flipping through the pages of a personal diary without the owner's knowledge. \nDepending on how the \"What did I just tell you?\" is used in communication between computers, a web server with the bug can unintentionally reveal much more information than intended, risking the exposure of user passwords and sensitive data."},{"question":"how to suspend and resume processes","response":"To suspend or resume a process on your system, you should utilize the kill command."},{"question":"how to copy files from windows to bluestacks?","response":"For users of BlueStacks App Player for Windows version 0.9.0.4049 and later, there is a specific shared folder path for the exchange of files between BlueStacks and Windows known as \/sdcard\/windows\/BstSharedFolder. \nTo access this folder you might need to install a file explorer, such as ES File Explorer first. \nOn a Windows 10 device, the location is, C:\/BlueStacks\/Engine\/UserData\/SharedFolder or C:\/ProgramData\/BlueStacks\/Engine\/UserData\/SharedFolder or C:\/BlueStacksData\/Bluestacks\/UserData\/SharedFolder.\nTo actually make the transfer, put all the files you want to transfer in one folder and in Bluestacks open \"Bluestacks Settings\", click \"Import Windows Files\" and then \"Proceed\". \nThe via a dialog you will be able to select the files you want to transfer. \nOnce all files have been selected, click \"Open\" and the files will be copied over. \nAdditionally, Root Explorer, an application that can be installed within BlueStacks, offers a straightforward process for transferring files to Windows by navigating through the app's storage settings to the desired file location and sending the files over. \nSimply Open --> Storage --> SDcard --> [File Location] --> \"Hold Click\" --> Send --> To Windows."},{"question":"reattach terminal tab to another window","response":"To reattach a terminal tab to another window, first, in the window where you want to move the tab, go to View, and then to Show Tab Bar. \nIf you encounter issues with the tab bar, consider disabling the \"Hide tab bar when there is only one tab\" in Preferences under Appearance. \nAlternatively, go to Preferences, uncheck the \"Hide tab bar when there is only one tab,\" set the Tab position to the Bottom, and use your hotkey to show the Hotkey Window. \nThen, click and drag the tab into the Hotkey Window's tab bar. \nAlso, you can hold down the Command + Shift + Option while dragging the body of the terminal. \nLastly, to complete the reattachment, click and drag the tab from one window onto the tab bar of the other window."},{"question":"what is the difference between upstream and downstream in open source software development?","response":"Upstream developers are involved at the beginning in the creation of software, commonly referred to as being \"up the well\". \nDownstream, on the other hand, is akin to flowing \"downwards to the ocean\", where developers utilize the completed software to build further applications and tools. \nThose who are upstream are engaged in developing the products that will be eventually released."},{"question":"what does svn do better than git?","response":"Subversion (SVN), with TortoiseSVN on Windows, is considered to be more intuitive and user-friendly, particularly for those who are not developers. \nSVN is also quicker than Git in handling certain tasks, like booting up and repository cloning. \nSVN appeals to some due to its straightforwardness, with a simpler learning curve, and it's perceived to handle binary files more effectively. \nIts maturity, in terms of the server and tools, especially when it comes to using TortoiseSVN on Windows, is noted as a significant advantage. \nFurthermore, various SVN tools are well-integrated, allowing for interactions with other systems such as bug tracking, highlighting their maturity and everyday utility. \nSVN's nature of being akin to an image of a filesystem where things can be checked out from any level is a useful feature, particularly when dealing with various configuration files across numerous servers. \nRepositories in SVN can also be simpler to set up and might be more appropriate than Git for smaller projects for which Git's capabilities to be excessive, despite trying to make branching\/merging easy. \nSVN's support for checking out only sub-trees instead of the entire repository distinguishes it from Git, which might be more convenient for projects with modular code. \nAlso, while Subversion can support and track empty directories, Git tracks file contents, so a directory without any file won't show up. \nFurthermore, SVN is seen as offering better handling of binary files and a simpler approach to committing changes. \nSVN also provide better Windows support and can check out\/clone a sub-tree. \nSVN also supports exclusive access control SVN lock which is useful for hard-to-merge files. \nSVN is perceived to lend itself to top-down managerial control better, aligning with more centralized organizational structures. \nIn terms of manageability, SVN is considered more accessible for managers and administrators due to features like access control lists, authentication methods, and third-party web front-ends that surpass those available for Git. \nSVN *-hooks are easier to implement and support, and it has much more straightforward to use third-party usable web-front ends than Git. \nAdditionally, SVN's permissions model allows different levels of access for different developers, giving it an edge in terms of flexibility and robustness. \nThe preference for SVN in certain organizational cultures is also acknowledged, where centralized management and multidisciplinary teams benefit from its structure. \nSVN's centralized style suits particular organizational and collaborative team dynamics, reinforcing its status as a culturally compatible system. \nSVN's sense of security during commits, straightforward command set for everyday use, and revision numbering system are all recognized as conducive to a central repository workflow. \nThe reliable and secure aspect of SVN's commit process, along with the easy acquisition of routine commands, bolsters its suitability for centralized project management."},{"question":"are commas allowed in filenames?","response":"While it's possible to use special characters like commas in file names, it's generally discouraged because such characters might come with special meanings or implications that could complicate file operations. \nThe issue doesn't lie in using special characters per se, but rather in the management and handling of these characters within the system."},{"question":"what is the difference between an api and an sdk?","response":"\"SDK\" is collective in a larger sense than API, as All SDKs are APIs but not all APIs are SDKs. \nIn other words, an SDK appears to be a complete set of APIs."},{"question":"are 9 to 5 programmers looked down upon?","response":"There is a significant portion that looks down on fellow programmers who limit their coding to standard working hours rather than engaging in additional programming activities outside of work."},{"question":"what are the downsides of openvpn?","response":"One of the downsides is that in a corporate environment some managers don't like to rely on open source software. \nIn addition, it's not interoperable between routers with the vast majority of products from \"big name\" network vendors. \nOpenVPN also does not have certain regulatory certifications, like FIPS 140-2 support."},{"question":"passing named arguments to shell scripts","response":"The syntax closest to the example provided is `p_out='\/some\/path' arg_1='5' my_script`. \nIf you're comfortable with using single-letter arguments, you can utilize `my_script -p '\/some\/path' -a5` with the built-in getopts in bash. \nHowever, with zsh, you would use zparseopts instead."},{"question":"^x^y unix trick for all instances in last command?","response":"The !!:gs\/search\/replace\/ notation can be used to carry out global search and replace tasks within the command line."},{"question":"why is the coreaudiod daemon using 5% or more cpu?","response":"An update in the future is expected to address a known issue with high CPU usage related to audio processing on computers. \nA suggested solution in the meantime for users includes creating the folder Library\/Preferences\/Audio, which has been effective for some. \nAnother possible cause of the problem could be audio plugins that run under core audio configurations. \nQuitting certain applications like Boom.app, which are known to affect the audio stream, might also resolve high CPU usage issues. \nFurthermore, disabling ambient noise reduction software, which continues to operate even when the microphone isn't in use, can significantly reduce CPU strain. \nIn addition, users have reported that disabling the \"Google Voice Search Hotword (Beta)\" extension in Google Chrome on OS X helps reduce unnecessary CPU usage. \nThe issue is that Google Chrome browser continuously uses the microphone to listen for the hotword 'OK Google'; to resolve this open Google Chrome, go to Settings, then Search and then disable 'Enable \"OK Google\"'. \nAdditionally, certain applications appear to be triggering this problem when interacting with the microphone and can be remedied by closing or restarting those applications. \nCertain browser tabs, such as one running WhatsApp in Google Chrome, may keep the system awake and cause coreaudiod to run persistently. \nLastly, high CPU usage can occur when running clones of the iOS Simulator with idle apps; closing the Simulator should return CPU usage to normal."},{"question":"what is the difference between process and job?","response":"A process refers to any running program that operates within its own address space. \nWhen we talk about a job in the context of a shell, it implies any program that is started interactively and continues running in the background or foreground, which is not detached like a daemon would be."},{"question":"how can waiting 24 hours to change the password again be secure?","response":"If an attacker gets access to the webinterface to change your password and to your mails via POP3, they can reset your password again and again, so even if you regain access with the reset function, and validate yourself with your mailbox access on your smartphone or via SMS to your smartphone, the attacker (who still has access to your mailbox via POP3) can keep resetting your password; but this attack vector is easily preventable, if password changes are possible only every 24 hours."},{"question":"macos sierra doesn\u2019t seem to remember ssh keys between reboots","response":"One method to tackle SSH key issues on startup is to implement the ssh-add -A command every time your system boots. \nTo do this, just add .plist file with the following content to the path ~\/Library\/LaunchAgents\/ or create one with Lingon app: Label<\/key> ssh-add-a<\/string> ProgramArguments<\/key> ssh-add<\/string> -A<\/string> <\/array> RunAtLoad<\/key> <\/dict> <\/plist> . \nAnother way is to prevent SSH key hassles is to amend the ~\/.ssh\/config file to include the UseKeyChain option for all hosts. \nHowever, to ensure keys are retained in the ssh-agent even after a system reboot, simply amending the UseKeyChain will not suffice. \nSince MacOS 10.12.2, you should add the following lines to your ~\/.ssh\/config file: Host * UseKeychain yes AddKeysToAgent yes, then reboot your machine."},{"question":"what is an integration test exactly?","response":"An integration test is perceived as a feature test where all components of the system are real, including a real repository, database and user interface. \nThis type of test is an acceptance test and confirms that the system as a whole is operating correctly. \nIntegration tests demonstrate that the major parts of a system work well together, and can involve a component or components in your system in conversation with another \"external\" system. \nThey check the connection and correctness of data flow between two of more modules, typically requiring interaction with out-of-process elements like databases or external APIs. \nLastly, integration tests verify that components of a complex system, such as software, aircraft, or power plants, are working together as designed."},{"question":"is there an excuse for short variable names?","response":"One suggestion is that variables with short lifetimes should be given short names, with loop counters often being single letters like 'i', 'j', or 'k', and local variables typically being brief but descriptive names. \nIt appears that these variable names are based on the abbreviations you'd expect to find in a physics textbook working various optics problems, which can make the code clearer and more relatable to experts in that field. \nIf the original programmer finds short names easier to work with, this practice is justified. \nHowever, caution is advised when renaming variables in legacy code: \"if it's not broken, don't fix it\" as it's better not to risk introducing new bugs through unnecessary changes. \nTerse variable names are often justifiable for certain variables which are well-known in the problem domain, such as game development or other specific problem domains where extensive descriptions are redundant. \nThe general rule is that you can use short variable names in cases where you know that people who are \"skilled in the art\" of your particular code will immediately understand the reference of that variable name. \nIn fact, there absolutely can be times when a short variable name is all that is necessary."},{"question":"how can i get the size of a file in a bash script?","response":"Use the command `ls -l filename` to access information about a file, including its file size, permissions, and owner. \nFor a more human-readable format indicating disk usage, `du -h filename` is preferred. \nOn GNU systems, to get precise file size in bytes, the command `stat --printf=\"%s\" file.any` can be used as per the manual's indication. \nIn Unix systems, a POSIX-compliant approach to find the file size in kilobytes is to combine `du -k` with `cut -f1`. \nAlternatively, the `wc -c \"$filename\" | awk '{print $1}'` command is also viable, especially when input is redirected to avoid filename display issues. \nThis method for byte count can also be achieved with `wc -c < \"$file\"` and assigned to a variable. \nMost Linux distributions now ship with a blockdev command that can make use of it: blockdev --getsize64 -- \"$device_file\", for instance (still on Linux): lsblk -bdno size -- \"$device_file\" Should work except for empty devices."},{"question":"defence methods against tailgating","response":"This is not a problem that has a social solution, you have to protect yourself by having a physical gate with a badge readers, and politely challenging people who are trying to get in without using the controls, by asking to see their pass or offering to escort them to reception\/security, and if they resist, monitoring them and quietly informing security. \n\nWithout a physical gate, you put up scary \u201cno tailgating - everyone must badge in at this door\" signs, but also rule-compliant people to enforce the rule on their peers or strangers, so can request all employees challenge tailgaters. \n\nWhere it really matters, have controls posts and ID verification, and station a security person at every entrance whose entire job is to challenge people; also, make sure there are obvious cameras in the vicinity, including to do spot checks on the guards, and \"secret drills\" where someone tries to get in without a badge. \n\nReceptionists should vet everyone who comes into the building notifying them that they must sign in before entering the building and ask them about the details about why they are there, while keeping records of entrances\/exits, perhaps including a people counter. \n\nIf someone is tailgating you, use the 'U-turn and wait' method to see if the person behind has credentials to get through a locked door. \n\nIf you use airlock style doors, where someone has to pass through two doors, but cannot be followed through the first door, you will stop tailgating."},{"question":"what is the difference between two step verification and two factor authentication?","response":"Simply put, every two-factor authentication is a two-step authentication, but not the other way around. \nHowever, from an information-theory point of view, there isn't any difference between them. \nIt is argued by some that two-step is just a layperson-friendly name for two-factor authentication. \nHowever, in more technical terms, the difference is addition versus multiplication. \nTwo-step is an additive process in which you authenticate once with one independent credential, and then again with another independent credential. \nTwo-factor is multiplicative, in that you combining one independent credential with another to derive a stronger single credential than each independent one. \nFurthermore, two-factor authentication must involve two different types of authentication categories, while two-step involves two types from the same category, like two passwords, two physical keys, two forms of bio-metric identification."},{"question":"how to see full log from systemctl status service?","response":"To see the full log from systemctl status for a service, you can utilize the journalctl command in various ways. \nFor a comprehensive log, use the following command: journalctl -u service-name.service. \nAnother option to include the complete output of the status listing without truncation is by adding the -l flag to the systemctl command: systemctl -l status service-name. \nIf you want to redirect the log messages to a file, you can use the command: journalctl -u service-name.service > file_name.txt. \nAdditionally, it is convenient and easy to use the following bash command: journalctl -xefu service-name.service or journalctl -xefu service-name."},{"question":"what is `^m` and how do i get rid of it?","response":"The ^M symbol represents a carriage-return character often encountered when dealing with files from the DOS\/Windows environment, which uses a different end-of-line marking than Unix systems. \nTo get rid of them, use this command in open your file with vim -b FILE_PATH and save it to: `:s\/^M$\/\/` (you can press Ctrl+V Ctrl+M to insert the ^M."},{"question":"what is wrong with magic strings?","response":"Magic strings are challenging to monitor because their purposes are often unclear and they typically lack any form of reuse, making maintenance difficult due to the necessity of altering multiple files across various projects. \nAdditionally, in compiled languages, a magic string's correctness isn't guaranteed during compilation; only at runtime is it confirmed whether the string adheres to a required pattern, increasing the risk of errors, like typos, which can turn into serious bugs."},{"question":"how could i make the results of a yes\/no vote inaccessible unless its unanimous in the affirmative, without a trusted third party?","response":"This is basically an AND relationship between the inputs and could be implemented in several ways, applying the principle of idempotency: you want a system that only produces a result (binary 1) if all the inputs are active, that is, if everybody votes yes to leave the cult, the result is leave, otherwise the system must not return any kind of information (binary 0). \n\nIt could be easily done with switches in series with a light, to be pressed (or not) secretly, at the same time, perhaps with hands covered by cardboard boxes, with the result that the light only comes on if everyone presses. \n\nVariations on the switch method are to use layers of encryption, such as in the dining cryptographers problem, where each family member has a key to only one of the layers, or a chemical solution using a pH indicator, that will change color to indicate no if any voter chooses the liquid with the stay pH, rather than water (pH 7)."},{"question":"what is the difference between https:\/\/google.com and https:\/\/encrypted.google.com?","response":"The handling of referrer information for ad clicks differs between Google's services. \nIn July 2013, Google's two sites preferred different key exchange algorithms, with vanilla google.com using ECDHE_RSA and encrypted.google.com using ECDHE_ECDSA, both providing forward secrecy. \nOn January 16, 2017, the notable difference between Google's services was the absence of the Google Apps icon on the top right on encrypted.google.com, with both sites having comparable load balancing and using the same certificate. \nGoogle stated in 2010 that encrypted searches through a named subdomain allowed organizations to filter and block encrypted searches they couldn't inspect."},{"question":"time difference between developing with unit tests vs no tests","response":"The later you test, the more it costs to write tests because the longer a bug lives, the more expensive it is to fix; be sure to focus on where the gain is, and consider a suite of tests. \nFor one some software engineer, writing tests means they get the work done 25% faster because unit tests they are the most efficient way to catch and isolate bugs and to gain confidence that the code is good, which aligns with the findings of a case study in The Art of Unit Testing. \nUnit tests also increase business value. \nA study has shown that Test-Driven Development (TDD) can increase development time by 15%\u201335% while significantly reducing pre-release defects by 40%\u201390%, although these figures could change as teams gain more experience with TDD. \nTDD encourages writing less code and, hence, fewer potential errors while also eliminating unnecessary features that would otherwise be included. \nWith experience, the extra time needed to write tests that some software engineers need upfront can be about 25%, and unit tests are best when built into the development process from the beginning. \nIt's advised to focus on testing critical and complex parts of an application for greater efficacy. \nSome believe that automated tests, especially system tests, are beneficial over the lifespan of a project and can alleviate the issue of recurring retesting when new functionality is added or when refactoring."},{"question":"how to count the number of a specific character in each line?","response":"To count characters, you have multiple tools at your disposal: using the `tr` and `wc` commands allows you to count a specific character within a given input. \nAlternatively, a combination of `sed` and `awk` can be employed to achieve the same result, where `sed` is utilized to delete unwanted characters and `awk` counts the remaining ones. \nSolely `awk` can also serve as a powerful tool for this purpose, either by configuring it to use the character of interest as a field separator and then counting the resulting fields, or by using the `gsub` function to count occurrences directly."},{"question":"are my permissions for \/usr\/local\/ correct?","response":"It's generally recommended to maintain strict permissions on computer systems, particularly in areas like \/usr\/local where important files are stored. \nFor those utilizing Homebrew on a Mac, it is suggested that the write permission is granted to a specific group to facilitate file sharing between authorized users. \nAccording to Homebrew 1.0.0, it no longer requires control over \/usr\/local, and one can reset the ownership to the system defaults if desired. \nFurthermore, for macOS High Sierra and later versions, the process to change ownership of \/usr\/local has been updated to adhere to the system's security restrictions."},{"question":"how can i see who is connected to my hotspot?","response":"Unfortunately, no GUI exists in iOS for finding details about connected devices to the wireless hotspot (i.e., tethered devices), although you can use a network scanner app like Net Analyzer running on your iPhone, you can see who\u2019s connected. \n\nSome suggest that you can go to Settings, tap on the name of your Hot spot and you'll see the names of the devices connected you can then click on the names of the connected devices to remove them once you log into your iCloud account. \n\nIt has also been claimed that you can go to Settings\/Cellular\/go down to the CELLULAR DATA section and click Personal Hotspot that has a Data amount next to it, and you will see a list of each device and the amount of data they have used on the hotspot."},{"question":"what does synchronize all accounts mean in mac mail?","response":"While Get Mail will only fetch new mail in the Inbox, synchronize will look for changes in the IMAP configuration, look for changes in the folder structure of your account, and probably a lot more. \n\nIf you make changes on one Mac, you can use Synchronize to make a second Mac aware of the changes. \n\nSynchronize basically double counts and double checks each and every message to make sure things are 100% correct, so resolving noise\/errors\/lost messages, incorrect statuses, and other real life bumps and errors."},{"question":"how to check what apps are running in android 6.0?","response":"The \"Running Services\" menu, where you can control various device settings, is located in the Developer options section of your device's settings. \nTo manage and stop apps that have been actively running in the last three hours, you should navigate through Settings to the Memory section and then select \"Memory used by apps\"."},{"question":"when will my device get the android 4.0 update (ice cream sandwich)?","response":"A list of all known and rumored dates for devices' updates has been provided by the Community Wiki. \nFor instance, the Google Nexus One will never receive an official update, with an unofficial release being available in October 2011. \nThe GSM versions of the Google Nexus S for T-Mobile (GT -I9020) and AT&T (GT -I9020A) are rumored to be updated soon. \nThe HTC Amaze 4G has official updates confirmed for May to June, with an unconfirmed date of June 16th, 2012."},{"question":"enable install via usb without creating mi account","response":"To bypass the MI account requirement for USB installation on Xiaomi devices, you can navigate to 'Settings > Additional Settings > Privacy' and check the 'Unknown Sources' option, and also go to 'Settings > Additional Settings > Developer Options to turn on 'USB Debugging'. \nAdditionally, if you prefer not to have an MI account connected to your device, you can create a temporary account, enable the 'Install via USB' option, and then log out from the MI account. \nHowever, if your Xiaomi phone is running MIUI 8 or above, 'Install via USB' will not work unless you connect to a Chinese server, such as using a VPN service to connect to a Shanghai server, before enabling the option within developer settings."},{"question":"what is wa in top?","response":"In top, \"wa\" stands for \"time spent waiting on I\/O peripherals\", for example a disk."},{"question":"what tool exists to identify the rgb value of a pixel?","response":"To identify the RGB value of a pixel, one commonly used tool is DigitalColor Meter, located in Utilities. \nThis built-in app, \/Applications\/Utilities\/DigitalColor Meter, provides a convenient way to determine the RGB values of a pixel. \nAnother option is SpotColor, which has been renamed to Hues, offering additional features for color identification, along with HexPicker. \nIt's worth noting that using macOS' Digital Color Meter requires careful consideration of its default settings, as they might not yield the values you expect."},{"question":"delete the last character of a string using string manipulation in shell script","response":"One user advises that this can easily be done using this regular expression: `n=2 echo \"lkj\" | sed \"s\/\\(.*\\).\\{$n\\}\/\\1\/\"`. \nTo trim a single character by parameter expansion and for something that is the most portable and shortest answer: `${t%?} `which works in bash, sh, ash, dash, busybox\/ash, zsh, ksh, by using old-school shell parameter expansion. \nWith bash 4.2 and above: `${var::-1}`. \nYou can also use head to print out all but the last character (`$ s='i am a string' $ news=$(echo -n $s | head -c -1) $ echo $news i am a strin`), but some versions of head, in particular with OSX, do not include the leading - option."},{"question":"should package names be singular or plural?","response":"The convention for naming packages can vary based on language and context. \nIn .NET, specifically in C#, it is recommended to use the plural form for package names. \nAdditionally, it is recommended to use the plural form for packages with homogeneous contents and the singular form for those with heterogeneous contents."},{"question":"how do i run a .sh or .command file in terminal","response":"To do so, open up Terminal and type in: 'sh \/path\/to\/file' then press enter. \nAn even faster way to do this would be to type sh and a space and then drag the file to the window and release the icon anywhere on the window. \nAlternatively, if you wish to run a script directly from Finder, change the file's extension to .command\u2014for example, naming it script.command\u2014then double-click it. \nThis action will open Terminal and execute the script, provided you have set the right permissions to allow execution."},{"question":"is winmail dat a virus?","response":"It's possible that the winmail.dat file is malware due to it containing theming."},{"question":"whats the quickest way to get a graphic on the clipboard saved to disk?","response":"One method to get an image from the clipboard into a file format is using the File | New From Clipboard menu of the \/Application\/Preview.app. \nAlternatively, you can create a new file in Preview.app with the shortcut command+n, which will automatically generate the appropriate canvas and paste it into the clipboard image. \nIf you prefer not to use Preview, you can use Finder to access the Edit menu and Show Clipboard option, followed by Cmd+Shift+4 to capture the desired part of the clipboard, which will save as a PNG on the desktop. \nFor those who prefer command line tools, pngpaste is a utility that allows pasting PNG images directly into files; it can be installed via Brew and used by typing pngpaste followed by the desired filename. \nFrom the terminal, you can also use osascript to get an image from the clipboard, with functions available for obtaining the clipboard contents and decoding hex digits into binary. \nAdditionally, a script can be saved to \/Library\/Scripts that allow execution from the Scripts menulet in the menubar, saving captured graphics directly to a new page in a PDF document."},{"question":"is it a bad practice to store large files (10 mb) in a database?","response":"It can lead to database file bloat and various performance challenges, especially when performing operations like SELECT * that involve rows with large blobs, even when the blob data is not needed. \nBackups may also take longer in such scenarios. \nAdditionally, the performance impact on the database includes slower SELECT operations with BLOB columns, as they always involve disk access compared to cases without BLOBs, where data retrieval from RAM is possible. \nReplication processes can become slow, and replication delays may increase due to the need to push BLOB data to slaves. \nAn alternative approach is serving files from the filesystem, allowing the webserver to use efficient kernel code like sendfile() on BSD or Linux to directly copy files to the socket. \nHowever, deeming the storage of files in the database as \"bad\" requires a deeper understanding of specific circumstances and requirements. \nQuestions to consider include whether the size and number of files will always be small if there are plans to use cloud storage, and the intended use of the files (e.g., serving them on a website or in a binary executable like a Windows application). \nWhile potential problems exist, their impact may vary based on factors such as user volume, making it less problematic for a smaller user base but potentially challenging for a large number of users."},{"question":"why are ethernet standards written in the form of 10\/100\/1000? why not just 1000?","response":"They include this because not all ports are able to run at multiple speeds or certain speeds. \nA single UTP wire can do 10, 100, or 1000 million bits per second, hence the wires and interfaces are labeled 10\/100\/1000."},{"question":"limit memory usage for a single linux process","response":"To manage process resource allocation on Linux, one can utilize control groups to limit memory usage. \nSpecifically, by creating a control group with a command like 'cgcreate -g memory:myGroup echo 500M > \/sys\/fs\/cgroup\/memory\/myGroup\/memory.limit_in_bytes echo 5G > \/sys\/fs\/cgroup\/memory\/myGroup\/memory.memsw.limit_in_bytes', the process's memory usage can be effectively capped. \nTo merely limit the memory without affecting swap space, one can remove the 'memory.memsw.limit_in_bytes' line, which pertains to swap memory."},{"question":"ssh-add is not persistent between reboots","response":"To manage SSH identities on a Mac, particularly in Sierra, one efficient method is to use the \"UseKeychain\" option, although its security has not been thoroughly vetted. \nFor MacOS Catalina version 10.15.2, it's advised to ensure your SSH key has a passphrase, which the keychain requires."},{"question":"are itunes and icloud the same?","response":"An iCloud account, iTunes account, and Apple ID are essentially the same thing and can be used interchangeably. \nThey are all linked by a single ID, unless you specifically separate them."},{"question":"why is using a shell loop to process text considered bad practice?","response":"One user indicates that performing text manipulation directly in the shell is considered to be inefficient and slow due to the shell's focus on file and file name management rather than file content. \nMoreover, another user offers that this inefficiency is especially noticeable when processing large files in a shell loop, which can turn into a time-consuming task as even milliseconds per line can add up when dealing with thousands or millions of lines."},{"question":"can an app window be minimized by clicking its dock icon?","response":"Right-click the icon and select \"Hide,\" or use key combinations like Command H to bring the window to the front. \nMinimizing can be achieved by double-clicking the title bar or using the Command M keyboard shortcut. \nThere is no direct method to minimize windows by clicking on the Dock, but you can configure settings in the System Preferences to enable window minimization by double-clicking the window's title bar. \nIn OS X, applications and windows are treated separately, allowing for window-specific actions like minimization using the yellow ball but not application minimization. \nTo hide an application, you can click and hold the icon in the Dock and select hide or alt-click the icon in the Dock. \nBe aware that hiding an application via ALT-click or CMD-H will conceal all its windows. \nTo see an application's open windows, right-click the app in the Dock. \nIf you're looking for functionality similar to Windows, third-party tools like HyperDock might offer some solutions."},{"question":"what is the difference between a default vlan and a native vlan?","response":"Ports that have no specific configuration will automatically be assigned to the native VLAN. \nThis native VLAN is changeable, even though it is set to VLAN 1 by default based on Cisco's factory defaults. \nThe default VLAN, which is also VLAN 1, is the VLAN to which all access ports are assigned if they are not specifically allocated elsewhere."},{"question":"how do i turn off app store notifications in mountain lion","response":"First, you can dismiss individual notifications by clicking on the App Store update notification and swiping or dragging to the right. \nAnother solution is to \u2325+'click' the notifications menu icon in the top right and disable notifications from there. \nIf you want to block all incoming connections for the App Store, navigate to System Preferences > Security and Privacy > Firewall > Firewall Options, and select \"block all incoming connections\". \nTo stop automatic update checks, go to System Preferences > App Store and turn off \"Automatically check for updates\". \nAdditionally, you can selectively disable notifications for specific software updates by control-clicking the update inside the App Store to reveal a hidden \"Hide Update\" option. \nFor a more comprehensive approach, if you wish to disable the Notification Center permanently, open the Terminal and enter a command. \nAlternatively, you can modify the Info.plist file to change the NSUserNotificationAlertStyle option to 'none'."},{"question":"how can mom monitor my internet history from a distance?","response":"Anyone with (access to) your login name and password can access your search history, so it could be that your mum has guessed your Google password, or she could be a shared browser user if you logged into your account on a computer at home and did not log out, meaning all your history is being synced to that browser. \n\nAs your mother pays for your internet, she may have taken up the offer of a plan \u201cfor kids\u201d with parental control, including full reports of visited resources. \n\nIf it is true that she knows what you access over HTTPS, this categorically rules out any sort of \u201cfrom a distance\u201d spying, as once your request leaves your browser, no one knows what that request is until it reaches the server it's going to, but it is possible that internet monitoring software (also known as legal spyware) has been installed on your computer when you set it up, and your mother could have found such a tool by typing full sentences into Google easily enough, and they're probably one-click installers just for people like her. \n\nAlso confirm that there is no hardware device like a keylogger installed on your machine."},{"question":"what is the difference between a key escrow and a recovery agent?","response":"A key escrow is someone who holds the keys for each user, while a recovery agent has a master key."},{"question":"can you connect bluetooth headphones and regular headphones at the same time?","response":"No, you cannot output audio to both wired headphones and a Bluetooth audio device at the same time."},{"question":"how does tcp-keepalive work in ssh?","response":"To maintain your SSH connection, you should utilize the ServerAlive settings. \nThese settings operate at the SSH protocol layer, as opposed to the TCPKeepAlive which works on the TCP layer. \nServerAliveInterval sends SSH keepalive messages at intervals you specify and if no response is received before the next message is due, the connection is dropped. \nThis SSH layer operation can be beneficial because it sends actual data within an encrypted packet, making it less likely to be dropped by firewalls that dismiss idle connections."},{"question":"how to connect to a serial port as simple as using ssh?","response":"For those interested in setting up a terminal server, \"picocom\", in its latest release (2.0), offers a secure way to do so without the risk of shell command injection. \nOn the other hand, \"ser2net\" provides a simple and flexible way to connect to serial ports."},{"question":"do you get notified when someone does find my iphone?","response":"By default, no, there is no way for them to know the device is being viewed through Find My iPhone; the iPhone will only sound an alert if you press \"Play sound on iPhone\"."},{"question":"internet courtship: why would a hacker buy me poker chips?","response":"It appears that there may be fraudulent activity occurring from your Facebook account, as suggested by a scenario where money is loaded into the account using a stolen credit card, then lost in poker to transfer to another account, and finally withdrawn with an anonymous prepaid card. \nAnother possibility is the occurrence of a confidence scam, wherein the victim is manipulated into making high-risk bets until they lose a significant amount of money to the scammer's associates or programmed bots at the poker table. \nMoney laundering is also considered a viable motive, especially in light of strict gambling laws in countries like Germany, where hackers might transfer money through a game on Facebook that has a payment agreement with PayPal, allowing for undetected and unregulated transactions. \nInadvertently, the hosting poker companies, such as Zynga in this context, may benefit from increased advertising and potentially gaining a new player if the victim gets engaged with the game, despite this not being the primary intention of the account hacking."},{"question":"how to check if there are no parameters provided to a command?","response":"Parameter Substitution is an effective method when your requirement is to exit a script if a specific argument is not provided."},{"question":"how do i transfer my ios developer profile to another computer?","response":"From Mac OS X, you'll need to export your private key from the Key Chain where your certificates are running. \nAlternatively, this can be managed directly within Xcode, which allows you to export your developer profile from the Organiser's devices tab. \nFor those using Xcode 5 or later, import\/export functions have evolved, and your developer account should be managed through Xcode Preferences under Accounts."},{"question":"if immutable objects are good, why do people keep creating mutable objects?","response":"It depends on your preference, and on what you want to achieve. \nMutability is often chosen for its convenience, as it simplifies the process of updating in place, particularly when dealing with large projects. \nRepresenting game characters with mutable objects not only enhances game performance significantly but also aligns with our inevitable perception of the real world, which is inherently based on mutable objects. \nMoreover, certain data structures are notably easier to implement using mutable objects. \nSome functionalities become challenging with immutable objects, such as bidirectional relationships. \nWithout mutable objects you have no state, so non-thread-safe, mutable objects are fine if you are not using multiple threads. \nHowever, in single-threaded scenarios, mutable objects can be perfectly acceptable. \nThe default mutability in imperative languages, exemplified by Java Beans relying on a specific style of mutating objects, further contributes to the prevalent use of mutable objects. \nFrameworks like Hibernate and JPA essentially dictate the use of mutable objects, emphasizing the ease of development they bring, which often outweighs the advantages of immutable objects in many projects. \nThe ease of setting multiple values after object instantiation makes mutable objects useful in scenarios where a substantial amount of state needs to be assigned to an object. \nAlso, if you need to change the object after creation then a mutable Person object will be better. \nHaving the state of an object be mutable makes it possible to have the identity of the object which encapsulates that state be immutable; many programs are designed to model real-world things which are inherently mutable. \nAdditionally, the prevalence of mutable components in essential computer building blocks, such as CPUs, RAM, cache, and disks, reinforces the widespread use of mutable objects in programming. \nImmutability allows for substantial compiler optimizations due to the guarantee that data will not change, often leading to performance benefits and a reduction in state-related bugs. \nYet, mutable objects remain prevalent, possibly because developers are still blending object-oriented programming with imperative procedural programming. \nFurthermore, mainstream languages do not support immutability well, possibly deterring developers from adopting it unless they switch to more modern languages that naturally accommodate immutability."},{"question":"is ken thompsons compiler hack still a threat?","response":"Despite the theoretical nature of a certain security threat, it remains unlikely in practice. \nIt is still possible, though, and one way to address the concern is by employing multiple compilers to ensure no hidden backdoors are introduced. \nAlternatively, the threat never poses a real danger, as overcoming the associated challenges would be extremely sophisticated, making its occurrence improbable. \nMoreover, without significant advances in self-directed AI programming, such an attack remains no threat. \nThere remains a small theoretical chance of occurrence, but verification techniques exist, such as the Diverse double-compiling method, which can offer assurances against compromised compilers."},{"question":"how can i manually delete old backups to free space for time machine?","response":"The most straight forward way is to go to the point in Time Machine you want to delete and select the cog icon in the finder and choose the option 'Delete Backup'. \nThen enter your password and that's it. \nYou can also use the following bash script to find the oldest Time Machine backup on your computer: COMPUTER_NAME=$(scutil --get ComputerName) NBACKUPS=$(tmutil listbackups | grep \"$COMPUTER_NAME\" | wc -l) OLDEST_BACKUP=$(tmutil listbackups | grep \"$COMPUTER_NAME\" | head -n1) LATEST_BACKUP=$(tmutil latestbackup) echo Latest backup: $LATEST_BACKUP if [[ -n \"$LATEST_BACKUP\" && \"$LATEST_BACKUP\" != \"$OLDEST_BACKUP\" ]]. \nThen you can delete it by entering this script: ${OLDEST_BACKUP##*\/} and selecting 'Y' when prompted. \nAs manually deleting backups in reverse order is not desirable, you can apply a script that will delete the next one when the current one completes. \nIt's important to note that while the 'tmutil delete' command deletes backups, it does not guarantee to reclaim the space they previously occupied."},{"question":"how do i control macbook volume when a dp display is connected?","response":"MacOS doesn't enable control over end devices connected via HDMI or DisplayPort on Apple computers, including volume adjustments. \nThe Audio MIDI utility in the utility folder on OS X may be used to adjust audio settings. \nCommercial applications are available to help with audio control, such as SoundSource, which has a \"Super Volume Keys\" feature, and SoundControl, both offering free trials. \nAlthough SoundControl has an associated cost after the trial period, eqMac2 is another free option, is open-source and works immediately upon installation. \nBesides these third-party apps, there's MonitorControl for managing external monitor brightness and volume and SoundFlower, an extension that allows audio to be passed between applications, neither requiring a driver installation."},{"question":"is it free to facetime?","response":"Both FaceTime and FaceTime Audio are data and never go through the phone network as a regular phone call, so you will be charged in the same way as using the internet for other purposes on your phone, either Wi-Fi or mobile data, depending on your scenario."},{"question":"how do you import ca certificates onto an android phone?","response":"For CA certificates to be compatible with Android, they should be ASN.1\/DER encoded and have either a .CRT or .CER file extension. \nYou can easily convert .cer to .pfx for a Wi-Fi network connection without requiring any key using a straightforward method given in http:\/\/abtevrythng.blogspot.com\/2010\/06\/adding-cer-certificates-on-your-android.html. \nRealmB's Android Certificate Installer has been effectively used to set up certificates by uploading the required .cer or .pem files and then navigating to the provided link. \nAdditionally, simply changing the file extension from .cer to .crt allows for successful certificate recognition."},{"question":"installing .pkg with terminal ?","response":"To install all .pkg files from the current directory to the \/Applications folder on a Mac, you can use the following script: for f in *.pkg ; do sudo installer -verbose -pkg \"$f\" -target \/ done. \nAlternatively, to install the packages into your home directory rather than the system Applications folder, you can adjust the script with -target ~."},{"question":"keyboard shortcut to unhide or unminimize a window in os x","response":"To reopen an application and bring up a minimized window, press Command (\u2318) and Tab (\u21e5), then hold the Option (\u2325) key before releasing Command (\u2318). \nAnother way to handle windows is by using Command (\u2318) and H, which hides the window instead of minimizing it, allowing for an easy switch back to it without special actions. \nIf you want to un-minimize a specific window or all windows of an application, use Command (\u2318) and Tab (\u21e5) to switch to the app, hold down Command (\u2318), and then tap Down Arrow or 1 to enter App Expos\u00e9. \nThen, you can select any window with the arrow keys and press Option (\u2325) and Return (\u21a9) to un-minimize all windows or just the Return (\u21a9) key for a specific one."},{"question":"any way to encode the url in curl command?","response":"You can use: curl -G \"$( echo \"$URL\" | sed 's\/ \/%20\/g' )\"."},{"question":"what is the point of ctrl-s?","response":"CTRL-S was used in old VT100 terminals and similar systems to freeze the output, allowing users to read what was on the screen at the time. \nThis function is still very useful today to stop and resume output when reading long texts on a screen, utilizing CTRL-S and CTRL-Q commands. \nAdditionally, CTRL-S was used to turn off the paper tape reader on ancient teletypes, essentially a request to stop transmission from the other end."},{"question":"how to combine 2 -name conditions in find?","response":"You can use: find \/media\/d\/ -type f -size +50M ! \\( -name \"*deb\" -o -name \"*vmdk\" \\). \n\nUsing a negated -regex, you can use:- find .\/ ! -regex '.*\\(deb\\|vmdk\\)$'. \n\nYou can use regular expressions as in: find \/media\/d -type f -size +50M ! -regex '\\(.*deb\\|.*vmdk\\)'. \n\nFinally, try: find \/media\/d\/ -type f -size +50M -and ! -name \"*deb\" -and ! -name \"*vmdk\"; you can combine the following logic operators in any sequence: -a -and (the operator AND); -o -or (the operator OR); ! (the operator NOT)."},{"question":"rsync filter: copying one pattern only","response":"`rsync -avn --include=\"*.pdf\" ~\/Latex\/ ~\/Output\/` will tell rsync that you are using a pattern to synchronize files. \nTo tell rsync to copy any directories it finds, modify the rsync command to `rsync -avn --include=\"*\/\" --include=\"*.pdf\" ~\/Latex\/ ~\/Output\/`. \nIf you are using zsh, try `rsync -avn ~\/LaTeX\/\/*.pdf ~\/Output\/` to match folders recursively."},{"question":"how to split the terminal into more than one view?","response":"You can do it in screen using the terminal multiplexer, which allows vertical and horizontal splits with keyboard shortcuts and can unsplit and switch between different areas after starting new sessions. \nAnother option is splitvt, which is primarily used for splitting terminals. \nAdditionally, tmux is highlighted as a proficient terminal multiplexer for splitting screens, toggling between panes, and handling multiple windows with various layouts. \nTerminator is recommended for users seeking more features, such as grid arrangements, tabs, drag and drop, and simultaneous typing across terminals, and it integrates well with Screen and Tmux. \nTmux is a Terminal Multiplexer with clear distinctions among sessions, windows, and panes. \nVertical Split for GNU Screen is available and provides functionality similar to the horizontal split command. \nFor those preferring ease of copy-pasting and efficient tab management within a window manager, terminator and tilix are recommended alternatives. \nKDE's Konsole has built-in split view functionality alongside navigation through split views and tabs. \nLastly, Vim can serve as a basic terminal multiplexer with commands for opening split terminals."},{"question":"adb constantly disconnects, shows device offline","response":"For issues with Android Debug Bridge (ADB) connectivity, reflashing or updating the ROM on your device can be an effective solution, particularly if you've experienced stability improvements after changing ROMs in the past. \nYou can test it on another phone to verify if the problem is specific to your device, as there is a possibility it might just be due to occasional instability in ADB. \nIt is possible to solve the problem in the Windows USB settings by unchecking the option of \"Allow the computer to turn off this device to save power\". \nIt's recommended to ensure that unrelated software, specifically Samsung Kies, is not running in the background, as it may interfere with USB connections. \nTrying different USB cables and ports or using rear USB ports instead of front ones can also resolve connectivity problems. \nSome users have found that switching from USB 3.0 ports to USB 2.0 ports has solved their issues. \nAnother solution is to directly connect the device to a physical USB port on the machine or through a powered USB hub to ensure the device receives adequate power. \nFor Windows users, adjusting USB settings by preventing the computer from turning off devices to save power is another way to fix disconnect-reconnect problems. \nAdjusting the device's USB configuration settings to MTP by going to Developer options > Networking section > Select USB Configuration > MTP can also resolve driver installation freezes. \nLastly, simply restarting the device and freeing up internal storage space may alleviate some connectivity issues."},{"question":"lets encrypt for intranet websites?","response":"If you are looking for an internal Certificate Authority (CA) service for an Intranet, then a public CA like Let\u2019s Encrypt may not work at all, as it is for publicly reachable sites only; Let's Encrypt connects back to its servers to manage the cert request and signing, and can only issue certificates for valid DNS names. \n\nFor a proper solution you can run an own boulder instance, i.e. the letsencrypt server part, on your network, but if you're only having a few servers running boulder, running \u201cletsencrypt\u201d yourself is probably not the best choice, and you can use more simple tools like easy rsa."},{"question":"what tiny thing in lion makes you smile or has caught you off guard?","response":"The features people like are: merging folders in Finder; QuickTime M4A recordings; the offer to add a Gmail account if logging in on Safari for the first time; the redesigned lock screen; Autocorrect; Multi-touch swiping of page history in Safari; tmutil command line into Time Machine; Quicklook natively supports animated GIFs and previews URL content directly from Mail\/iChat; Mail.app is full of smiles and animations, and you can preview webpage links (a button opens a window); unsupported hardware notices; new services for opening a New Terminal Window\/Tab at Folder; you can move items in the finder by using \u2318-C to copy and \u2325-\u2318-V to move; more international localizations for system Text to Speech; native support for Microsoft DFS; disconnecting an iPhone doesn't wake display; wireless Internet Sharing supports 5Ghz channels; show a message when the screen is locked; use keyboard to control Slideshow Screensaver (space bar or arrows to pause or navigate between pictures); no scrollbars; Quicklook works from the iTunes \"Album Artwork\" screensaver (play music by clicking on the albums); Terminal is more keyboard accessible; you can trash things in a queue whilst trash is emptying; yearless birthdays (Addressbook lets you add just month and day); hide or filter System Preferences (customise to slim down the main icon view); improved app switcher (\u2318TAB doesn't loop like crazy if you leave those keys pressed); Multitouch page turning in iCal (move between months with a 2-finger drag); use Mission Control to easily drag and drop apps from one Space to another; put a text or rich-text file in \/Library\/Security; Quick Look to Track Shipments from within Mail.app; Trackpad scrolling in Stickies window; Photo Booth now has an option to disable screen flash; emails are now sorted by default by date in descending order; Mission Control supports unique backgrounds per space; Finder gives better feedback when Trash has an error; Calculate all sizes in Finder is very fast; Finder menu for video encoding \/ conversion to create different resolutions and sizes; Launchpad Background Wallpaper Effects; use a date in Mail.app to make a quick iCal event; removed Auto-Column Resizing; In Launchpad, holding down Option makes your icons dance or \"jiggle\"; Wi-Fi Diagnostics; Motion Blur in Mission Control; create user names containing dots; Terminal.app now supports 256 colors; Mail now displays custom header; in Mission Control, you can invoke Quicklook; Authentication dialogs shake when you enter your password incorrectly; QuickLook now shows the pages of a PDF in scrollable sidebar; and Safari being two processes. \nHowever, one user jokingly thinks Lion is a pile of poo."},{"question":"how to find out from the logs what caused system shutdown?","response":"To investigate user logins and ascertain who may have been involved with a system halt, you can run the `last` command to check the login information for all users. \nAdditionally, system shutdowns can be tracked through the log files, particularly when they occur due to programmatically privileged requests or ACPI events. \nIn cases of overheating, logging details may be located in the `\/var\/log\/syslog` file. \nMoreover, the `\/var\/log\/auth.log` file could also contain relevant information about system shutdowns."},{"question":"how can paypal spoof emails so easily to say it comes from someone else?","response":"Anyone can falsify email addresses, including the sender information, and PayPal uses certain SMTP headers related to the message header rather than envelope headers to handle email delivery appropriately. \nWhile it is technically possible to spoof email addresses, PayPal is not actually doing so. \nIt is also noted that Gmail supports DKIM, which can be used to verify the authenticity of emails from PayPal."},{"question":"use scp to transfer a file from local directory x to remote directory y","response":"To copy a file from the remote machine to the local one, use scp -P 2222 username@domain:dir\/file.ext localdir (assuming that file.ext is in ~\/dir on the remote computer). \n\nYou need to run the scp command from the local machine, not on the remote, making sure that your local machine is accessible via the internet and has ssh set up. \n\nCopy files on service to local dir: you must be in local bash terminal to conduct this command, and you must be in local bash terminal scp. \n\nThe path to the remote directory should be written like this: username@domain:~\/remote_directory (being sure to add the :~\/)."},{"question":"is have i been pwneds pwned passwords list really that useful?","response":"It's beneficial to recognize that Have I Been Pwned (HIBP) serves as a tool that alerts individuals to the likelihood that attackers could have their email addresses and passwords. \nImportantly, the service reveals if one's password has appeared in recent data leaks, suggesting that the compromised password could now exist on multiple brute force and dictionary attack lists, thereby increasing the risk of one\u2019s account security being jeopardized. \nYes, someone in the world may share the same front door key as yours; however, in the context of digital security, an individual can test thousands of digital 'houses' in an instant. \nHIBP helps in determining whether a password you are using\u2014or have used\u2014is commonly known by attackers, thereby allowing you to take preventative action. \nThe main purpose of the HIBP service is to assist individuals in discovering where their email addresses have been exposed in various data breaches. \n\"Pwned Passwords\" was added in August last year after a set of recommendations were released by NIST on how to enhance authentication models. \nHIBP has been used as an educational tool to teach non-technical staff the importance of maintaining unique passwords for their accounts."},{"question":"is rsa a block cipher?","response":"RSA does not fall into the categories of either a stream cipher or a block cipher. \nThis is evidenced by the fact that RSA utilizes asymmetric keys which means it has distinct encryption and decryption keys, contrasting with the symmetric keys used in both stream and block ciphers. \nHowever, there is a discourse suggesting that RSA could be considered a block cipher if the symmetric key requirement is disregarded."},{"question":"tabs are better than spaces?","response":"Some developers prefer using tabs as it allows each developer for consistency and to control the amount of indentation per tab. \nOn the other hand, some developers sympathize with the utopia of tabs, but can't imagine not using spaces. \nHowever, others argue that consistency is more important than the choice between tabs and spaces, emphasizing the role of the tab character specifically for indentation. \nWhile tabs are considered the natural and orthodox choice by some, the debate acknowledges that a combination approach might be necessary. \nIt's crucial to pick one approach and maintain consistency. \nThose in favor of spaces argue that they provide a more visually consistent alignment, especially when dealing with comments, function parameter lists, or multiline expressions. \nOn the other hand, proponents of tabs contend that even for aligning parameters and comments, tabs can work better. \nThe consensus is that there is no single proper indentation character for every situation. \nDifferent languages may have different conventions, such as spaces being a must in Haskell and tabs being a must in Makefiles, leaving the choice ultimately to personal taste."},{"question":"why is steam so insistent on security?","response":"Many children use Steam, and information belonging to children deserves a higher level of protection, while children using Steam can't necessarily be trusted to be security conscious, and as they don\u2019t yet have a proper understanding of legality, at least some of them will try to steal the account of that other kid they don\u2019t like. \n\nFraud is an issue as there are many hackers actively trying to take over Steam accounts, and widespread reports of stolen accounts create bad press, which destroys trust. \n\nAnother reason Steam is insistent on security is to free software engineers up to do more engaging work. \n\nHowever, looked at from the other direction, Steam isn't even remotely secure, as every app installed gets full access to your entire system, and you have no idea if any game is installing a root kit or a key logger."},{"question":"prepending a timestamp to each line of output from a command","response":"Combining `date` and `xargs` is a method used to append the current date and time to each line in a batch of outputs. \nAnother option for adding timestamps to each line of output is to use a command line utility called `gnomon`. \nHowever, if using Bash version greater than 4.2.0, the recommendation is to use the built-in `printf`, as it's faster compared to the `date` command."},{"question":"how do i airplay mirror my iphone screen to my macbook pro?","response":"An app that has proven to be effective is Reflector. \nAdditionally, QuickTime Screen Recording can be utilized for devices with iOS 8 when connected via USB to a Mac. \nThe app Airserver also transforms your Mac into an Airplay receiver. \nMoreover, if your gadgets are updated with OS X Yosemite or newer iOS versions, QuickTime on a Mac allows you to screen capture with a wired connection. \nDirect screen capture of an iPhone through QuickTime is possible when connected to a MacBook with a USB cable. \nFurthermore, QuickTime Player, which usually comes pre-installed on OS X, can be used for this purpose. \nAnother method involves iTools Pro, which requires connecting your Mac and iPhone to the same network."},{"question":"how do certification authorities store their private root keys?","response":"Several security measures are taken to protect the keys and operations of certification authorities (CAs), for instance, many use sub-certificates and revocation lists to minimize the exposure of master private keys. \nPhysical security measures include keeping the root CA entirely offline, storing it in secure locations like safes, and using HSMs to secure the certificates. \nMost legitimate CA operators employ HSMs, reflecting a standard practice in the industry. \nA CA's key is securely stored in a Hardware Security Module as part of the broader security measures, which also involve strict access control procedures and video surveillance. \nThese CA systems may utilize high-grade HSMs like Thales devices (with 6-figure costs in \u00a3) with tamper-proof features to protect against various physical attacks and temperature, and ensure that the key generation and transportation processes are secure."},{"question":"how to play music from your iphone on your laptop?","response":"The only way to play the music from your iPod or iPhone is to do this with iTunes itself by setting it to 'Manually manage music and videos' on your device; upgrade to iTunes 10 and you should be able to do this. \n\nYou could also find a DAAP server for iPhone, or Airfoil Speakers. \n\nAn alternative is to use your PC speakers simply as headphones for the iPhone, by plugging in a 3.5mm jack into the PC audio in (microphone) receptacle and run it to the iPhone headphones jack."},{"question":"remove particular characters from a variable using bash","response":"Use `sed` with the command `sed 's\/\\.\/\/g'` to strip periods from the text. \nAdditionally, bash's string manipulation capabilities are sufficient for such tasks without the need for external programs. \nFor example, when needing to extract only the numeric digits from a version string, you could employ `echo \"$VERSION\" | tr -cd [:digit:]` to accomplish this effectively."},{"question":"delete from cursor to end of line in `vi`","response":"The command \"D\" allows for deletion from the current cursor position to the end of the line. \nThis command is synonymous with \"d$,\" where \"d\" stands for delete and \"$\" represents the end of the line. \nTo use it effectively, move the cursor to the first character you wish to delete and then press shift-D, which removes all characters until the end of the line. \nThis deletion also places the removed text into the default cut buffer, allowing you to paste it again if desired. \nOther related commands include \"dw,\" which deletes from the cursor position to the start of the next word, and \"c$\" or \"C\" (shift-c), which deletes until the end of the line but additionally switches to insert mode."},{"question":"what is difference between man and help command?","response":"\"Help\" is a Bash built-in command designed to provide assistance specifically for Bash commands, whereas \"man\" (manual) is a conventional way to get help for nearly all system commands and, occasionally, configuration files."},{"question":"what is the difference between access list and prefix list?","response":"Both prefix lists and extended ACL's are mechanisms that facilitate network address filtering. \nHowever, only extended ACL's are capable of filtering based on higher layer information, like TCP\/UDP port information. \nACLs have applications in security measures, such as restricting remote access, which cannot be replicated by prefix lists. \nACLs have a variety of applications beyond route filtering, including traffic filtering for QoS, traffic matching for NAT, VPN use, Policy Based Routing, and more, whereas prefix lists are primarily used for route-filtering and redistribution."},{"question":"how do i do a ls and then sort the results by date created?","response":"For listing files sorted by their creation or birth date\/time on systems that support this functionality, you can employ the command `ls -lt --time=birth` to achieve the desired output. \nAdditionally, with the advent of coreutils version 8.32 or later, this capability has been further refined, allowing `ls` to display and sort files using the birth time with the `--time=birth` option, so 'ls -l --time=birth'."},{"question":"whats a good mac equivalent of winmerge?","response":"FileMerge is a solution included with every Mac OS X installation, though it does also require Developer Tools to be installed too. \nThere is also a cross-platform alternative, called DiffMerge. \nAraxis Merge is known as the gold standard and offers versions for both Windows and Mac users, which is especially useful for multiway diffs and merges common in distributed version control systems. \nIt also comes as a commercial version with a free trial. \nMeld is a visual diff and merge tool designed for developers, which aids in file and directory comparisons, and supports popular version control systems. \nMeld can be installed on Mac via MacPorts, requiring Xcode and the Xcode Command Line Tools. \nAnother powerful paid option for file merging on OS X is Kaleidoscope, which also facilitates folder and file comparison and even image comparison. \nIt's also praised for its aesthetically pleasing interface and three-way merge capability, making it a favorite for users who value design. \nVisualDiffer, though not as robust as some alternatives, offers a cost-effective solution for file comparison. \nSemanticMerge provides structure-based merge capabilities that parse code for .NET, C, Java, C++, and JavaScript, offering refactoring-friendly merging. \nBeyond Compare, recognized for its superior diff\/merge capabilities on Windows, is available as a beta version for Mac. \nPerforce offers its diff and merge tool P4Merge, appreciated for its handling of file-diffs and three-way merges."},{"question":"lock screen command one-liner","response":"To initiate a screen lock, you should set your preferences to have the screen lock when the screen saver activates, and you can use a specific terminal command to start the screen saver itself. \nIf you're seeking other methods, you won't find that there is a direct command line way to lock the screen, but applications like QuickLock offer alternatives such as setting keyboard shortcuts for locking the screen and typing your password unlocks it when the screen is locked. \nAnother option includes using BetterTouchTool to assign a keyboard shortcut to switch to the login screen or using Alfred and its universal hotkey to trigger a screen lock. \nRecent macOS versions have a Lock Screen Menu item directly in the Apple menu, superseding previous methods. \nFor a custom approach, you could create a binary using a terminal command that exploits the keychain menu plugin to lock the screen. \nAlternatively, on OS X 10.9 and later, you could use 'pmset displaysleepnow' in the terminal if your preferences are set rightly at System Preferences under Security & Privacy options. \nAppleScript through 'osascript' can also be a medium to command the Finder to sleep, albeit not directly locking the screen. \nThere's even a way to add an alias in your 'bashrc' file that triggers the 'afk' command affecting a locked state. \nOn OS X Mojave, you can start the screensaver engine using this command: \/System\/Library\/CoreServices\/ScreenSaverEngine.app\/Contents\/MacOS\/ScreenSaverEngine. \nRegardless of the chosen method, ensure your system preferences are adjusted to require a password immediately after the screen saver activates."},{"question":"how do i start texteditor from the command line?","response":"If your default text editor is TextEdit, you can use the command `open -t file.txt` or open -a: $ open -a TextEdit hi.txtto open it. \nAlternatively, if TextEdit is not your default text editor, you can specifically open it in TextEdit using the command `\/Applications\/TextEdit.app\/Contents\/MacOS\/TextEdit file.txt`. \nAnother method involves utilizing the 'open' command-line utility. \nIf you prefer creating aliases, you can add something like the following to your ~\/.profile file: `alias textmate='open -a TextMate'` or `alias textedit='open -a TextEdit'`. \nAdditionally, if you have already started writing in the terminal and wish to continue in your preferred editor, you can press `ctrl+X, ctrl+E` to open it. \nThere is also a \"quick open\" option for the TextEdit content edit interface."},{"question":"what is the difference between join and inner join in oracle?","response":"Join and Inner Join are the same. \nThe inner keyword is optional as all joins are considered to be inner joins unless otherwise specified."},{"question":"should i use csrf protection on rest api endpoints?","response":"No CSRF is possible with REST API endpoints that are truly stateless and do not use or accept data from cookies or sessions, as CSRF relies on \"session riding\". \nHowever, CSRF protection is needed if cookies are used, especially for authentication purposes. \nEven in environments that use integrated windows\/kerberos authentication, where the browser might automatically provide credentials, CSRF protection is required. \nAdditionally, any authentication that enables the browser to autonomously include information in a request requires CSRF protection. \nSpecifically, CSRF protection is necessary only for the scope of the domain and path of the particular cookie."},{"question":"el capitan, expand desktop thumbnails by default in mission control","response":"To automatically expand the desktop thumbnails, setting up a hot corner to the top left is effective, as it expands them upon entering Mission Control."},{"question":"application level volume control in os x?","response":"Jack, initially designed for GNU\/Linux, is a low-latency audio server that likely includes volume adjustment capabilities. \nSoundBunny, priced at $9.99, also offers this functionality. \nAnother discovery is volumemixer-app.com, a tool similar to the Windows counterpart. \nFor those seeking free and open-source solutions, BackgroundMusic is a viable choice. \nIf you have Xcode installed, BackgroundMusic is an option. \nFinally, Rogue Amoeba's SoundSource utility stands out for its ability to precisely control application-level volumes and more."},{"question":"why do we need so many classes in design patterns?","response":"Classes improve maintainability, readability, and discoverability because they're a widely recognized convention that allows developers to encapsulate related behavior and control state. \nThe effort to distinguish domain behavior from other concerns, as well as to ensure that domain concepts are explicitly expressed in the model, is fundamental in Domain-Driven Design (DDD). \nSimilarly, by reducing dependencies among components, the complexity of understanding and maintaining the code is significantly decreased, aiding developers in managing changes more effectively without having to keep numerous interactions in mind. \nThe tendency of successful programs to expand in complexity highlights the importance of domain knowledge for maintainability and the challenge of adding new team members to complex projects. \nIdentifying relevant code sections in a larger program is critical, with smaller, well-named units enabling quicker navigation to the necessary parts for modification, thus enhancing development velocity and reducing conflicts and duplication. \nMoreover, the practice of breaking down a codebase into smaller testable chunks enables more precise and efficient testing, leading to faster debugging and lower risk of merge conflicts. \nIt is a misconception that many classes are necessary in design patterns; the key is to strive for high cohesion and low coupling in code segmentation. \nFinally, it's about finding a balance in software design; using many classes isn't a requirement but part of an evolutionary design approach where you implement what's necessary, and sometimes, less is more."},{"question":"is there any particular reason to use diffie-hellman over rsa for key exchange?","response":"The Diffie-Hellman (DH) ephemeral key exchange is preferred over RSA because it ensures perfect forward secrecy, which RSA alone is incapable of providing. \nThis means that the confidentiality of session keys is maintained even if the long-term keys are compromised at a later date. \nDH key pair generation is also noted for its speed advantage when it comes to creating ephemeral keys. \nAdditionally, in terms of security, a DH key of 1024 bits is suggested to be stronger than an RSA key of the same length."},{"question":"how to show hidden files and folders in finder?","response":"The command 'defaults write com.apple.finder AppleShowAllFiles true' followed by 'killall Finder' will show these files, and replacing 'true' with 'false' will revert this setting. \nAlternatively, tools like the hiddenfiles widget or third-party software like Deeper or TinkerTool can assist. \nFurthermore, to customize this behavior in Finder without third-party tools, you can execute similar commands in Terminal, substituting 'YES' or 'NO' in the place of 'true' or 'false' accordingly. \nFor a quicker method, press Command+Shift+. (period) in Finder to toggle the visibility of hidden files and folders."},{"question":"how to output only file names (with spaces) in ls -al?","response":"For listing files in a directory without showing files with spaces in their names, you could use the 'ls -lA | awk '{print $9}'\" command."},{"question":"what certificates are needed for multi-level subdomains?","response":"It is advisable to adhere to RFC 6125, while DigiCert, WildCard, and ssl certificates are unique in allowing you to secure ANY subdomain of your domain, or you could use a certificate from StartSSL."},{"question":"how to redirect output of wget as input to unzip?","response":"When downloading files using wget, and some say you must download your files to a temp file and not bother trying to pipe the output into unzip. \nThe zip manual says that archives read from a standard input are not supported. \nBecause zip files are identified by a central directory located at the end of the file; some users believe that standard zip tools use the lseek function to read them, which isn't possible with dynamic content such as FIFO or pipes, leading to errors. \nA possible workaround is to use an alternative compression method like tar.gz. \nSome say that with the Java Development Kit (JDK) installed, you can pipe the download directly into the Java Archive Tool (jar), using jar: wget -qO- http:\/\/example.org\/file.zip | jar xvf \/dev\/stdin. \nAlternatively, BusyBox's unzip utility is capable of handling standard input and allows the extraction of all files from a piped download using wget -qO- http:\/\/downloads.wordpress.org\/plugin\/akismet.2.5.3.zip | busybox unzip -. \nLastly, for a single-file zip archive, you can utilize zcat or gunzip to directly extract the file while downloading it."},{"question":"how do you empty the buffers and cache on a linux system?","response":"Use the command: # echo 1 > \/proc\/sys\/vm\/drop_caches."},{"question":"is there a way to start a specific application with a keyboard short cut?","response":"QuickSilver is a good application launcher, which remembers and recommends your most used applications. \nAnother one is Visor, which allows you to hide your Terminal and quickly access it with a key combination, providing a Quake-style console. \nYou can also create a service with Automator to launch applications with no input required from any application. \nThis can be done in Sierra and all other post-Snow Leopard Mac OS versions. \nBy using a specific key combination on Spark (\u2318+\u2325+\u00a7 on a UK keyboard), you can launch applications quickly without the addition of visible UI elements. \nApptivate allows you to set system-wide shortcuts and can hide already running applications. \nAlfred Powerpack can also be used to add hotkeys. \nIf the Terminal app is running and it has no open window, replacing Launch Application action with Run AppleScript action and setting the following code to be run does the trick: on run {input, parameters}. \nThis AppleScript code also allows for the opening of a new Terminal window, tell application \"Terminal\" do script \"\" activate end tell. \nAlso, a service can be enabled in Finder to open a new Terminal window at the selected folder. \nFinally, iTerm can be configured to do the job with a global hotkey through Preferences (\u2318+,) > Keys > Hotkey."},{"question":"what is the purpose of using shift in shell scripts?","response":"Shift is a bash built-in which removes arguments from the beginning of the argument list. \nSpecifically, shift alters the positional parameters so that each argument (e.g., $1, $2, etc.) moves down one position in the sequence; $1 gets the value of $2, $2 gets the value of $3, and so forth, while the original $1 is discarded. \nShift enables extraction of the complete value of the location (otherwise this value could get arbitrarily long) and allows the retrieval of all remaining arguments from the $@ variable after the shift operation is performed. \nMoreover, shift operates in a First-In-First-Out (FIFO) queue fashion, comparable to the popleft operation on an array in high-level programming languages."},{"question":"how to get rid of firewall accept incoming connections dialog?","response":"You can mitigate this issue by generating a code-signing certificate: you can create one in Keychain Access via the Certificate Assistant, which involves filling in your chosen certificate name and other details, selecting the self-signed root, setting a validity period of 10 years, and setting \"Always trust\" in the login keychain."},{"question":"how do you achieve a numeric versioning scheme with git?","response":"Take a look at the process of using 'git-describe' by way of GIT-VERSION-GEN and how you can add this via your build process when you tag your release. \nFor guidance, can also refer to the provided blog at http:\/\/cd34.com\/blog\/programming\/using-git-to-generate-an-automatic-version-number\/."},{"question":"why do network taps have four ports?","response":"Hardware network taps provide one output port in each direction to ensure that traffic can be replicated at line rate."},{"question":"cmd+tab does not work on hidden or minimized windows","response":"First, navigate to System Preferences on your Mac, go to Mission Control, and uncheck \"When switching to an application, switch to a Space with open windows for the application\". \nAnother option is to use HyperSwitch, a free application that can solve this issue, but make sure it's updated. \nAs of 2021, you can also consider using AltTab, a replica of Windows functionality for Alt+Tab, which is free and open source."},{"question":"how to find applications path from command line?","response":"Either use whereis or which to get the path to the installed program, for example, whereis git will give you the path to the command. \n\nIf it is in your path, then you can run either type git or which git, and if it is not in your path, then it's best to look for it with locate -b git, which will find anything named 'git'. \n\nAlternatively, and for older systems, use the old standby find, possibly with a -print option: find \/ -name git -print. \n\nThe POSIX standard way to do this is command -v git. \n\nIf you happen to forget the program name, you can use apropos with a synonym or description of your utility, so apropos \"version control\" will find git."},{"question":"why arent more desktop apps written with qt?","response":"One criticism of Qt is that it often fails to mirror the native appearance of applications on various platforms, leading to a lack of consistency when applications are moved from one system to another. \nAdditionally, Qt has been noted for not integrating well with templates in C++, posing challenges for developers familiar with templating. \nIt also doesn't have robust bindings to all mainstream languages and isn't always the most suitable tool for the job, especially for simple or command-line applications. \nQt's signal slot mechanisms have also been described as inefficient, which can lead to more complicated and harder-to-maintain code. \nFurthermore, Qt's large initial source requirement can complicate setting up a build environment. \nIt is important to note that Qt uses C++, which may not be the most productive language due to its low-level nature and lack of automatic memory management. \nMoreover, Qt is seen as somewhat heavy and not always suitable for every type of application. \nWith the increasing preference for web-based technologies, applications aiming for uniformity across platforms might opt for those instead of frameworks like Qt. \nLastly, the licensing of Qt has been a barrier to its usage, with some preferring other open-source, cross-platform toolkits."},{"question":"use existing contact for me in ice cream sandwich","response":"After installing the Google+ app, your phone can sync the \"Me\" contact with your full Google+ profile, which was specifically noted to work with a Galaxy Nexus on ICS 4.0.4. \nOn the other hand, it appears that merging a normal contact with the \"Me\" contact directly is not possible. \nThe suggested solution is to install the Google+ app and adjust its settings to sync the contacts, after which opening your contacts should show your contact as \"my profile\"."},{"question":"how do i launch finder from terminal or command line","response":"To open a specific directory in Finder using Terminal, you need to type the command 'open' followed by the directory name."},{"question":"are programming certs worth it?","response":"Certifications generally indicate that an individual was knowledgeable about a technology at a specific time. \nCertified professionals can provide some advantages to their company, potentially making certification a requirement for certain job offers. \nFor those starting their careers, certifications tend to be more important as they can serve as proof of knowledge. \nIn Italy and other places, the true skills and certifications of programmers are often overlooked by employers; however, in reputable companies, certifications are a valuable part of your r\u00e9sum\u00e9. \nA certification can also act as a testament to one's interest, showing initiative during periods of unemployment. \nStudying for certifications is seen as valuable, helping to understand core basics and boosting confidence in job interviews, even if the certification itself isn't worth it. \nIt's suggested that if one already has the knowledge, obtaining a certification could demonstrate seriousness about one's career, albeit not necessarily competence. \nSome educational courses that include certification, like those from reputable universities, could significantly strengthen a resume. \nPersonal experiences with certification programs show that they can be interesting and instill strong fundamental knowledge, with additional benefits if undertaken in the spirit of learning. \nThere is a viewpoint that certifications do not directly secure jobs but provide extensive knowledge, which is what ultimately helps in job acquisition. \nSome may pay for certifications as a measure of personal progress, and certain people, such as hiring managers, might value a certificate from a recognized educational source. \nIn particular employment markets, such as Indian IT, certifications are influential in starting careers, and they can provide an edge against equally qualified candidates lacking certification, but note that many of good coders are not computer scientists or are school\/college drop-outs, which conversely tells you that certifications are not that worthy. \nMicrosoft certifications can also open up opportunities for additional income like training roles and lend credibility for authoring books or providing training. \nHowever, outside of certain partner requirements like for Microsoft Certified Partners, certifications might not be particularly beneficial. \nIn some prestigious software companies, certifications might be seen as a negative. \nFrom some individuals' experiences, certification courses may seem like a waste of time and resources, emphasizing that learning itself is valuable, not the certification paper. \nCertification can assist those who are not strong programmers by helping their resumes stand out in less competitive environments. \nPossessing relevant qualifications could be seen as beneficial and can aid in the initial filtering process by recruiters. \nIn consulting or contracting, being certified can help market oneself for projects. \nFinally, certifications are usually optional unless they are specifically required for a particular job."},{"question":"how do i disable or get rid of the startup sound my mac makes?","response":"To disable the startup sound on your device, you can use StartSound.PrefPane which essentially sets the volume to zero upon shutdown and then restores it again after login. \nAdditionally, you could simply reduce your Mac's volume to zero before restarting to avoid hearing the startup sound. \nAnother possibility is to input a script into Terminal that mutes the output: type: sudo -s Give the password when asked for then: cat >\/private\/etc\/rc.shutdown.local #! \/bin\/sh \/usr\/bin\/osascript -e 'set volume with output muted' then press Ctrl-D and type \"exit\", though you would need to manually increase the volume afterwards if you want to listen to anything. \nSpecifically for Snow Leopard and earlier machines, you can download and install \"StartupSound.prefPane\" which will install a preference pane in system settings to allow you to adjust the startup volume and disable the startup sound. \nA straightforward action like holding down the mute button during startup can also achieve a quiet boot."},{"question":"why is object oriented programming so hard?","response":"For individuals new to the concept of object-oriented programming, or accustomed to procedural programming, transitioning to an object-oriented paradigm can be time-consuming and requires a lot of practice. \nNewcomers to programming might find OOP challenging because of the unfamiliar concepts involved, and poor teaching or teaching OOP from the beginning without a solid foundation in basic data structures and binding\/higher order functions can hinder comprehension. \nAdditionally, the tools used for OOP may not seamlessly facilitate the learning process. \nFurthermore, tasks such as telling a window to open itself may seem unusual in an OOP context. \nThe disparity between the basic explanation of OOP and its real-world applications further contributes to the perceived difficulty. \nAlso, OOP is not a paradigm that's actually natural for modeling anything, inheritance in OOP doesn't follow most people's mental models, and because we do not think in terms of properties and methods of real life objects. \nLastly, it can also be a question of motivation: it's harder to learn something when you don't see why, and also when you can't look at what you did and figure whether you did it right or not."},{"question":"how to insert text after a certain string in a file?","response":"In scripting with sed, it is possible to insert text after a pattern using the \"'\/pattern\/a some text here' filename\" command. \nAwk can also do this using \"'1;\/PATTERN\/{ print \"add one line\"; print \"\\\\and one more\"}' infile\", allowing inclusion of escape sequences for characters that can't be used literally."},{"question":"find the total size of certain files within a directory branch","response":"In computing disk usage for JPEG files, you can use various commands such as \"du -ch public_html\/images\/*.jpg\" to check the total usage within a directory and the command \"find .\/photos\/john_doe -type f -name '*.jpg' -exec du -ch {} +\" which may produce multiple totals if the file list is extensive. \nFor an efficient solution that works on different systems including Mac OS X, and gives you the total answer in gigabytes, you can implement \"find . -iname \"*.jpg\" -ls | perl -lane '$t += $F; print $t\/1024\/1024\/1024\" GB.\" \nAdditionally, to work with any locale, you could use \"LC_ALL=C find .\/photos\/john_doe -type f -name '*.jpg' -exec du -ch {} +\" or \"find -type f -iname *.jpg -print0 | du -ch --files0-from=-\" are commendable commands."},{"question":"lowest volume is still too loud\u2014how can i make it even lower?","response":"Press ShiftOptionVolume Up\/Volume Down. \nAdditionally, you can fine-tune the volume level by clicking the volume icon in the menu bar and using the slider or by opening the Sound panel in System Preferences for a larger slider and more precise control. \nFor those preferring command line interfaces, it's possible to use the command line to set exact volume levels. \nFor a quiet volume setting, you can lower the volume to one box full or muted and then press Mute to unmute. \nAlternatively, a hardware solution such as an attenuator can help reduce static and allow fine-grained analog volume control. \nThe combination of Shift and Alt keys while pressing Volume UP\/DOWN, allows for quarter increment changes in volume. \nLastly, applications like iTunes have their own volume controls, which can be adjusted independently from the system sound volume."},{"question":"how to make ringtones longer than 30 seconds on iphone?","response":"A custom ringtone can be up to 40 seconds, and can be custom made with iTunes."},{"question":"amount of simple operations that is safely out of reach for all humanity?","response":"The computational limit set by Landauer's principle is approximately 6.32\u00d710^68 elementary computations, or 2^225.2. \nWhen considering the total world energy consumption and diverting it entirely to computation, we reach a limit close to 5\u00d710^36, which resembles 2^122. \nWith optimistic technological progress factored in, we may achieve a grand total of 2^138 elementary operations for a decade-long computation using Earth's total resources by the year 2040."},{"question":"how to add a line break in a cell in excel for mac","response":"In Excel for Mac, Control+Option+Enter, Control+Command+Enter or Control+Option \u2325+Enter can be used to create a line break in a cell. \nAlternatively, you can use Alt+Enter."},{"question":"why are dot underscore ._ files created, and how can i avoid them?","response":"Dot underscore files are unavoidable as they store file information that would otherwise be part of an extended attribute on HFS+ or Unix\/UFS volumes. \nThese files, created by operating systems, are used for speeding up searches and storing metadata among other things. \nOne method to reduce these files on non-HFS+ drives is by using the BlueHarvest preference pane. \nAdditionally, you can utilize the dot clean command to remove or merge the ._ files or they can be deleted through tools like FileZilla. \nAlternatively, employing rsync during file transfer prevents the creation of ._ files."},{"question":"where do i put my systemd unit file?","response":"You can put them all in \/etc\/systemd\/system, \/etc\/systemd\/system\/multi-user.target.wants\/, \/usr\/lib\/systemd\/system, \/usr\/local\/lib\/systemd\/system."},{"question":"is micro-optimisation important when coding?","response":"When coding, micro-optimization is generally not considered crucial, especially with platforms like JVM and .NET, where code optimizations may not translate effectively across different hardware."},{"question":"can i force a cache refresh in safari running on ios?","response":"To force a refresh in Safari, forcibly quitting the app clears its entire cache, not just for a single page. \nFor testing purposes in iOS 8, opening the page again after closing it in private mode is effective. \nIf you wish to reload a specific site's artifacts after editing, returning to Safari and reloading the page will do so. \nFurthermore, refreshing on an iOS device using developer tools will get you the updated non-cached version of a page. \nIn the event you're connected to Apple developer tools, pressing Command + Option + R will refresh the page. \nAnother unconventional method involves turning off the WiFi, refreshing the page to induce a failure, and then turning the WiFi back on to prompt a refresh. \nLastly, there's an app called DevBrow which clears the cache every website refresh, deletes cookies, and adds random parameters to URLs for a complete reload."},{"question":"whats the difference between $(stuff) and `stuff`?","response":"The noticeable difference is that $() allows command nesting, which backticks do not support. \nAlso, $() should be used as it treats command interpretation consistently, interpreting everything within the parentheses as a command. \nMoreover, $() is known to use more system resources, albeit marginally faster. \nPractically, $() is more convenient for nesting multiple commands, making it easier to write and debug."},{"question":"check and fix sd card errors within android itself?","response":"To address issues with an SD card, you have the option of leveraging root access and a terminal emulator application. \nAlternatively, an application is available on the market specifically designed to \"Repair damaged sdcard and scan for bad blocks\"."},{"question":"can csv files contain viruses?","response":"Yes, there are some examples of malicious CSV files causing random \"code\" execution. \nMoreover, CSV files may contain arbitrary system commands that will be executed on the machine where you are opening the file."},{"question":"how to list disks, partitions and filesystems in linux?","response":"For managing block devices on a system, several tools are available such as fdisk -l, parted -l, and notably, lsblk, which is considered quite handy for listing block devices. \nAdditionally, the df command allows quick inspection of the file systems, although it does not display the file system type. \nThe UUIDs is useful for boot scripts and configurations like \/etc\/hdparm: `$ sudo lsblk --output NAME,FSTYPE,LABEL,UUID,MODE NAME FSTYPE LABEL UUID MODE sda brw-rw---- \u251c\u2500sda1 ntfs WinHyperX 2D6BFC4E0CDCFAD8 brw-rw---- \u251c\u2500sda2 ext4 HyperX ef761208-bab3-4a26-87d2-ed21a7f5a1bb brw-rw---- \u2514\u2500sda3 swap 74259007-a80b-4866-b059-0bdbe6331040 brw-rw---- sdb brw-rw---- \u2514\u2500sdb1 ext4 4TB 91e32977-0656-45b8-bcf5-14acce39d9c2 brw-rw---- sr0 brw-rw---- mmcblk0 brw-rw---- \u2514\u2500mmcblk0p1 exfat 9C33-6BBC brw-rw----`."},{"question":"how much should i be using let vs const in es6?","response":"The recommended practice in programming is to use constant declaration keywords like const, final, or readonly, whenever it's possible to promote immutability and reduce bugs related to unexpected variable changes. \nFor variables that won\u2019t be reassigned, such as non-array and non-object data types, const is considered a good choice. \nIt's essential to make liberal use of const to promote more robust coding, especially in areas where its use makes sense. \nHowever, when dealing with mutable entities like objects or arrays, let might be the better option, given that the properties of these types can still be altered even when defined with const. \nFor code readability and understanding, it's suggested to limit the use of let to short-lived variables with limited scope and without subsequent changes after their initial assignment, while reserving const for values constant across the module, and var for ambiguously variable names or those that aren't suitable for let. \nFinally, use const by default in ES6, and let only when reassignment is necessary, aligning closely with the language specification's intent."},{"question":"windows azure vs amazon ec2 vs google app engine","response":"Google App Engine (GAE) is positioned higher within the platform as a service stack compared to AWS and Azure. \nIt does not offer a static IP and has some limitations that may result in being filtered or blocked. \nOne of the consequences is the inability to set up site-specific HTTPS certificates. \nNevertheless, it operates differently by dynamically loading and serving pages, helping to maintain low costs. \nOn the other hand, AWS and Azure provide a static IP and a dedicated VM, which allows for functionalities like HTTPS certification and relational storage support. \nThey can also handle longer tasks beyond GAE's 30-second CPU processing limit. \nDue to these differences, AWS and Azure may be more suitable for customer bases in countries with internet restrictions or for tasks requiring a static IP, DNS setup, relational databases, or longer processing times."},{"question":"how secure are the fido u2f tokens","response":"U2F can use an encrypted channel with public key cryptography, which ensures that only the correct server can receive the one-time token. \nThis security feature means that if a U2F device is used on a phishing site, it will not release the token, effectively preventing unauthorized access. \nThe design also includes measures to prevent tracking across multiple services by avoiding the disclosure of using the same device on different sites. \nU2F is considered secure and is currently the best option due to the process of standardization it's undergoing, along with significant industry support and adoption. \nThe FIDO specification outlines that during online service registration, a user's device will generate a new key pair, keeping the private key and registering the public key with the service. \nAuthentication involves the device proving it holds the private key by signing a challenge. \nThis signing process is enabled only after the user unlocks the private keys locally on the device, done through secure methods like fingerprint scanning, entering a PIN, using voice commands, inserting a second-factor device, or pressing a button."},{"question":"how to fill 90% of the free memory?","response":"To fill \/dev\/shm, one approach is to use the dd command. \nUsing ramfs is another method if it can be mounted and a large file copied to it. \nFor systems without \/dev\/shm or ramfs, writing a small C program to perform a large malloc based on an input value could be a solution. \nBooting Linux with a mem=nn[KMG] kernel boot parameter is another option to run with specific memory restrictions (refer to linux\/Documentation\/kernel-parameters.txt for details). \nThe use of ulimit can help to restrict the allocatable memory for testing processes under memory constraints. \nRunning a virtual machine (VM) with limited memory is recommended for more efficient software testing in low memory situations. \nFinally, creating a ramdisk or using tmpfs to fill RAM for testing is also an effective technique."},{"question":"how do i get the md5 sum of a directorys contents as one sum?","response":"For the file contents within a tree, $ find -s somedir -type f -exec md5sum {} \\; | md5sum. \nIf you need to be able to detect that anything in a tree has changed, not just file contents, ask tar to pack the directory contents up for you, then send it to md5sum: $ tar -cf - somedir | md5sum. \nTo identify differences between two directories, a command such as diff -qr dir1 dir2 can be utilized. \nMd5deep is a utility that offers recursive examination of directories and comparison of file hashes; you can hash every file recursively with > md5deep -r -l . | sort | md5sum d43417958e47758c6405b5098f151074 *. \nFor moderate and extremely large volumes of data, certain command lines involving 'find .-xdev -type f -print0 | LC_COLLATE=C sort -z | xargs -0 cat | md5sum -' for moderate volumes and 'find .-xdev -type f -print0 | LC_COLLATE=C sort -z | xargs -0 tail -qc100 | md5sum -' for large volumes, can be employed. \nFor faster checksum calculation of large directories, consider GNU Parallel: find -s somedir -type f | parallel -k -n 100 md5 {} | md5, maintaining order with -k flag and adjusting -n parameter for optimal runtime. \nFor fast and consistent hashing of directory contents, tar remains the preferred method, especially when additional parameters are applied to control for metadata differences."},{"question":"do aspx pages need to be compiled?","response":"Yes, if you utilize ASP.NET precompilation of your ASPX\/ASCX files or not it is still being compiled."},{"question":"whats the meaning of a dot before a command in shell?","response":"A dot in that context means to \"source\" the contents of that file into the current shell; it is shorthand for the bash built in source, that is, it is the same as the source code. \n\nIn other words, . (source or dot operator) means read and execute commands from the filename argument in the current shell context."},{"question":"how can i add a signature .png to a pdf in linux?","response":"uPdf is a tool that can be used to insert an image, such as a digital signature, into a PDF document; a PNG image with a transparent background works best. \nXournal is software with a nice UI that allows adding text and images to PDF files, although there are some limitations in handling text from native PDF forms. \nIf you are familiar with Gimp, it is suggested as an alternative for signing documents by using several steps such as applying a threshold, converting white to alpha, and merging layers to create a signed PDF. \nOkular PDF viewer offers built-in annotation features that enable users to draw their signature directly on the PDF. \nScribus 1.5.5 is a free program on Debian that is a simple way to import PDFs and adding images or text before exporting as a new PDF. \nLibreOffice Draw can open PDFs to insert images like signatures, then scale and place them accordingly, with the final step being exporting the document as a PDF. \nXournalpp (xournal++), an improved version of Xournal, is recommended for stability and fewer bugs, and the suggestion includes a link to its repository for users to access."},{"question":"why am i not getting notifications when someone texts me?","response":"This doesn't seem to be an issue with your phone's settings, rather the conversation is marked as \"Do Not Disturb\"."},{"question":"how did tech-supportcenter phishers trick google?","response":"The scammers likely gained control over third-party advertiser systems, exploiting their redirect chains to misdirect users to fraudulent sites. \nAdvertisers seeking to track clicks and validate ad billing often employ ClickURLs, which proceed to the legitimate destination despite displaying a different, more presentable DisplayURL, a practice susceptible to phishing exploitation. \nAccess to a brand name in an AdWords account comes from a whitelisted ad agency because it's difficult to gain this access without the help of a trusted agency."},{"question":"how do you sort du output by size?","response":"If you have GNU coreutils (common in most Linux distributions), you can use `du -sh -- * | sort -h`, which tells sort that the input is the human-readable format. \n If you are using an older version of Mac OSX, you need to install `coreutils with brew install coreutils`, then use `gsort `as drop-in replacement of `sort`. \nNewer versions of macOS (verified on Mojave) support `sort -h` natively."},{"question":"can ssl traffic be sniffed?","response":"Technically, you could sniff the traffic, but it would be encrypted and useless to you. \nThis is because the SSL prevents such snooping and you would need the certificate trusted by the device to intercept and decrypt it. \nHowever, by exploiting the FREAK TLS vulnerability, it is possible to inject data into SSL negotiations and make the decryption of traffic via a man-in-the-middle possible. \nAlso, if you want to decrypt the traffic between your client and the device, then it is possible with a proxy."},{"question":"how to check which gpu is active in linux?","response":"The command 'nvidia-smi -L' is used to display a list of GPUs installed on a computer."},{"question":"why is git not found after installing os x lion?","response":"When encountering the issue of Git not being found after installing OS X Lion, it's possible that the Git installation was done through MacPorts or Fink. \nLion (and even Snow Leopard) didn't include Git by default, so the way Git was installed might not have survived the upgrade. \nDespite this, Git is still present on your system, and the problem likely lies in the PATH configuration. \nCheck if \/usr\/local\/git exists, and if it does, consider adding it to your $PATH or creating a symlink within a directory already in your PATH. \nThe disappearance of Git from the $PATH could be the root cause of the issue."},{"question":"how can i get a count of files in a directory using the command line?","response":"The most accurate command to count all files, including dot files, in a directory is `ls -Aq | wc -l`. \nThis command option disregards the special entries '.' and '..'. \nIf there's no need to count the dot files, use `ls -q | wc -l`. \nThe `-q` option in the `ls` command replaces nongraphic characters with a '?' mark, ensuring each file or directory is represented by a single line. \nTo get similar one-line output directly from `ls` without piping the output, one would have to use the `-1` option."},{"question":"do network switches have ip addresses?","response":"While ip addresses are needed for switch management, using a public IPv4 address for switch management is wasteful use of a valuable and limited resource. \nIt is recommended not to assign management addresses to general VLANs but rather to use a dedicated VLAN for management, typically employing private IPv4 addresses. \nIn exceptionally large networks where even private IPv4 addresses might be considered scarce, the use of IPv6 for management could be contemplated, though the compatibility of hardware with IPv6 should be taken into consideration."},{"question":"how to get only files created after a date with ls?","response":"Use: -mtime +1 instead of -mtime -1. \n\nAlternatively, use: ls -ltr | grep \"`date | awk '{print $2\" \"$3}'`\"."},{"question":"why igp is used in mpls?","response":"An IGP exchanges routing prefixes between gateways\/routers. \nWithout a routing protocol, you'd have to configure each route on every router and you'd have no dynamic updates when routes change because of link failures. \nFuthermore, within an MPLS network, an IGP is vital for advertising the internal topology and ensuring connectivity for MP-BGP inside the network."},{"question":"how does changing your password every 90 days increase security?","response":"The necessity of password changes depends on the context and what is being protected. \nThey are not a comprehensive solution and negatively impact usability but could make sense in certain scenarios. \nThey do address issues that could arise if an attacker obtained password hashes and limit the damage if an old backup is lost. \nWithout password expiry, there is potentially an unlimited time window for attackers to attempt dictionary, brute-force, or common password attacks. \nExpiration policies can help prevent issues for people who reuse passwords across different systems. \nIt forces the user to come in contact with a possibly inactive account; they may not know whether their account has been breached otherwise. \nPassword resets can signal to users the importance of password security. \nAutomatic expiration can also safeguard against non-compliance and may provide a limited time for attackers to break a password before it becomes invalid. \nSome argue that if strong passwords are used, frequent changes are less necessary. \nOthers say that it is mainly a compliance-driven requirement with marginal security benefits, and is not something you should rely on for security. \nRecently, NIST's new guidelines recommend against \"expiration without reason\". \nSome maintain that password expiration policies are considered bothersome to users, are ineffective in mitigating brute-force attacks because only in an intermediate, balanced scenario would a password change make any difference. \nFurther, changing passwords could be seen as increasing the security risk through use of post-it notes, increasing numbers or shift-numbers for ordinary users. \nA study by Microsoft found that forcing users to change their password every six months isn't very useful: at least 41% of passwords can be broken offline from previous passwords for the same accounts in a matter of seconds, and five online password guesses in expectation suffices to break 17% of accounts, concluding that the evidence suggests it may be appropriate to do away with password expiration altogether."},{"question":"is there a way to get google calendar reminders to act like alarms?","response":"For those who rely on Google Calendar and want effective reminders, it's recommended to check Calendar Event Reminder, which can be set to persistently notify you until you address it. \nFor customizing notification sounds, Android users can go to calendar settings > General Settings and select an mp3 file as the tone. \nThere's also a mention of a free app called Calendar Event Reminder that can be found on the Google Play Store."},{"question":"how do i view source in the android browser?","response":"Using JavaScript's alert method is a way to return the source code of a webpage. \nAdditionally, one might install an app called View Web Source to view the source while browsing on a mobile device. \nFor capturing source code in a development environment, it's useful to install Android Developer Tools, which come with adb. \nIf debugging is the primary goal, installing a user agent switcher extension for Firefox or Chrome on your desktop is beneficial; this allows viewing the mobile version of a site with desktop debugging tools. \nTo view a source and modify it live, the Weinre remote debugger can be handy. \nChrome and Firefox on Android support viewing the page's source by simply prefixing the URL in the address bar with \"view-source:\". \nOpera browser users can type \"server:source\" in the address bar to view the source code. \nChrome has a remote debugging facility that enables viewing Javascript-modified sources on a PC when a phone is connected via USB. \nIf an app hasn't been updated, trying VT View Source is an alternative. \nCreating a new bookmark (bookmarklet) named \"View Source\" on Mobile Chrome can simplify the process of viewing a page's source code."},{"question":"why do people use c if it is so dangerous?","response":"C provides performance that languages like Java and Python do not offer, making it attractive for high-performance computing. \nIt is a much easier language to implement due to its small size and performs adequately even in weak environments, which is beneficial for embedded systems development. \nAdditionally, the \"safer\" languages generally perform slower, as \"safety\" costs speed. \nC's ubiquitous API interface makes it a common library for other languages, facilitating cross-platform application development. \nYour average C program can be made reasonably secure with reviews and iterations. \nAny tool can be used dangerously, including programming languages, so learning C can help you to recognize when it is the right tool for the job at hand. \nHistorical reasons also play a part, as older, long-running projects often use C. \nC is desirable for its speed and size and is compatible across various environments because it compiles to machine code. \nFor problem-solving, having a diverse set of programming skills is crucial, and C holds an important position due to its generality, small footprint, and compilation to machine code. \nIn mission-critical systems, C is often considered safer due to its simplicity and direct control over hardware. \nMoreover, C is used to create other programming tools that aim to be less dangerous."},{"question":"username and\/or password invalid - why do websites show this kind of message instead of informing the user which one was wrong?","response":"There's a generic security principle which says you shouldn't provide unsolicited information to unauthorized users; you don\u2019t want someone to know whether it was the username or password that was wrong so that you are not as susceptible to brute-force or dictionary attacks. \n\nSometimes applications are also unaware whether the UserName or Password is wrong due to the way they have the authorization routine programmed. \n\nProviding ambiguous answer is also useful to prevent a user enumeration attack, where a company is trying to gather valuable information on whether their customers have accounts with a competing web shop."},{"question":"run applescript from bash script","response":"To integrate raw AppleScript into your commands, you need to enclose the AppleScript within < \/proc\/sys\/vm\/vfs_cache_pressure; decreasing vfs_cache_pressure causes the kernel to prefer to retain dentry and inode caches. \n\nIncreasing vfs_cache_pressure beyond 100 causes the kernel to prefer to reclaim dentries and inodes. \n\nFor an ext4 system, you could disable journaling entirely; to stop disk reads from triggering disk writes, mount with the relatime or the noatime option as when you read a file, the \"last accessed time\" metadata for that file is usually updated, and the noatime option will disable that behavior."},{"question":"need a cli to check the sha256 hash of a file","response":"To see the available command line options for the `openssl sha` function, you should execute the command: `openssl sha -help'. \nIf you're using the `shasum` command instead, you can generate the SHA checksum for a file using: `shasum -a 256 `. \nTo compare a SHA checksum with the hash of a file, use the command shasum -a 256 -c <<<'_paste hash to compare here_ *_path to file goes here_'."},{"question":"throttle the download speed of wget or curl while downloading","response":"Both wget and curl support limiting your download rate, for example, curl --limit-rate ; where --limit-rate=20k will limit the retrieval rate to 20KB\/s. \n\nYou can stop wget and restart it with a different speed; when downloading multiple pages at once, the --wait option makes wget wait a certain number of seconds between requests. \n\nIt is possible to limit the traffic rate using the tc and netem tools, but this will limit the rate for the network interface of the computer; use Token Bucket Filter (TBF) to limit output."},{"question":"how should i behave as a developer in a project thats headed for failure?","response":"Consider working with the manager and seeing if there are any parts or features of the app that can be excluded. \nCommunicate your concerns in the most concise and non-confrontational way possible up the management ladder. \nHowever, when doing so summarize the risks, but do not impose your conclusion on them, focus on your job of assessing and communicating the situation. \nLeave drawing any conclusions up to whomever reads what you've written, if anyone does read what you've written. \nHelp identify the biggest problem areas and try to provide answers as to why they are, and make just a few polite suggestions for improvement. \nThis could include something like a tentative list of known issues that you would want to fix. \nView this as a chance to hone your systematic thinking and communication skills by clearly comprehending and outlining the issues and potential missed opportunities. \nAlso, remember to keep a paper trail of everything, including a diary, IM conversations and saved emails. \nAt some point you are going to have to focus on yourself, when you do try to find any personal successes that you can and focus on your own personal excellence and personal metrics. \nAlso, make sure you have enough proof that you did everything required of you and remember to stay positive and be ready to defend all of your code. \nHowever, still try to be proactive about finding a new way to achieve success for the project and think about how you can propose some alternatives. \nAssuming ownership of the project can allow you to contribute positively, learn significantly, and collaborate with peers to mitigate the project's downfall. \nFinally, it's helpful to analyze your project using quantitative metrics, clearly explain their importance, and provide actionable insights for improvement."},{"question":"what is the difference between data and storage on an iphone?","response":"There's no difference, other than the storage capacity."},{"question":"how do i grep recursively through .gz files?","response":"When dealing with compressed files, employing \"shopt globstar\" is necessary for iterating over such files. \nTo recursively grep in .eml.gz files within the current directory, one should utilize the command 'find .-name *.eml.gz -print0 | xargs -0 zgrep \"STRING\"', while escaping the first * so that the shell does not interpret it. \nIf you have zgrep available, just use 'zgrep -irs your-pattern-goes-here the-folder-to-search-goes-here\/' to search. \nOtherwise, you can apply the find command combined with zcat and grep for each file."},{"question":"where are android alarm tones stored?","response":"Default ringtones are usually stored in the directory \/system\/media\/audio\/ringtones on your device."},{"question":"a large part of my code has a major design flaw. finish it off or fix it now?","response":"Aim to complete the current version, ensuring it's functional, even if that means scaling back the initial goals to essential features. \nOnce you have a working prototype, you can consider rewriting or improving the version as needed, using the first iteration as a learning experience and maintaining motivation. \nSimilarly, if flaws in your work are not critically problematic, finishing the initial version and addressing the issues later after receiving feedback is often beneficial."},{"question":"is there a keyboard shortcut to move a window from one monitor to another?","response":"Moom is an application that provides tools for window management, which includes the ability to create keyboard shortcuts for various window movements."},{"question":"can you connect airpods and headphones at the same time mac?","response":"While it is possible to use multiple different types of Bluetooth devices simultaneously, such as a mouse, keyboard, and headphones, you cannot use more than one of the same type of device at the same time. \nHowever, it is possible to share audio from a MacOS Macbook Pro with two or more Bluetooth headphones by creating a Multi-Output Device through the Audio Midi Setup in Utilities. \nThis setup will allow sound output through both headphones, although you will no longer be able to adjust the volume from the Macbook directly, but rather individually on each headphone."},{"question":"is exploit-free software possible?","response":"Creating exploit-free code is a challenging process that becomes more complex with increasing software complexity. \nProducing high-quality code devoid of vulnerabilities is possible, yet doing so would require substantially more resources. \nWhile concepts of exploit-proof software are theoretically feasible, the economic and practical limitations make them currently out of reach. \nHowever, in the distant future, there is some hope to make it eventually possible to write exploit-free code as long as all the used algorithms are provable. \nThe prevailing software development environment, which includes performance priorities and fundamental system flaws, makes the likelihood of exploit-free code in the near future quite slim. \nNonetheless, small and trivial software has the potential to be without bugs or exploits, as their simplicity allows for a more predictable and secure response to any inputs. \nEven though creating entirely secure software is feasible, the absence of necessary economic incentives and regulations significantly hinders its realization. \nIf the security of a software system is mathematically validated, the potential for exploit-free software exists, although such efforts are rare and complex. \nWhile proving software correctness through mathematical proofs is possible, there are hurdles, like hardware vulnerabilities and unpredictable environmental factors, that must be addressed. \nSoftware can technically be free of exploits, highlighting the utmost importance of the mathematical foundation behind it, despite the inherent difficulties. \nLastly, while it is possible for specific cases (programs) to be almost exploit-free, this is not the case in general."},{"question":"how do i connect two monitors to my thunderbolt?","response":"To connect multiple displays to a Thunderbolt MacBook using Thunderbolt, Apple's Thunderbolt Display is known to be compatible. \nThere's also the option of the Matrox DualHead2Go Digital ME, which enables the connection of two external DVI displays. \nAdditionally, Zotac offers an adapter that can split a regular or mini DisplayPort into two HDMI ports."},{"question":"what is the difference between: rooting, jailbreak, rom, mod, etc.?","response":"Rooting and Jailbreaking refer to the same thing in the computational aspect of a smartphone, describing the process of obtaining administrative privileges, with rooting typically associated with Android devices and jailbreaking with iPhones. \nThis administrative access allows a user to override the device's default settings and permissions, enabling them to alter or delete critical system files. \nThe terms ROM, Mod, and Firmware are often used interchangeably within the Android community to refer to customized versions of the Android operating system tailored for specific devices. \nA mod or ROM in the smartphone world is akin to different Linux distributions, such as Ubuntu or Fedora, on PCs. \nIn the context of Android, the ROM refers to the internal flash memory where the core system resides. \nJailbreaking involves bypassing a bootloader's restrictions to gain admin privileges, whereas rooting solely concerns acquiring these privileges. \nFlashing a ROM generally refers to installing or updating the device's mobile operating system."},{"question":"mail app keeps popping up in the background in mac os mojave","response":"To correctly set up Gmail in the Mail app, it is recommended not to use the Gmail portal, but rather to generate an app password from Google's website and proceed with a manual setup using the standard email portal in the Mail app. . \nAnother effective solution is to remove the Google account from Mail and to configure the Gmail address as a normal (IMAP) email account. . \nAlso, to address issues with the Mail app, updating the operating system to macOS Big Sur is advised as it resolves the issue more effectively than other workarounds."},{"question":"rsa vs. dsa for ssh authentication keys","response":"Both DSA and RSA with keys of equal length are nearly identical in difficulty to crack. \nAccording to some opinions, RSA is the recommended choice because it is generally more versatile, DSA has speed advantages in certain operations but is restricted by key length limitations, is not as broadly supported and is slower for validation. \nOn the client side, RSA and DSA offer similar security protection for the same key size. \nRSA is favored over DSA and ECDSA because it does not require a secure random number generator for creating signatures. \nFrom a security perspective, Ed25519 is considered the strongest, with RSA as the next best option if Ed25519 is not available, while DSA and ECDSA are not recommended at all. \nThe problem with ECDSA is that NIST curves are hard to implement correctly. \nThe choice of algorithm might be less about mathematical strength and more about practical use cases and performance and it doesn't seem to matter if you are using the random number generators that come with pretty much any modern computer. \nDSA is discouraged and has been disabled by default in OpenSSH 7.0 due to its weaknesses."},{"question":"can two bluetooth headphones connect to one iphone?","response":"It is possible to do this in several ways: you can use a Bluetooth splitter; the JBL Synchros E40BT over the ear headphones sold at Crutchfield allow you to pair a \"secondary\" set to the first; and you can connect two SkyGenius headphones to one iPhone without any splitter using a function they call \"ShareMe\". \n\nApparently, Apple is rolling this capability out in a feature called Airplay."},{"question":"why wont my ipad send text messages?","response":"Only an iPhone with cell connection can send SMS messages, though users with iMessage accounts can receive text messages; hence, Apple iPads cannot send SMS messages to non-Apple devices nor an iMessage to a phone number not registered with iMessage."},{"question":"convince apt-get *not* to use ipv6 method","response":"One approach is to add a line in the \/etc\/hosts file to override the relevant addresses. \nOne workaround is to set up a DNS proxy server that drops IPv6 responses. \nAlternatively, configuring the gai.conf file can be used to influence how applications that use getaddrinfo perform DNS and IP networking to prefer IPv4 or IPv6. \nWhen running apt-get, adding `-o Acquire::ForceIPv4=true` forces the use of IPv4, and this setting can be made persistent by creating a configuration file in \/etc\/apt\/apt.conf.d\/."},{"question":"is it common to allow local desktop and\/or active directory admin access and rights for developers in organizations?","response":"Yes and no: in a large firm developers are one of the groups that were approved for local admin access; with smaller companies, people always had local admin rights. \n\nMost commonly, developers have admin access to their own machines, and in some organizations, it's common to give developers complete control over their development workstation, to the point of enabling them to install their own OS on it, while in some organizations, all development must be done in an airgapped environment, where no electronic devices can be taken into or out of. \n\nFor larger organizations, it is absolutely not common for developers to have full rights to anything other than development specific resources, although others say the only choice is to have one choice, give developers effective admin access. \n\nA cynical view is that allowing and disallowing local admin access is common, and it is only typical to have local admin access denied to devs in companies where either the devs are so useless\/malicious they abuse those privileges, or where the \"IT and Security\" department is run by clueless knee-jerk idiots who view everyone not in their inner circle as an obvious security threat out to make them look bad."},{"question":"is public wi-fi a threat nowadays?","response":"Public WiFi remains unsecure and without the use of protection like VPNs, it is open to various risks. \nBy being on the same local network as others, you could be exposed to potential attackers. \nAny public network connection you make exposes you to certain risks, and even with tools like VPNs, local network threats remain if user errors happen. \nThere are numerous threats associated with public WiFi, such as Man in the Middle attacks, unencrypted networks, malware distribution, snooping and sniffing, and malicious hotspots. \nEven with technologies like HTTPS or VPN, leaks can occur, and these technologies only provide a false sense of security. \nFinally, public WiFi hotspots are inherently untrustworthy, but so is the wider internet, where various entities may eavesdrop on your connections."},{"question":"how to view the output of a running process in another bash session?","response":"Create a named pipe using mkfifo and write to that pipe. \nDoing this clears the content once it is read, which means the output isn't preserved. \nAlternatively, you can capture all output by writing to a file, which allows for later analysis and ensures that the output is preserved. \nAdditionally, if you intend to monitor an existing process, you can employ the strace tool with specific parameters to observe the output related to system write calls. \nIt's worth noting, however, that you might need to execute 'strace -p1234 -s9999 -e write' with root privileges, especially if the process has different user permissions or specific security settings. \nMoreover, you can access the output via the proc filesystem using a command like tail -f to follow the standard output or standard error."},{"question":"is a windows installer that doesnt require admin rights dangerous?","response":"Installers that do not require admin rights are generally considered less dangerous than those that do because they cannot make system-level changes. \nSuch installers can, however, still be dangerous if they are from an untrusted source, potentially allowing the execution of malicious code. \nThey allow user-level code modifications and could enable silent updates or tampering. \nNonetheless, when compared to installers requiring admin rights, those that do not are deemed safer because they are restricted to user-level access and cannot affect the entire system or other users."},{"question":"how does shutterstock keep getting my latest debit card number?","response":"Account Updater is a service where, when card issuers like Visa issue newly updated cards, they provide the new card numbers and expiry dates to the service. \nMerchants who participate can query their stored credentials to receive updated card information from the Account Updater service. \nShutterstock, as a participant, gets updated card details when a customer's card expires or is replaced."},{"question":"how to see process created by specific user in unix\/linux","response":"To view only the processes owned by a specific user, use the following command: top -U [username]. \n\nYou can try: ps -fp $(pgrep -u )."},{"question":"who logged in last linux?","response":"The command \"last\" reads from a file, typically \/var\/log\/wtmp, and lists successful login attempts, showing the most recent first. \nTo find out the last time a file was updated, you should use the \"stat\" command. \nAdditionally, the \"lastlog\" command is noted for its ability to filter user logins within specific date ranges."},{"question":"write to ntfs-formated drives on yosemite","response":"All recent OS X releases, including Yosemite, have native support for NTFS. \nHowever, for those seeking additional solutions, Paragon NTFS is a commonly used third-party application. \nAlternatively, there is a simplified process with a single installer called Hackintosh Zone, providing a free NTFS driver specifically designed for Mac OS X."},{"question":"apple id has not been used?","response":"To utilize your Apple ID with the App Store for the first time, ensure that you set both the billing and shipping addresses in your account information. \nAdditionally, initiating iTunes on a Mac and signing in through the account menu can help resolve the issue. \nHowever, patience may be required as it might take multiple attempts."},{"question":"change the python3 default version in ubuntu","response":"There are a number of approaches to changing the Python3 default version: one is to create a symlink for `\/usr\/bin\/python3`. \nAn alternative way to change the simbolic link by `ln -sf python3.6 python3 inside \/usr\/bin`. \nIf you have multiple version of Python in your system, you can update the symbolic link of Python inside `\/usr\/bin\/`."},{"question":"why cant the it industry deliver large, faultless projects quickly as in other industries?","response":"In general, the software industry faces challenges due to a lack of standardization and work item breakdown. \nOne significant obstacle impacting performance and productivity is bureaucracy, which is guaranteed to hinder progress. \nAdditionally, the failures in the IT industry are often attributed to its immaturity, the absence of detailed standards, and the lack of standardized components and modules."},{"question":"firmware-iwlwifi has no installation candidate?","response":"To incorporate the firmware-iwlwifi package on a Debian system, amend your \/etc\/apt\/sources.list file to include \"non-free\"."},{"question":"why does my iphone send text messages back to me?","response":"If you are using iMessage it could be that a number or email in the group is somehow associated with your contact information."},{"question":"what is the purpose of the hash command?","response":"The hash command is how you interact with that system; you can also use it to remember executables in non-standard locations, and use it to un-remember file paths. \n\nIt can be used to easily detect whether a command is available: CMD=gzip if hash bzip2; then CMD=$_ fi."},{"question":"why jsp is used instead of servlet?","response":"The main advantage of JSP is that it's easier to code and read when you are creating a dynamic HTML front-end."},{"question":"how do i review my own code?","response":"The Personal Software Process technique could effectively improve the quality of your work by utilizing historical defect data to develop targeted review checklists. \nAdditionally, employing code review and metric tools, although not a replacement for human expertise, can offer insights into potential areas of poor design within your code."},{"question":"how can i skip the trash when deleting a file?","response":"A secure method to erase files on a Mac involves the Terminal command rm, combined with the -P option, which overwrites files three times with differing byte patterns before deletion. Another approach is using the Trash Without application from the Mac App Store. \nAn application, Trash X, exists with features that allow instant deletion or shredding of files and folders, with the option to perform actions on selected disks. \nFor automation, you can create an Automator service or application to execute the rm command, potentially adding a -P parameter for extra security; this custom solution can also include confirmation prompts and auditory feedback. \nThere's also Skip The Trash, a free tool with features like regular and admin-level deletion and integration into Finder's context menus. \nFor users preferring keyboard shortcuts, the combination of \u2318 Command\u2325 Option\u232b Delete can permanently delete files after receiving a warning prompt. \nAdditionally, within OS X El Capitan, you can modify the \"Move to Trash\" action to \"Delete Immediately\" using the alt\/option key in the File menu."},{"question":"what is the difference between mobile data and roaming?","response":"Mobile data refers to accessing the Internet via mobile signals. \nData roaming occurs when your mobile phone uses data on a mobile network other than your home network, commonly while you are abroad. \nThis activity is characterized as using mobile data outside your registered region, which means you are roaming your data. \nIt's important to be aware that higher charges often apply when Data Roaming is active."},{"question":"macbook unplugged from external monitor thinks its still the secondary desktop","response":"If your MacBook, after being unplugged from an external monitor, still thinks it's the secondary Desktop, you can use the keyboard shortcut Command + Brightness Up, which serves as the Detect Displays shortcut in Lion. \nAlternatively, you can navigate to Displays in System Preferences, hold down the \u2325 Option key, and the Gather Windows button will transform into Detect Displays. \nIn cases with Mavericks, changing the Rotation setting can prompt the OS to recognize the absence of the external monitor. \nAdditionally, putting your MacBook to sleep and waking it up immediately can effectively resolve the problem."},{"question":"how to fully backup non-rooted devices?","response":"For 4.0+ devices there is a solution called \"adb backup\" but this only works for apps that do not disallow backup. \nThere is an application called Simple ADB Backup which backs up your Android phone from the desktop and does not require root. \nFor a more complete backup scenario, it is suggested to do NANDROID backups (or adb backup + special backup solutions for sms\/call-logs\/contacts) plus custom ROM updates. \nAndroid includes a built-in way to back up and restore the contents of your phone or tablet, and all you need is a computer and a device running Android 4.0 or newer. \nFor a dev restore, you want a Nandroid, however, a full backup depends on what you want to recover from."},{"question":"how do i attach a terminal to a detached process?","response":"You cannot send input to a process that has ? as controlling tty when you run a ps x check. \n\nYou can try to write to this process using \/proc. \n\nWith zsh you can use &! to actually detach it, then send it back into the foreground with fg and then it will read input again."},{"question":"what is the difference between console and gui application?","response":"The major difference is the design of the user interface."},{"question":"os x yosemite xcode update stuck on waiting","response":"If you encounter the issue of the OS X Yosemite Xcode update being stuck on \"Waiting,\" one option is to download and install the Xcode DMG directly from the Apple Developer Account website if you have one such account. \nAlternatively, consider clearing your cache and restarting the download from the App Store. \nHowever, some users have found that patience is key, and waiting for some time eventually resolves the problem. \nAnother approach involves moving Xcode from your Applications folder to the trash bin, which has worked for some users. \nIf these methods do not resolve the issue, you can open the App Store, initiate the update, and then click on \"Store\" in the top-left menu, choose \"Check for Unfinished Downloads,\" enter your Apple ID and password, and the update process should proceed smoothly."},{"question":"where are efi variables stored?","response":"EFI settings are retained in NVRAM, which means swapping hard drives won't impact the EFI configuration."},{"question":"how do i read from \/proc\/$pid\/mem under linux?","response":"In Linux, one can view a $pid process's memory as it maps identically in \/proc\/$pid\/mem and in the live process itself. \nMemory files, such as those used with the 'xxd' program, permit reading at specific offsets, which can be useful for examining particular sections like the heap."},{"question":"is my developers home-brew password security right or wrong, and why?","response":"Complicated code does not offer better security and inventing your own falls under that category. \nDesigning crypto algorithms and implementing them correctly and securely is very hard; you should only do this if you know what you are doing. \nThere are plenty of flaws in the algorithm although weak hashing protocols are used. \nHere are some of the issues found: the algorithm is nonsensical; you use things which attackers know; mt_rand is not secure as a random number generator; a single 31-bit number is not secure; it's not a good idea to use crypt on the username; shuffling an MD5 hash is not a good idea; and the variable names are incorrect. \nIn the age of cheap massively-parallel GPUs, this is too weak for modern use. \nIt is a good idea to demonstrate how many attacks per second can be executed with this algorithm versus prevailing standards. \nIt is better to use a more well-documented scheme. \nUse public vetted high-level libraries like BouncyCastle instead of a home-brew of low level crypto-primitives. \nGood security means that everyone can know how the system works and it is still secure."},{"question":"how can i see which switchports are not in use?","response":"You could scrape the output (or grab it with SNMP) and use standard UNIX tools to parse it. \n\nRecommended commands to use are: sh int | i (FastEthernet|0 packets input); sh int | inc line protocol is|Last input; show interfaces status; sh int | i (Ethernet| 0 packets input); sh int | i ( 0 packets input)|proto|Desc; or sh int des | ex up."},{"question":"how do mobile carriers know video resolution over https connections?","response":"When it comes to streaming video, it is crucial to have consistent bandwidth to maintain stream quality, and to manage this, streaming sources mark their data packets to signal to carriers that the content is streaming video. \nAdditionally, a technology known as Dynamic Adaptive Streaming over HTTP (DASH) is often utilized, which adjusts the video quality in real-time based on the available bandwidth to ensure continuous playback without buffering."},{"question":"how to kill a runaway cat?","response":"On the Linux virtual console just switch to another one ((Ctrl +)Alt + Fx); or try Ctrl-C, you can also try sending SIGQUIT with Ctrl-\\.. \n\nThe following command is for this: tmux option c0-change-interval and c0-change-trigger."},{"question":"have backticks (i.e. `cmd`) in *sh shells been deprecated?","response":"Backticks are not technically \"deprecated\" because they are still supported, even though they have been superseded. \n\nThe backticks (`...`) are the legacy syntax required by only the very oldest of non-POSIX-compatible bourne-shells and $(...) is POSIX and preferred, so avoid backticks unless you specifically require compatibility with an original non-POSIX Bourne shell."},{"question":"why are chips safer than magnetic stripes?","response":"The chip on a card cannot be cloned because it securely stores a secret number which it uses to prove its knowledge without revealing it. \nWith this level of security, it's hard for an attacker to replicate the card, as the card can perform cryptographic operations that require knowledge of a well-protected key. \nThe chip contains information that it never discloses, enabling it to authenticate without actually providing the secret. \nSo, a vendor is unable to simply duplicate the chip when it is used because it does not reveal its secret piece of information. \nSo, even if a chipped card is used at a compromised machine, it does not enable the perpetrator to conduct future fraud with the card information since the response provided by the chip for verification is unique to each transaction. \nIn the event of a stolen chip and PIN card, the chip alone is not enough for fraudulent use without the PIN."},{"question":"network neutrality, how does it actually work, technically speaking?","response":"Throttling actions can occur on a particular pattern of traffic from Layer 3 to Layer 7, implemented in many ways, whether it is lowering the priority of the traffic in the queue, imposing absolute bandwidth limitations, reducing the share of overall bandwidth that the traffic has available to use, or outright blocking the traffic altogether; the throttling most often happens at the carrier that is near the client, but can potentially occur within any transit carrier or non-transit carrier."},{"question":"best practice: \u201dseparate ssh-key per host and user\u201c vs. \u201done ssh-key for all hosts\u201c","response":"Each user needs only one key as it is associated with that user, and maintaining a single key does not diminish security as long as that key remains private. \nUsing separate keys for different destinations does not inherently increase security from an authentication standpoint. \nNonetheless, if the same key gets compromised, the implications are broader as it would give attackers access to everything that the key is authorized for. \nSpecifically, in a worst-case scenario, with the same key across all hosts, a compromised key would give access to all systems, whereas, with unique keys per host, access would be limited to the system associated with the compromised key. \nAs a practice, when managing human users, it is sensible to allocate a single key per user, which simplifies access revocation and security management when users leave or change roles. \nConsiderations for using more than three or four keys include potential problems with SSH agents handling multiple keys and scenarios such as serving different clients, where it may be prudent to have a separate key for each client relationship."},{"question":"how do i root my android device?","response":"It is advised that rooting your device will probably void your warranty with both the carrier and the manufacturer. \nIt is important to note that there is no known method that will root all devices and no guarantee that any mentioned program or method will actually work. \nThe simplest way to root your device is via \"one click\" methods, most of which are developed for more popular devices."},{"question":"is saving passwords in chrome as safe as using lastpass if you leave it signed in?","response":"The security is largely equivalent between Chrome and Lastpass, as password managers, but LastPass provides cross browser support and Enterprise reporting, which will show users are using LastPass, that they have 2FA, and that they are using random passwords (or at least equally strong ones)."},{"question":"where should i put software i compile myself?","response":"It is recommended to compile your software and then create an FC package, which can be managed through a package manager like yum. \nPlacement for the compiled software can be in directories like \/opt or \/usr\/local, with a preference for isolation. . \nBy adding the executable's path to your PATH environment variable, the software's accessibility is facilitated without affecting other users. \nIf you intend to include the software in your $PATH, avoid \/usr\/local to prevent conflicts with distro-installed software, and consider using your $HOME directory as a location to prevent the need for superuser access. \nFor source code, \/usr\/local\/src is a proper directory, and using symbolic links for convenient management between versions is a common practice. \nWhen it comes to installation and removal, creating a simple rpm package or using Stow as a simple package manager is beneficial. \nSystem-wide installations can be made under \/usr\/local\/stow\/package-version using stow or in ~\/.local following the XDG standard if you do not have write permissions for \/usr\/local. \nAdhering to the Filesystem Hierarchy Standard (FHS), it's recommended to put binaries in \/usr\/local\/bin, source code in \/usr\/local\/src, and libraries in \/usr\/local\/lib. \nSome developers may opt for a personal setup, such as a custom directory within their home directory, adding that path to their environment variables like PATH, LD_LIBRARY_PATH, and PKG_CONFIG_PATH. \nSome say to use \/usr\/local for system-wide installations and \/opt for applications not trusted enough to be system-wide with per-app prefixes\u2014i.e. \/opt\/firefox-3.6.8, \/opt\/mono-2.6.7, and so on in Debian-like systems. \nThe decision to use \/opt or \/home\/username depends on whether you want the application to be available for all users or only specific users, respectively. \nLastly, the Filesystem Hierarchy Standard (FHS) specifies using \/usr\/local for applications compiled from source or \/opt\/ for third-party applications not supported by your operating system vendor."},{"question":"what is this symbol? \u238b (it is listed as menu shortcut)","response":"The symbol you're inquiring about, represented by a circle with an arrow escaping from it, is denoted as \u238b, and it signifies the Escape key on the upper left side of your keyboard."},{"question":"how to make `sudo` preserve $path?","response":"You can input `sudo env \"PATH=$PATH\" godi_console`. \nYou should also be aware of the `env_reset` option within `sudo`, which can be disabled in the `\/etc\/sudoers` file. \nAnother method to run a command allowing your `PATH` to be recognized by `sudo` is to use the syntax `sudo $(which your_command)`. \nSimilarly, you can use `sudo \"PATH=$PATH\" [your command]` without altering the `$PATH` variable itself. \nLastly, the command `sudo --preserve-env=PATH env [command]` can be used to override the `secure_path` settings."},{"question":"xfce how to lock screen?","response":"To lock the screen in XFCE, you can use the default shortcut, which is ctrl-alt-del. \nAnother method is using the command line with the command $ xflock4. \nAdditionally, you can use 'xscreenlock' which is fairly ubiquitous."},{"question":"what is the difference between a lan and wan port?","response":"The differences between LANs and WANs tend to be at the physical and data-link layers. \nWAN stands for Wide Area Network and this is the network that connects your router to your service provider. \nThe WAN port usually connects to a DSL modem, cable modem or fibre media converter. \nLAN stands for Local Area Network and this is the network that connects the devices within your home\/business to the router. \nThe LAN port or ports usually connect to PCs, printers etc. LAN ports can also connect to wireless APs to allow devices like laptops, smartphones, tablets to connect to the LAN. \nFurthermore, a LAN is typically something completely within one premises, while a WAN is something that connects between geographically separate locations. \nAlso, because of the shorter distances involved, LANs tend to be built on Ethernet and other 802.3-family physical layers and data links. \nDue to the technical hurdles associated with moving lots of data long distances reliably, WAN links tend to be lower bandwidth and higher latency than LAN links."},{"question":"passwords being sent in clear text due to users mistake in typing it in the username field","response":"HTTPS (encrypted HTTP using SSL) or javascript is a good way to ensure that network devices and anyone on the network can not obtain the password that was mistakenly entered into the username box. \nAnother option is to not allow form submission if there is not a value in the password box. \nYou could additionally forbid password at your password set\/change mechanism from being in the form of an email address (don't accept @). \nA better solution is to pre-process the logs before the analysts see them and redact information in the logs. \nOr don't log invalid usernames, just failed attempts and IP. \nConsider that your interface may have some flaw causing Users to enter Password in the ID field. \nSome banks have a two-page login, especially in web apps. \nOr if you type your password into the wrong box, an automated system causes your password to expire immediately. \nYou could also allow authenticating with OpenID or Gmail."},{"question":"why cant i press the install button when installing applications from unknown sources?","response":"It's recommended to disable any screen filtering apps to resolve issues. \nAlternatively, explore installed apps with the capability to overlay their content over others. \nIf uncertain which app is causing trouble, disable such apps one at a time in the 'Apps' settings on your device. \nFor assistance, you can search online for overlay permissions, specifying your Android version and device manufacturer."},{"question":"is bios written in assembly?","response":"BIOS used to be written exclusively in assembly language, but the transition was made a long time ago to write the majority of the code in some higher-level language and leave written in assembly as few portions of it as possible. \nThe actual BIOS for a computer would be written in some language, probably C or assembly. \nAdditionally, the modern reality is most BIOS is written using Assembly, C, or a combination of the two."},{"question":"is it wrong to use a boolean parameter to determine behavior?","response":"The use of a boolean (or an int) to encapsulate state is often justifiable in many cases. \nHowever, while not necessarily wrong, it can potentially represent a code smell, as highlighted by the concerns about maintainability and code understanding. \nAccording to Robert C. Martin's Clean Code principles, the elimination of boolean arguments is recommended to ensure that a method focuses on doing one thing and one thing only, promoting clearer and more maintainable code. \nTherefore, it is suggested not to use boolean arguments."},{"question":"can i export functions in bash?","response":"Functions are not exported to subprocesses, but you can create a \"library\" which is loaded when you start the program: source \"$HOME\/lib\/somefile\", and place your non-interactive functions and settings there. \n\nIn Bash you can export function definitions to a sub-shell with export -f function_name. \n\nIf you use declare -pf it will output all the previously defined functions in the current shell to STDOUT, and you can then redirect STDOUT to wherever you want. \n\nThe command eval \"$(declare -F | sed -e 's\/-f \/-fx \/')\" will export all functions."},{"question":"what does the windows flag in the linux logo of kernel 3.11 mean?","response":"In choosing the name \"Linux for Workgroups\", Linus Torvalds was making a joke and paying some kind of homage to Windows 3.11."},{"question":"why cant the fbi read the key embedded in the iphones secure chip\/rom directly from hardware (silicon)?","response":"Attempting to extract data by oneself from a device may lead to its destruction before data recovery, which is not the desired outcome. \nMoreover, such an action would not serve the strategic purpose of compelling Apple to aid in decrypting the device, which would set a precedent for future similar requests. \nExisting technology that could decrypt the device does not provide a scalable solution, as it is costly and unsuitable for widespread use. \nAdditionally, there is a considerable risk of destroying evidence, which could mean permanently losing any chance to access the key required for decryption."},{"question":"how to store salt?","response":"A salt is a random unique token stored with each password. \nIt is advised that salt can and should be stored right next to the salted and hashed password. \nAdditionally, the salt can be stored in plaintext without any form of obfuscation or encryption. \nAnother opinion offers that storing your salts separately offers some extra security but not much, since if the attacker has access to the database, chances are they have access to other data. \nStill another opinion adds that the salt and password can be stored together because every random salt is different, as a salt is a random unique token stored with each password."},{"question":"shortcut for toggling between different windows of same app?","response":"Use Cmd \u2318Tab as usual and on the icon of the application you want to switch windows in, press the down arrow key, then use left\/right keys to navigate to the desired window across spaces and desktops. \nThe command could be different on different keyboards: Command+`; option+cmd+\u00e0; (Turkish) cmd \u2318 + < + control; Command+\u00b1 (the one above tab); (Spanish) Cmd+^`[; next window: Command \u2318 ` and previous window: Command \u2318 Shift ` `. \nFor CSA language with French (Canadian) Keyboard, use Cmd \u2318 + \u00f9 Cmd \u2318 + Shift \u21e7 + \u00f9 to go the other way. \nFor Canadian French - CSA language with US English Keyboard Cmd \u2318 + ` Cmd \u2318 + Shift \u21e7 + ` to go the other way. \nYou can also press ctrlleft or right on your keypad."},{"question":"in bash, when to alias, when to script, and when to write a function?","response":"In determining whether to use an alias or, script, or function in shell scripting, individual preference plays a significant role. \nOne should begin with an alias for simplicity (if you only need to add an argument at the front of a single command, for example) an alias will work, advance to a function when complexity increases, and resort to a script for standalone and reusable tasks. \nSome say aliases are only suitable for simple text replacements, with no arguments\/parameters, functions, a well-defined concept of a few lines of code, are easy to write\/use, full shell scripting capability, only available inside bash with one command and some parameters, and scripts have several commands and no parameters and are more or less like functions (or a collections of functions) but available (callable) outside of bash as well. \nFor changes that should persist within the current shell environment, functions are the appropriate choice as they execute within the same process, avoiding the overhead of creating a new shell that occurs with scripts. \nIn multi-user environments, scripts are favored for their reliability across different contexts, as aliases and functions might depend on a specific shell context or user environment. \nScripts are primarily used to assemble different software components into more complex functionalities, while functions act as pre-loaded scripts for enhancing modularity and reusability in bash scripts. \nScripts can be invoked in various ways and used by multiple programs, and read from files each time they are called, contrasting with aliases and functions which are stored in and restricted to the current shell's memory. \nFor modifications requiring administrative privileges, like editing system files, scripts are necessary since they can be executed with 'sudo'. \nAliases and functions require less memory and execute faster, though they necessitate load time as the shell must interpret them before showing the prompt. \nIf speed is essential, one should consider an alias or function, but if a task needs to function outside the favored shell or takes arguments, scripting is advisable. \nLastly, while aliases and functions serve different purposes and can co-exist, aliases are limited to interactive sessions and are not nestable like functions."},{"question":"how to change path in finder by entering the path manually?","response":"Finder provides a 'Go to Folder\u2026' option, which allows you to enter a full directory path directly, and this feature can be quickly accessed using the command+shift+G keyboard shortcut. \nAlternatively, you can use the command line with a command such as 'open \/Library\/Frameworks\/Python.framework\/Versions\/', depending on whether you intend to open the folder directly or reveal it in Finder. \nLastly, Spotlight Search offers a way to find files or folders by typing or pasting the full path into the search box. \nDespite offering a simple search method, a list of multiple matches may appear if a partial name is given, requiring further selection."},{"question":"view apps full package name?","response":"The APK extractor application can be a helpful tool to find out the qualified name of any installed app. \nIf you're seeking to discover the launching activity of an app, looking into the LogCat is recommended, as it displays the activity that is started when the app is launched. \nFor those who are adept with adb and Linux, the grep command `adb shell ls -al \/data\/data\/ | grep 'yourAppName'` can be very useful in quickly searching for app names if you have root access. \nThe OS Monitor app is another powerful resource for gaining information on running processes within Android. \nVarious apps like Elixir 2 can reveal the package name of an installed application. \nA simple alternative could be to share the app from the Google Play Store and observe the shared URL to identify the package name or to long press on the app icon and select \"Application info\". \nUsing Link2SD is another effective method to find out app package names and other related information."},{"question":"battery has x in it?","response":"This means your MacBook does not recognize the battery, and most likely the battery has died, or is no longer being recognized by the system."},{"question":"logitech mouse: how can i use additional buttons?","response":"Steermouse and Mac Mouse Fix are tools that have proven to be effective in this regard. \nUSB Overdrive is another tool you can consider for configuring the extra buttons on your Logitech mouse. \nBetterTouchTool is a versatile solution that allows you to map mouse buttons to keyboard shortcuts or predefined actions. \nIf you prefer a program like Karabiner, it also offers the functionality to customize mouse buttons. \nFor a more specific issue, if interested in using the side buttons, an open-source menu bar utility called SensibleSideButtons might be the solution you need. \nAdditionally, Hammerspoon, a free and open-source tool, provides versatility in configuring mouse buttons."},{"question":"what hacking competitions\/challenges exist?","response":"For those interested in \"war games\" related to cybersecurity, one can delve into puzzle-like challenges found on websites such as OverTheWire.org or by visiting http:\/\/www.wechall.net\/sites.php for a list of challenge sites. \nFurthermore, cyber competitions like iCTF, DC3, and NetWars SANS are available, each with their respective websites and a variety of security-focused CTF competitions. \nIn the realm of hacking competitions, Wargames are accessible 24\/7, enabling participants to join at their convenience to tackle various challenges on a provided server. \nPlus, you can engage in challenge-based competitions like \"Over The Wire\" and \"Smash The Stack Intruded,\" where you'll encounter various tasks to solve individually. \nThose looking for additional resources can explore Capture.thefl.ag, which offers a rich repository of information, including a live CTF calendar and numerous online practice games. \nFor web hacking enthusiasts, the Spider Challenge from Spider.io presents a time-sensitive and competitive quest to locate hidden codes through a series of clues. \nExploit-exercises.com offers different exercises such as Nebula, Protostar, and Fusion, focusing on Linux security challenges and memory corruption issues. \nA comprehensive guide to various competitions can be found at http:\/\/ctf.forgottensec.com, equipped with descriptions, links to write-ups, and beginner resources. \nLastly, http:\/\/ctftime.org\/ serves as a valuable platform to stay informed about upcoming CTF events and to access rankings and write-ups."},{"question":"are international calls free on facetime?","response":"You will be charged in the same way as using the internet for other purposes on your phone, either Wi-Fi or mobile data, depending on your scenario."},{"question":"what can i do to increase battery life on my android device?","response":"You need to think about what yourself can turn off, or down on your phone. \nTo get help with this, you can find a table of energy cost values for certain phone applications on German technology site Heise, titled Energiesparplan. \nAmong the most significant power consumers are GPS, WiFi, and Bluetooth, so it's advisable to disable these unless actively in use. \nAdditionally, actions such as lowering screen brightness, turning off 3G, and disabling automatic data sync can contribute to prolonging battery life. \nFurthermore, Android devices typically come equipped with widgets that facilitate easy management of these power drainers. \nAlso, avoid utilizing live wallpapers and instead go for dark backgrounds, particularly for AMOLED screens, to further reduce battery usage. \nAlso, utilizing a dark and\/or reddish background can also be especially energy-efficient on OLED screens. \nRefrain from using Google Voice for Text Messages in the traditional way, as alternative methods like emailing can save battery. \nFor 4G phone users, it is recommended to deactivate the 4G antenna when it's not needed, due to its high power consumption. \nOther valuable tips include, reducing update frequencies for apps and not using the HTC Sense UI, while preferring the back button over the home button. \nDisplay is often the top battery drainer, and controlling brightness is a significant factor for improving battery life. \nTo automate power-saving measures, apps like Tasker can regulate settings such as mobile internet, Bluetooth, WiFi, and display brightness, depending on specific conditions. \nJuiceDefender is another application that optimizes data service usage by synchronizing apps on a schedule and managing the search for WiFi hotspots. \nAdjusting the Wi-Fi Sleep Policy to avoid the WiFi radio frequently turning on and off can conserve battery. \nOn Samsung Galaxy S Captivate this can be found under: Settings \u2192 Wireless and network \u2192 Wi-Fi Settings \u2192 MenuKey:Advanced. \nSoftware like SetCPU enables creation of CPU profiles to manage performance and battery consumption. \nUsing a magnetic case combined with corresponding apps like Holster Snooze can automatically turn off the screen, saving power. \nExecuting CPU-intensive tasks while the device is connected to a charger can help decrease battery wear, thus maintaining good performance over time. \nIf you have root access, apps like Greenify can hibernate selected apps when the screen is off, reducing unnecessary background activity. \nCertain adjustments specific to the Nexus 5 and other devices, including turning off vibrating key press, auto brightness, and utilizing apps like Tasker for automation, can contribute significantly to battery conservation as well. \nCreating underclocked frequency profiles that activate only when the phone is locked can ensure good performance while the phone is in use and enhanced battery saving when it is not. \nAnalyzing and optimizing chip usage, especially in scenarios where network connectivity is poor or unnecessary, can also benefit battery longevity. Disabling always-on monitoring apps and unnecessary app settings, such as \"Ok Google\" detection, can further reduce power consumption. \nFinally, in cases where other solutions don't provide sufficient battery life improvements, a factory reset could be considered as a last resort."},{"question":"how can i tactfully suggest improvements to others badly designed code during review?","response":"When reviewing code, it is essential to prioritize the functionality over the aesthetics of the code, focusing on looking for bugs and criticizing flawed functionality rather than the aesthetic appeal of the code. \nIt is important to suggest improvements that make the code work better and make the operation of the code easier to verify, differentiating between design and implementation. \nA cost\/benefit analysis should guide decisions on whether changes are worth making, and make it clear what the benefits are from proposed changes versus the costs to fix them. \nAutomated tools that clean up formatting can make a considerable difference, and unit testing encourages decomposing big methods into smaller ones. \nIf faced with very poor design, maximization of encapsulation should be the focus, working on public interfaces and critical components first. \nDiscuss the design of the code during reviews and address how the design is flawed or doesn't meet requirements as opposed to only critiquing it for its coding quality. \nIt\u2019s prudent to suggest a few ways to clean up design work in the future and move on because a functional code with just a few bugs might not justify the cost of change. \nUsing tactful language devoid of ego can help make your feedback more acceptable. \nAdopt an approach that suggests rather than dictates improvements, using comments such as \"I would\", which signals that your view is simply one view of multiple views and comment on everything, whether big or small, although for peers who are not especially sensitive, directness can be applied. \nFinally, let someone know about a bug in their code one-on-one and never criticize or review the developer, only the code itself."},{"question":"which installed software packages use the most disk space on debian?","response":"The most substantial packages in a Debian-based system are the LibreOffice suite and the Linux kernel, with the former being a collection rather than a single package, and each kernel installation can occupy approximately 135 MB of disk space. \nWhen the root partition's size becomes a concern due to space constraints, it's usually more practical to consider resizing or moving to a larger partition than attempting to clear space through removing packages."},{"question":"what exactly is posix?","response":"POSIX is a subset of UNIX, designed to be compatible across Unix-like environments on different operating systems. \nAs the Portable Operating System standard, it outlines specific utilities, APIs, and services an operating system should provide. \nIt was established as an IEEE Standard in 1988 to unify the various UNIX forks and UNIX-like systems. \nPOSIX 7 significantly expands ANSI C by defining C API with additional file operations such as mkdir, dirname, symlink, and readlink among others, with these APIs defining underlying system concepts like processes, where Linux system calls are often employed for compliance."},{"question":"what is 1 &2 in unix?","response":"The numbers 1 and 2 are file descriptors. \n1 refers to 'stdout' and 2 refers to 'stderr'. \n'1 &2' means that stdout and stderr are being swapped."},{"question":"can we delete fsd files?","response":"Yes, although they'll just be recreated as you sync back and forth your OneDrive folder(s)."},{"question":"in linux, how to delete all files except the pattern *.txt?","response":"To delete all files except those with a '.txt' extension, you have multiple command options. You can apply the \"find\" command with specific parameters. \nYou can make use of bash's extended globbing or employ zsh's extendedglob capability. \nAnother approach involves using inverted grep in conjunction with xargs. \nFurthermore, there is a simple command, rm $(ls -I \"*.txt\" ), that achieves file deletion while excluding '.txt' files."},{"question":"what is the difference between print and echo in unix?","response":"When comparing \"printf\" and \"echo,\" the former offers additional formatting capabilities: specifically, it doesn't automatically append a new line to the output, contrary to \"echo,\" which does."},{"question":"gpt or mbr: how do i know?","response":"There are several ways to find out whether you have a GPT or MBR disk: one simple way on a Linux system is to use \"gdisk tool,\" which may bring up a message stating \"Found invalid GPT and valid MBR; converting MBR to GPT format in memory,\" indicating an MBR-style disk. \nOther options include the \"parted -l\" command, which determines the type of partition table; \"check_scheme() { fdisk -l $1 |grep \"Disklabel type:\" |awk '{ print $3 }' }\", a function that can be employed to identify the disk label type; the \"sudo fdisk -l\" command, which identifies the Disklabel type as 'dos' or not; or \"blkid,\" which can be used to discern between GPT and MBR partition types."},{"question":"what can i do when my ssh session is stuck?","response":"If your SSH session is stuck, you just need to type 'exit' at the prompt, if that doesn't work you could try 'Shift+`+'. \nAlternatively, you can terminate an SSH session by typing a tilde followed by a period at the beginning of a new line. \nTo be clear, you should press Enter, then the tilde key (~), and finally the period (.). \nFinally, using '~.' stops an SSH connection even when it appears completely unresponsive."},{"question":"how to make right click using only keyboard on a mac?","response":"First, you can turn on Mouse Keys through System Preferences by navigating to Universal Access and selecting the Mouse tab. \nAnother option is to access built-in features via System Preferences, specifically Keyboard shortcuts. \nAdditionally, you can go to System Preferences > Accessibility, find Mouse & Trackpad, and enable \"Mouse Keys\". \nAnother method involves pressing Option-Command-F5 and selecting \"Enable Mouse Keys\" from the pop-up window. \nFor a more customized solution, you can use Automator and Python, although this might have a slight delay. \nAlternatively, there are third-party solutions such as the RightClick Alfred workflow, that provide the desired functionality."},{"question":"how do i remotely edit files via ssh?","response":"You can do so by mounting the remote folder as a file-system using sshfs."},{"question":"when do you use float and when do you use double","response":"For most general purposes, the double type should be your go-to option when working with floating-point numbers. \nSpecialists in fields requiring extensive float-point number crunching where performance and storage are a concern might consider using float only after careful analysis shows that limited range and precision won't hamper the results. \nMeanwhile, long double is suitable for use by specialists for circumstances that demand more range or accuracy than double can provide, contingent on whether the platform supports these enhancements. \nFor general calculations and temporary variables, double is the recommended data type. \nThe float type may be appropriate when managing large arrays of floating points and can be used if the precision fits the need and the number of floats is extremely high. \nHowever, in modern computer systems, there are few reasons to prefer float over double, except for specific cases like conserving memory or dealing with hardware that offers limited support for double-precision floating-point operations. \nUsing float or int becomes necessary due to hardware constraints when working with particular platforms that do not support double, like the ARM Cortex-M series."},{"question":"how does windows 10 allow microsoft to spy on you?","response":"In the context of Microsoft's software and services, it is documented that Microsoft collects extensive information about users' activities and device information. \nSpecifically, for members of the Windows Insider program, participation implies consent to the transmission of usage details and other data. \nThe features from previous Windows versions are still available, including the SmartScreen filter that verifies URLs by sending them to Microsoft. \nThe presence of Cortana as part of Windows 10 means that a considerable amount of activity and personal information, including location, browsing history, and voice input, may be communicated back to Microsoft. \nIt's also highlighted that Microsoft reserves the right to gather nearly anything from users, especially those in the open beta, although the extent of collection and usage may be tempered by privacy laws applicable in different regions. \nCortana is the main issue in Windows 10, while Office 365 offers additional features like Power BI for data collection and visualization and OneDrive Documents for saving. \nOperating system makers, including Microsoft with Windows 10, have the potential to \"forget\" fixing security vulnerabilities, allowing third parties to exploit them and gain unauthorized access to user data."},{"question":"does a traceroute\/tracert show every hop, or does it skip\/hide some details of the path?","response":"Any device that does not decrement IP TTL field value is not going to show up in the traceroute path. \nIt also will not show devices which decrement the TTL field, and consume the packet if TTL reaches zero, but neglect to inform the sender of this event via an ICMP datagram."},{"question":"how to display meminfo in megabytes in top?","response":"There is a command-line option for detecting memory units: \"-M\". \nTo display memory units (k\/M\/G) and floating point values in the memory summary when using the top command, run \"top -M\"."},{"question":"automated ssh-keygen without passphrase, how?","response":"The simplest way to do this (using default filename as an example) is: cat \/dev\/zero | ssh-keygen -q -N \"\"; or, ssh-keygen -t rsa -f \/home\/oracle\/.ssh\/id_rsa -q -P \"\". \n\nAlternatively, use a simple echo before ssh-keygen: su - -c \"echo |ssh-keygen -t rsa\". \n\nThe following worked on Ubuntu 18.04: sudo -u username bash -c \"ssh-keygen -f ~username\/.ssh\/id_rsa -N ''."},{"question":"do you have to include a license notice with every source file?","response":"Most GPL software contains a short preamble inviting users to read the license.txt file, ensuring that the file is under the prescribed license. \nYour software is automatically covered under copyright protection as per international law. \nMoreover, it is safest to attach license notices to the start of each source file as strongly recommended by GPLv3 to most effectively state the exclusion of warranty. \nThe copyright notice at the top of source files is also supposed to remind anyone who runs across that lone file that it is in fact copyrighted and not public domain. \nHowever, while some argue that it is okay to reference a license in your source, while others believe that a \"broken\" license reference would revert to the default copyrighted behavior. \nTo comply with GPLv3, add License.txt in the root of the project's repository and include the preamble on every source file. \nAn alternative is using an SPDX-License-Identifier tag, which simplifies legal declarations in the source files for automated software supply-chain analyses."},{"question":"how to check if a port is blocked ubuntu?","response":"To see if the service is on and is listening to the IP address or not, you can use: netstat -tuplen | grep 25. \nTo see if there is any rule set by your firewall, use: iptables -nL | grep \/."},{"question":"what is drown and how does it work?","response":"Recalling Bleichenbacher's attack from the 20th century is essential to comprehend the attack. \nThe target server is utilized by the attacker as an oracle, taking advantage of RSA-based key exchange."},{"question":"im a manager. how can i improve work relationships and communication with programmers?","response":"You should get to know the programmers personally. \nThis will help you get to know the good and bad things about the company, the workplace and any projects. \nYou can start getting to know them by having informal chats with your team in a neutral atmosphere, which may involve inviting them out for a beer. \nTalking to your team could also be done in a more formal way in the form of scheduled \"two-ways\" in which the team gives you updates and airs any concerns, while you give them updates on the business side and plan with them to resolve their concerns. \nBasically, you want to ask your programmers how things are going, and actually listen to them by providing a way for them to be open about their problems without incurring a career backlash or involving any corporate politics. \nYou should also respect them and make the effort to earn their respect, which can be done by showing interest and appreciation for their work. \nFor a lot of developers sincerity, honesty and otherwise a flexible work environment are very important, so you should look into fostering an atmosphere of agile development. \nThis may involve setting schedules and deadlines that are achievable, and if new designs or plans are introduced, the schedules and deadlines should be readjusted. \nEven better would be to let the developers themselves decide the deadlines as they are the ones actually doing the work, so should have a better idea of how long any given task should take. \nThen again, you yourself might want to dedicate a small portion of your time as part of the development team, for example 8 hours a week, working as junior developer under the team lead. \nThis will help you learn the dynamics of the team and get to know them even better. \nIn terms of what else you can do, talking a firm stand in front of your team and backing them all the way will help build trust, as does open communication and actually following through on what you say you will do. \nFurthermore, as a manager, you should of course, excel at what you do, which will in turn engender the all important communication, which will allow your developers to learn and grown in their roles. \nFinally, a raise never hurts!"},{"question":"programming cleanly when writing scientific code","response":"When coding, it's important to consider the purpose of your programming, which will influence the aspects you need to focus on. \nAdhering to the Unix principle of \"Keep It Simple, Stupid\" (KISS) can be very beneficial, as can the practice of doing one thing at a time and doing it well. \nEmbracing the Don't Repeat Yourself (DRY) principle, you should avoid copying and pasting code and instead create reusable functions or at least use caution when copying and pasting code to prevent introducing errors or unnecessary complexity. \nTo enhance the clarity of your code, it's essential to add detailed commentary throughout your work and explain things to yourself as you progress. \nIt's also recommended to cite mathematical formulas within comments to ensure the reproducibility and understanding of your code. \nMaking your code easy to test with both good and bad data sets is also crucial, and you should structure your code to facilitate the addition of new test cases."},{"question":"how to set up reverse tethering over usb?","response":"SimpleRT is an effective tool for use with Linux for reverse tethering. \nThe Android Usb Port Forwarding app offers functionalities for the same purpose. \nWindows users with rooted phones can utilize Another resourceful tool found on the xda-developers forum, named Android Reverse Tethering. \nFor those seeking an app solution, the Reverse Tether app is available on the Play Store providing free limited trial use, with full features for a fee. \nRooted Android phone users can connect their Android device via USB, and activate USB tethering by navigating to Settings \u2192 More...\u2192 Tethering & mobile hotspot \u2192 USB tethering. \nImportantly, ReverseTethering NoRoot's app exists, allowing reverse tethering without root requirements on unrooted Android devices. \nMoreover, for Windows, Linux or Mac PC, gnirehtet is a project that permits reverse tethering by downloading and running a command from the gnirehtet zip-file without the need to pre-install an app."},{"question":"how do i get people to stop bikeshedding (focusing on trivialities)?","response":"It's important to clearly identify that the team sessions are for discussing and troubleshooting issues related to the content only. \nAvoid allowing extended discussions during presentations, as they're not meant for review but rather for understanding the system. \nSetting correct expectations and being open and transparent about goals is also vital, starting off the discussions with the overall view. \nTo manage topics effectively during lessons, it's helpful to clearly explain what is considered off-topic and to table those questions for later discussion. \nIn some organizations, you many never be able to achieve this, however, emphasizing the direct impact of participants' comprehension and contribution on their personal advancement within the company might be necessary to maintain focus on the task at hand. \nWhen educating programmers, explaining the goals of the session upfront can help keep the meeting on track and prevent derailment into less relevant topics. \nBy breaking the codebase into units and having learners work in pairs to explain it to each other, you can enhance their understanding and engagement. \nIt's often beneficial to start with teaching the overall design of the codebase before diving into specific examples, including the business motivation behind the design choices."},{"question":"why php is not used by big companies?","response":"For major transactional sites, the associated risk management costs make it more economical and secure for large corporations to opt for applications developed in .NET rather than PHP. \nThe banking industry, prioritizing security and unbothered about costs, tends to favor .NET over PHP, given the latter's perceived lack of features in this critical area. \nAdditionally, the difficulty in developing a secure PHP application without encountering major flaws often leads to higher costs compared to enterprise-level .NET applications. \nMoreover, some big companies have existing infrastructure, sometimes in Java, predating the emergence of PHP, making it less sensible to introduce PHP into their technology stack. \nNotably, PHP's perceived limitation as a web-only language further diminishes its suitability for applications beyond the web front end, contributing to its limited adoption in certain corporate environments."},{"question":"never do in code what you can get the sql server to do well for you - is this a recipe for a bad design?","response":"SQL is intended specifically for handling data itself, without being burdened by the business rules and logic that determine the form of a query; these aspects should be managed within the coding environment. \nIt is acknowledged that code ought to dictate the business logic, and the database should simply serve as a straightforward storage mechanism devoid of logic. \nImplementing business rules and structures within the database can be advantageous, aiding in the automatic management of elements like record counters and ensuring the integrity of relationships, thus promoting data integrity. \nNevertheless, careful consideration must be given to where data processing occurs, as relying solely on the SQL server for all computations may not always be the most effective or scalable solution, especially when other less costly resources are available for computation."},{"question":"is ipv10 a joke or a serious rfc draft?","response":"The author is probably serious about his proposal, but he doesn't appear to realize how ridiculous the scheme he is proposing is, despite not garnering any serious support for the proposal; so, it's both serious and a joke, but the joke's on the author."},{"question":"why is my phone texting off email?","response":"Your iPhone uses the Messages app to send messages to other devices and determines the most efficient way to deliver them through either Apple's network or the traditional SMS service, depending on whether the recipient has an Apple device registered with their servers. \nMessages are not transmitted via email; instead, your email (which is your Apple ID) is used as an identifier to allow messages to be sent to your devices without phone service, such as iPads, iPod Touch, and Macs."},{"question":"change gmail account to make in-app purchase?","response":"To access a different account in the Play Store app, you must switch to the proper account. \nIf you wish to make an in-app purchase, it is essential to install the app from the Google account you want to use for the purchase. \nTo ensure your game is associated with the correct account for in-app purchases, make sure you are logged into the correct account on both Google Play Games and Google Play Store. \nA solution for issues with the default email in the Play Store app is to go into the Gmail app and remove the unwanted Gmail email address."},{"question":"can webcams be turned on without the indicator light?","response":"Disabling webcams' LED indicators while they are still on is affirmed as possible. \nFor instance, patching and flashing a camera's firmware can be a method to alter its behaviors such as the shutter sound. \nCertain webcam control software allows for the LED to be turned off directly. \nMoreover, registry modifications in Windows for specific Logitech models offer a method to disable the LED. \nIn the case of older MacBooks and MacBook Pros, research from 2007 and 2008 has demonstrated methods to disable the iSight camera's LED. \nOn Linux systems, the 'uvcdynctrl' command line tool provides the ability to control the LED on some USB webcams."},{"question":"why am i still getting a password prompt with ssh with public key authentication?","response":"To troubleshoot persistent password prompts with SSH using public key authentication, ensure proper permissions on the ~\/.ssh directory and its contents, including the ~\/.ssh\/authorized_keys file, on the remote machine. \nThe `Your home directory ~, your ~\/.ssh directory and the ~\/.ssh\/authorized_keys` must be writable only by you, with the private key file on the local machine being readable and writable only by you. \nChallenges may arise if the home directory on the remote machine lacks correct privileges; verify and adjust accordingly. \nCheck the \/etc\/selinux\/config file on the remote machine and change SELINUX to disabled from enforcing to resolve passwordless SSH issues. \nExecute the commands `ssh-keygen` and `ssh-copy-id -i root@ip_address` to generate and copy the SSH key, respectively. \nVerify that the AuthorizedKeysFile in the sshd_config file points to the correct location; Uncomment the line if necessary. \nIf the account is locked, reset the user's password to resolve the issue. \nIn cases involving Hadoop Cloudera installation, SSH problems may occur; investigate and address this specific context. \nInspect and edit the sshd_config file on the server to rectify SSH misconfigurations. \nEnsure correct ownership of the home directory on the server system. \nAddress SELinux ACL issues when files are created by verifying proper ACL settings. \nSwitch from authorized_keys2 (deprecated) to the updated version; Adjust the sshd_config file accordingly. \nModify the OpenSSH configuration by setting PasswordAuthentication and UsePAM to \"no\". \nReload the SSH keys to the agent using `ssh-add` if switching the default RSA key is necessary. \nCheck for directory permission issues, especially at the root level. \nExamine permissions in the ~\/ssh folder on both the client and server machines. \nVerify \/etc\/ssh\/sshd_config on the server to ensure that RSAAuthentication, PubkeyAuthentication, and UsePAM options aren't disabled. \nRecognize that newer OpenSSH versions may not accept DSA keys by default. \nInvestigate and resolve any directory permission issues contributing to the problem."},{"question":"what is aead cipher suite?","response":"AEAD, which stands for Authenticated Encryption with Additional Data, integrates a message authentication code to check the integrity of both ciphertext and any additional authenticated but unencrypted data."},{"question":"understanding the exclamation mark (!) in bash","response":"It's part of GNU history library, and in bash is used to re-run commands in your history, where ! specifically invokes history expansion, although you can do a whole host more than just run the last command, or command number X, such as use !cat to run the last command that started with cat, or !?bash?:s\/bash\/csh\/ to run the last command containing bash but replace it with csh. \n\nA lot more can be done with ! such as: execute a command which was typed 3 commands before, using !-3; or execute a command that starts with !ls, and a lot more. \n\nYou can do !! to reuse the last command in bash shell, and do !$ to reuse the last part of your last command."},{"question":"how does google authenticator work?","response":"The technology functions on a time-based seed, similar to the way RSA key fobs work, which does not require any form of connectivity to operate. \nGoogle Authenticator utilizes both HOTP and TOTP algorithms to create one-time passwords, with TOTP being used by the Authenticator and substituting the counter with the current time to remain in sync with the server. \nThe Authenticator itself is built on the Time-Based One-Time Password algorithm and includes a shared secret, a time-based input, and a signing function using HMAC-SHA1 for generating the password."},{"question":"why do we use su - and not just su?","response":"su - username initializes a clean login shell with the specified user's environment, while su username starts a shell with the current environment settings. \nIf no username is specified, su assumes root account as default."},{"question":"why are interfaces useful?","response":"They allow for code reusability and inform clients about a class's capabilities in web services without exposing the code itself. \nFurthermore, they enable polymorphism, where interfaces are crucial, as inheritance wouldn't function without them. \nInterfaces also promote system flexibility, making it easier to modify, refactor, and redeploy since they contribute to decoupled systems. \nThey are particularly beneficial for maintaining decoupling, especially in test environments where mocking interfaces are more feasible than concrete classes."},{"question":"why is fe80::\/10 reserved for link local addresses when fe80::\/64 is actually used?","response":"The link-local scope was set to \/10 simply to \"fit in\" better with the other scopes, but RFC 4291 explicitly states that only fe80::\/64 may be used."},{"question":"red pixels on mojave and catalina dark mode","response":"This issue has potentially been resolved in macOS 11 Big Sur, although it's not certain whether the solution will be applied to older versions like 10.15 or 10.14. \nA temporary workaround that has helped some users is to put the problematic applications in fullscreen mode. \nIt is confirmed to be a software problem, reproducible on different MacBook models and LG USB-C type displays. \nIt is recommended to update software when available to fix this bug."},{"question":"will ipv6 make private ip addresses become obsolete?","response":"IPv6 NAT is possible and practical although some argue it is unnecessary. \nSome people think that private addressing will not become obsolete because there will always be a need for big private networks that are not directly connected to the internet."},{"question":"can ads on a page read my password?","response":"Nothing hinders advertisements from accessing your passwords, and ads can reach sensitive information unless contained within a sandboxed iframe. \nHow advertisements load can impact their ability to engage with website content, as well as monitor user interactions. \nThe only solution to understand whether a website has segregated the advertiser's code is by examining the website's code itself."},{"question":"what does to root a phone mean?","response":"Rooting your phone means acquiring administrative rights on its file system and doing things that a non-administrator user cannot access. \nTo obtain root (administrator) privileges on a phone means acquiring access to the user with UID 0, akin to having a complete 'System Administration Account'. \nWith such access, you can do anything like install or uninstall any application or remove \"system\" apps and overcome limitations set by manufacturers. \nIt is also considered similar to Jailbreaking in the iPhone realm. \nThis includes the removal of pre-installed bloatware and allows for customization like overclocking or underclocking the CPU or enabling quick operating system changes with two backups, one for each, through a process called \"Nandroid Backup\". \nMoreover, the technical implementation involves the addition of the 'su' program in the \/system\/xbin\/ folder, which grants user ID switching privileges, usually accompanied by 'superuser' management applications."},{"question":"how can usb sticks be dangerous?","response":"Once connected to a computer, a device resembling a USB drive but functioning as a USB keyboard will begin executing predetermined key sequences. \nSimilar risks are associated with USB sticks that, upon insertion, exploit vulnerabilities without any additional user interaction, as highlighted by the Stuxnet virus incident. \nWhile recent operating systems have disabled the autorun feature as a security measure, USB devices can still be reprogrammed to mimic keyboards, therefore harnessing the permissions of the user logged in to inject malware. \nExploits can also exist within the operating system's handling of USB drives even without direct file execution, as these can trick the OS into running code inadvertently."},{"question":"how to get the pid of the last executed command in shell script?","response":"The PID of the last executed command can be found in the \"$! shell variable\". \nYou can capture this PID by issuing the command \"my-app & echo $!\" when running a bash script. \nAlternatively, for the specific case of an application named 'my_app', you can use \"pidof my_app >> \/tmp\/my_app.pid\" to append the PID to a text file."},{"question":"how to remove an environment variable on osx using bash","response":"Unset it using \"unset DYLD_LIBRARY_PATH\". \nAccording to the bash reference manual, the only way to unset a variable that has been set is with the 'unset' built-in command."},{"question":"should i let my childs school have access to my kids personal laptop?","response":"It makes sense to give them admin access to install things but it's better to revoke it once this is done. \nIn general, the school security precautions seem reasonable. \nHowever, many parents recommend saying no to this because you have no way to tell what they have changed. \nAsk for the keys to Office and ignore their requests to install certificates; tell your child to never give them the laptop. \nThe school should work with what the children have or hand out school laptops. \nOthers advise being flexible and prepared to compromise. \nMaybe ask for a list of the required software and install it yourself. \nAnother option is to ask about minimum specs and buy your child a burner laptop to be used only for school (make sure the child knows this too), or use a virtual machine. \nYou could give them a Chromebook for school, and lock it down with parental controls. \nThe school could provide a Lenovo 100e (Windows 10 - S-Mode) or a Chromebook (Chrome OS) for under $200."},{"question":"copying the current directorys path to the clipboard","response":"Next to the name of the folder in the Finder is an icon depicting that folder: this icon can be dragged to anywhere you need to accept a path. \nThis coupled with pbcopy and pbpaste should fit the bill for getting arbitrary paths to text format and then into your clipboard. \nOr just use Launchbar to push files around without caring so much about recording a specific folder. \nAnother simple method is to invoke DTerm on the Finder window and run: pwd | pbcopy. \nYou can also do: Command + I, then copy information under Where; Command+C then Command+V, or use Automator. \nTake into account that Option+Command+C will copy the path for selected folder or file to the clipboard. \nAnother method is Command+I for Info, Command+A, Command+X to cut the path to clipboard, then Command+W. \nIf you use Alfred, you can select the items, press \u2325\u2318\\, and select Copy path to Clipboard. \nOne of the easiest ways is to Get Info on the folder or file, then in the middle \"General\" section, you can select and copy (command + C) the path. \nThe MacYourself tip Copy file or folder path to the clipboard in Mac OS X Lion works on 10.7.4. \nOne user suggests that is more efficient to simply drag-and-drop the file into a text field, which will automatically insert the file's path."},{"question":"why vlan tagging is required?","response":"VLAN tagging is essential for indicating which VLAN the frame and the source MAC address belong to. \nThis tagging is also critical for differentiating VLAN traffic on trunk ports where multiple VLANs might exist."},{"question":"where are the apk files from google play?","response":"In older Android OS versions, apk files are usually stored in either '\/cache\/download' or '\/data\/local'. \nNowadays, however, the temporary location of the files is set by the Download Provider service, which is usually '\/data\/data\/com.android.providers.downloads\/cache'. \nHowever, this can vary between Android versions and manufaturers."},{"question":"i am missing the option to see the remaining battery life as time in the menubar?","response":"One opinion advises that Apple deliberately removed the option to display remaining battery time in the menu bar on MacOS, and there are no indications that this feature will return. \nUsers seeking an alternative can find it in apps like SlimBatteryMonitor, which saves more space in your menu bar and lets you choose what information to show in specific states. \nAnother solution is the iStat Menus app, which offers a broad range of information beyond just battery stats. \nA cheaper and simpler option is the app called Watts, which provides high configurability and includes features such as scheduling reminders and calibration for a modest cost. \nDespite the change in MacOS Mountain Lion that removed the remaining battery time feature from the menu bar, a very simple app has been created to specifically show time remaining: Battery Time Remaining, and it replicates this function with an almost matching icon design and additional features."},{"question":"how long does it take to restore icloud backup?","response":"It can take 1-4 hours per Gb to restore from an iCloud backup."},{"question":"how do i edit a .plist file?","response":"To edit plist files in the XML format, you can edit and create them in any text editor program like TextEdit. \nIn contrast, if the plist is in binary format, it requires conversion to XML before editing, which can be done via specific commands like 'plutil -convert xml1 file.plist'. \nPrograms like TextWrangler allow editing of binary .plist files directly, without needing to convert them beforehand. \nAccording to one user, Xcode is the best free option and if you're willing to go commercial, Plistinator will edit both binary and XML plist files. \nOn a terminal window, PlistBuddy offers the capability to read and modify plist files interactively or directly. \nLastly, free Visual Studio Code editor can open, edit and save plist files in binary format with the help of the Binary Plist extension."},{"question":"how to use terminal to copy a file to the clipboard?","response":"To replicate a file to a new location on a terminal, use the cp command: cp \/path\/to\/file \/path\/to\/destination. \nAlternatively, the sequence of cat ~\/Desktop\/ded.html | pbcopy copies the file into the clipboard, and pbpaste > ~\/Documents\/ded.html pastes its contents into a specified document. \nHowever, the command line lacks the capability to duplicate a file as performed in the Finder, with pbcopy and pbpaste being unsuitable for non-text files, which may become corrupted if an attempt is made to copy them in this manner. \nHowever, you can explore the AppleScript and invoke it through the command line with osascript."},{"question":"gitlab account hacked and repo wiped","response":"If something goes wrong with your GitLab account, you can use git reflog in a clone and check out the last commit that was made before the problem occurred. \nIn response to a compromised git repository, you should change all the compromised logins and passwords and revoke any unknown sessions. \nIn a hacking incident, you can try to revert the last commit. \nAdditionally, you can utilize a local repository to force push the correct code back to the server. \nIf your build server has completed recent tasks, it may provide the information needed to recover the most recent state of the master branch. \nFor better security, set up SSH for communicating with GitLab rather than using a username and password combination. \nIt's also recommended to ensure your personal computer hasn't been compromised and to change passwords for all your online accounts as a precaution."},{"question":"why are ipv4 addresses 32-bit?","response":"This is because Vint Cerf considered 32-bits to be more than sufficient for that purpose; he did not expect IPv4 to be used in production systems and so no greater thought was given to the size of the address space."},{"question":"how is an atm secure?","response":"Physical locks can dissuade some thieves, while those willing to exert force to access the money may be discouraged by the risks involved when compared to less risky criminal activities. \nMany ATMs have alarms and are often bolted or chained on location to deter theft by physically moving the machine. \nMoreover, security features such as embedded security cameras, internal alarms, and secure placement in small, constructed rooms are utilized. \nATMs are designed to be tamper-resistant and to react to any detected security breaches, which may include marking bills with ink that is difficult to remove. \nThe ATMs' interior components are housed within a heavy safe, and their location in a well-trafficked public area provides additional security, as physical attacks require time or machinery that would draw attention. \nATMs are also secured with measures such as dynamite-proofing and ink-splattering to prevent the cash from being usable if the ATM is compromised. \nMechanisms are in place to alert the police in the event of tampering, and any ports on the ATM may be secured to allow only authorized devices through. \nAdditionally, ATMs may be equipped with content-destruction devices like paint sprayers, to further protect the cash within."},{"question":"how is the wannacry malware spreading and how should users defend themselves from it?","response":"Malware can infect a device through various means like a link click or opening an email attachment, and exploit vulnerabilities like ms17-010. \nWannaCry attacks exploited an SMBv1 execution vulnerability in Microsoft Windows OS, which was patched by Microsoft on March 14 and made public on April 14, 2017. \nTo avoid these attacks, make sure that all Windows-based systems are updated with the latest patches. \nThe ransomware uses a known vulnerability in SMBv1 (Server Message Block Version 1) protocol, that is publicly disclosed. \nEnvironments that don't support SMBv1 are safe and Microsoft provides instructions to disable SMBv1 support for those running Windows 8.1 or Windows Server 2012 R2 and later. \nWhile installing vendor patches is advisable, it's important to be aware that the malware conducts a DNS check upon activation. \nMonitoring network activity for new infections can be done using a command like this on a Linux\/Unix system, which detects a very long string as a domain component in DNS queries. \nIt is crucial to be aware of the existence of fresh versions of Wannacry, referred to as Wannacry v2, which are suspected to have different authors. \nConsider blocking inbound connections on port 445\/TCP as a preventive measure against the Wannacry malware. \nThe attack is a combination of phishing\/ransomware and worm-like spread within target networks, with Windows servers typically protected by firewalls. \nLinux machines running Wine are also vulnerable to WannaCry infection, as highlighted in a Twitter post. \nUS-Cert recommended blocking SMBv1 on January 18th, 2017, with comments suggesting Windows XP support continues due to the NHS paying Microsoft. \nA new version of \"WannaCry\" reportedly bypasses the kill switch."},{"question":"why do game developers prefer windows?","response":"One major factor is the overwhelming user base of Windows, which surpasses Linux and Mac, making it a pragmatic choice due to the sheer size of over 90% of its market share. \nWith 95% of PC users utilizing Windows, especially in the realm of PC gaming, it has become the predominant environment for game developers, with even those who use Mac or Linux most often running Windows games through some virtualization or emulation. \nIn contrast, Linux is considered a mess for development, with Windows offering better backward compatibility and platform stability. \nThe substantial backing of Windows by a large organization that actively promotes game development on its platform plays a pivotal role. \nAdditionally, the lack of a central institution and the unavailability of essential tools make Linux less appealing to developers. \nAlso, if you've used Windows in the past then switched to something else, it's a hassle. \nThe market share of Windows on the desktop is bigger than that of OS X which in turn is bigger than that of Linux, along with money, influence and brand. \nPolitical and control factors contribute to the preference for Windows, while the broader end-user base ensures a more significant market and potential revenue for Windows games compared to Linux games. \nAccess to top-notch development tools is another advantage that Windows offers developers. \nFurthermore, the combination of genuinely open development, deployment, and a large, active customer base makes Windows a compelling choice for game development."},{"question":"what is the proper term for ipaddress\/hostname:port","response":"Some possible terms are: socket address pair, 4- or 5-tuple, endpoint, authority, or host."},{"question":"what is difference between ls and find?","response":"The command \"ls -ltr file*\" lists the contents of the current directory in the long listing format. \nWhile \"ls\" only applies to the current working directory, \"find\" on the other hand applies to all files and subdirectories."},{"question":"single application not showing up in spotlight","response":"When apps are transferred to a new Mac and don't appear as expected, it can be due to extended attributes (xattr) related to the macOS Finder's copy functions, including those that indicate ongoing copy progress: if this is why Spotlight isn't displaying the apps, you have to manually remove these extended attributes via Terminal commands. \nAlternatively, a simpler resolution involves adjusting Spotlight's settings within System Preferences by deselecting and then reselecting the \"Applications\" checkbox; you may need to close and reopen \"System Preferences\" during this process."},{"question":"do i need to encrypt connections inside a corporate network?","response":"Encrypting connections on intranet resources over HTTP is necessary. \nAs long as no one else connects to the network and there are no technically proficient individuals within, it remains secure. \nHowever, traffic on an unsecured network by itself poses a security threat, even without hackers, due to the potential for repudiation issues. \nAnything not encrypted is vulnerable to attackers, and encryption is a measure to meet compliance standards like GDPR. \nA thorough threat and risk analysis should determine the necessity of encryption within your organization. \nLastly, leaving credentials unencrypted contradicts the necessity of using login credentials; if you cannot drop the login form, do not send credentials unencrypted."},{"question":"is it good or bad practice to allow a user to change their username?","response":"You're better off not allowing users to change their usernames because it presents an issue if a user's account information is stolen, as the attacker can now completely change everything on the account, but it really depends upon your threat model. \n\nThere are a few points for and against it: if someone is being harassed, changing a username is an easy way to escape the attention of other people in order to get away; if someone is harassing other people, changing a username is an easy way to trick other people in order to get by initial defenses. \n\nYou could go the middle way, and allow a single automated change, such as once per year. \n\nAllowing a change of usernames where it wasn't originally planned for makes auditing\/logging slightly harder, because if your log entries don't map the username to the original primary key of the activity in your system, you will have to reconstruct this manually."},{"question":"fastest and safest way to copy massive data from one external drive to another","response":"For transferring large volumes of data, remote sync, or rsync, is a reliable choice. \nAnother technique frequently used for successful file copying is the command: cp -Rfv sourcefile destinationfile. \nNon-command line users have the option of the FreeFileSync app, which efficiently synchronizes data across devices. \nBittorrent sync can be utilized for synchronizing substantial amounts of data, for example, 8TB between different storage devices. \nIf an exact copy of a drive is required, the Disk Utility in macOS offers a Restore function that performs a block copy, proving to be faster than traditional file copying and ensuring data integrity."},{"question":"how do you make someone not your best friend on snapchat?","response":"They are selected automatically by a magical Snapchat friendship algorithm, so there isn't anything much you can do, other than blocking the users to remove their names from the list."},{"question":"now that it is 2015, what ssl\/tls cipher suites should be used in a high security https environment?","response":"What is the 'ideal' cipher suite completely depends on the application and target audience, but you should rely chiefly on the AEAD suites, which provide strong authentication and key exchange, forward secrecy, and encryption of at least 128 bits. \n\nA good way to test the security of public HTTPS websites is Qualys SSL Labs."},{"question":"how to keep a big and complex software product maintainable over the years?","response":"The essential practices to avoid code decay involve simplicity, clarity, and responsible oversight. \nMaintaining a simple architecture ensures developers comprehend the system, leading to better code quality. \nIt's recommended to aim for low coupling and high cohesion across the project to isolate maintenance issues and enhance manageability. \nAssigning architectural responsibility to a skilled individual helps maintain consistency, and instilling a culture of collective architectural ownership ensures that all developers are invested in the system's integrity. \nDocumentation should be clear, concise, up-to-date and accessible, aiding in understanding and tracking architectural decisions. \nCode developed and successfully tested should not be modified; instead, seek to extend classes or employ suitable design patterns without altering the original working code. \nContinuous refactoring, writing unit tests, and holding team discussions are crucial for identifying and rectifying potential problems early in development. \nConsistently adhering to coding standards and ensuring a clean development environment also significantly reduce the risk of a cluttered codebase. \nAdditionally, it is important to have a knowledgeable leader and refactor while writing unit tests to manage design debt. \nLeaving code cleaner than you found it, tying your version control to your bug tracker, and establishing checklist-like procedures for releases and builds further streamline the maintenance process. \nPlan ahead for turnover, use the right, mainstream technologies, and maintain comprehensive documentation. \nDespite pressure, avoid hacks and document design, dependencies, and architectural choices to facilitate understanding and maintenance. \nLastly, small, independent, unit-tested libraries can improve software modularity and adaptability to changing requirements."},{"question":"what is gtkrc in linux?","response":"The gtkrc file serves as the configuration for Gtk, which is the library used by the graphical user interface of GNOME applications, among others."},{"question":"is there a way to make the menu bar show at all times in fullscreen windows?","response":"It's now possible to do this in macOS Monterrey. \nYou can manage window sizing and arrangement by using ALT\/OPTION and clicking the green maximize button. \nAdditionally, you can use gestures, such as a 3 or 4-finger swipe up, to access the spaces menu, facilitating the efficient organization of Desktop Spaces for apps. \nThe BetterTouchTool enhances window management by allowing user-defined actions for maximizing windows and mimicking the window-snapping feature found in Microsoft Windows. \nDouble-clicking the window title bar is also a technique to maximize the window, offering an additional option. \nLastly, macOS 12 Monterrey provides a setting in System Preferences \u276d Dock & Menu Bar that lets you keep the menu bar visible in full-screen mode, an important aspect to note."},{"question":"how to show the filesystem type via the terminal?","response":"To determine the type of file system used, you can employ the mount command."},{"question":"what should a website operator do about the heartbleed openssl exploit?","response":"This requires more than just new certificates (or rather, new key pairs) for every affected server, as it also requires: patching affected systems to OpenSSL 1.0.1g, revocation of the old keypairs that were just superseded, changing all passwords, and invalidating all session keys and cookies."},{"question":"how to determine linux kernel architecture?","response":"i386 and i686 are both 32-bit; x86_64 is 64-bit. \n\nWith regard to uname -m: x86_64 GNU\/Linux indicates that you've a 64bit Linux kernel running, and i386\/i486\/i586\/i686 it is a 32 bit kernel. \n\nAnother way is to check what architecture a system file was compiled for. \n\nYou can use the arch command. \n\nYou can run: getconf LONG_BIT which will output 64 or 32 depending on whether it is 32 or 64 bits. \n\nUse syscap from Formake project, as syscap allows probing of many system properties and test dependencies: to get CPU architecture use syscap info -arch; to get kernel name and version use syscap info -kernel -kernver. \n\nIf you need to detect 8- 16- or some-other-bit architecture: [ $((0xffffffff)) -eq -1 ] && echo 32 || echo 64. \n\nOn a 32-bit system, -1 can be represented by the hex value 0xFFFFFFFF (which is 32 binary bits, all equaling 1), and on a 64-bit system, 0xFFFFFFFF translates to 4,294,967,295, base 10, while 0xFFFFFFFFFFFFFFFF is the representation for -1). \n\nThere is also lscpu: display information about the CPU architecture."},{"question":"where do executables look for shared objects at runtime?","response":"In Linux, it is well-documented within the ld(1) man page that the linker behavior involves a specific sequence of paths to find the necessary shared libraries, starting with any paths indicated by -rpath or -rpath-link options. \nThe difference between -rpath and -rpath-link is that directories specified by -rpath options are included in the executable and used at runtime, whereas the -rpath-link option is only effective at link time. \nFor locating dynamic libraries in Linux, the linker tries LD_LIBRARY_PATH environment variable ((DYLD_LIBRARY_PATH on OSX), directories listed in the executable's rpath, directories on the system search path, which (on Linux at least) consists of the entries in `\/etc\/ld.so.conf plus \/lib and \/usr\/lib`."},{"question":"osx yosemite - mission control stopped working","response":"A simple reboot of the system restores its functionality. \nAlternatively, restarting the \"Dock\" process without a full reboot using the 'killall Dock' command in the Terminal proves effective for regaining control. \nFor a more direct approach, execute the command 'defaults write com.apple.dock mcx-expose-disabled -bool FALSE' in the Terminal to enable the feature, followed by the 'killall Dock' command to restart the Dock. \nLastly, adjusting settings directly in the OS\u2014such as setting the \"Dashboard:\" dropdown to \"As Overlay\" in the System Preferences under Mission Control\u2014solves the issue."},{"question":"received a set of sms\/mms containing 2 photos, a voice message, and a text i need help with google maps link from a known contact. is it spam?","response":"The situation described is likely not due to a virus but a panic function included in some Android phones, which can be activated by pressing the power button three times to send emergency messages if the user is in danger. \nThis panic feature is a safety mechanism built into certain phones, which can send pictures, audio clips, and GPS locations to designated contacts."},{"question":"why doesnt http have post redirect?","response":"A POST request has the potential to alter a resource that might be significant for users or others, and performing such actions usually requires the user's deliberate decision, as opposed to a GET request, which is designed for retrieval without serious consequences. \nThe differentiation between safe and non-safe methods was deliberately maintained by the HTTP designers, emphasizing the need for user awareness in the execution of these actions."},{"question":"what is com.apple.bird? why does it grow so big?","response":"'Bird' is a component integrated within the iCloud framework. \nIt's common for individuals to find that they have a substantial Bird cache if there are documents waiting to be uploaded or otherwise processed. \nHowever, in general, the com.apple.bird cache tends to maintain a level of cleanliness, and its size is usually manageable; for example, it can be as small as 400 KB. \nDespite the temptation, deleting files from the Bird cache is not recommended, as it could lead to repeated uploads or, in severe cases, data loss or errors related to iCloud documents."},{"question":"is html a subset of xml?","response":"XHTML is a subset of XML, while HTML and XHTML are both subsets only of SGML."},{"question":"what is the difference between a smart switch and unmanaged switch?","response":"Smart switches are moderately capable and occupy a middle price range, being more expensive than unmanaged switches but less costly than managed switches, which makes them a suitable intermediary solution when the full features of a managed switch are not warranted. \nManaged switches are typically utilized in large, professionally managed networks due to their comprehensive management features and the perception of enhanced reliability they offer."},{"question":"does filevault encryption slow read\/write access on an ssd?","response":"FileVault 1 was known to noticeably slow down the system. \nThe performance degradation with FileVault 2, however, is reported to be extreme and should be avoided for all who spent money upgrading to an SSD. \nIn contrast, some users have found that the slowdown with FileVault 2, such as on a Samsung 840 EVO in an early 2011 MacBook Pro running Mavericks, is not noticeable."},{"question":"why are my apps all in the cloud?","response":"A cloud next to an app's icon indicates that the offloading feature for unused apps is activated and the specific app was removed, yet its data remains and the app can be restored simply by tapping on it."},{"question":"why is the same origin policy so important?","response":"Google Analytics has the potential to perform any action they choose with your users due to the nature of script tags creating exceptions to same-origin policy restrictions. \nIt is likewise crucial to recognize that the origin of the document in which the script operates, rather than the origin of the script itself, is what the same-origin policy considers significant."},{"question":"can i use multiple android devices with a single google account?","response":"Using multiple phones with one account presents no issues, as paid applications are tied to your Gmail account and not to a specific device. \nIt is feasible to utilize the same Google account on various devices without being compelled to maintain the same apps across all devices, and paid apps can be re-downloaded on different phones without extra charges. \nA majority of Android devices can be activated using a primary Gmail account, and the synchronization of data like email, contacts, and calendars operates seamlessly."},{"question":"why cant devices on different vlans, but on the same subnet, communicate?","response":"You have two hosts on two distinct L2 networks without anything to allow them to communicate. \nThere will be no ARP reply; the next thing that happens will be a timeout on A, followed by subsequent repeat ARP requests, until the application gives up."},{"question":"how does learning assembly aid in programming?","response":"Learning assembly language can enhance your understanding of core concepts in computing, such as memory allocation, parameter passing, and architecture. \nIt reveals the costs associated with function calls, and the handling of recursive functions and demonstrates why high-level constructs are designed the way they are. \nThe pursuit of such knowledge, however, should be driven by necessity or curiosity. \nBefore delving into assembly, a solid grasp of C or C++ is recommended due to their relevance in practical applications. \nWhile detailed knowledge of the hardware level is not mandatory, an appreciation for the complexity and impact of your code is beneficial. \nConversely, if knowing assembly does not directly contribute to your area of work, focusing on more pertinent skills, such as software design and problem-solving, might be more advantageous. \nFor developers working with high-abstraction languages, understanding the next level down can aid in debugging and writing efficient code. \nFinally, in some special cases, learning basic assembly could provide a foundational understanding that simplifies higher-level programming concepts."},{"question":"creating diagrams in ascii","response":"For individuals interested in creating various types of diagrams, there are several tools available in Emacs, such as artist-mode or picture-mode, as well as applications like ditaa. \nWhen using vim, the DrawIt plugin enables the creation of basic diagrams. \nJava-based JavE is another option for generating ASCII diagrams. \nOther tools include asciio or graph-easy (which you can install with this command: `wget http:\/\/search.cpan.org\/CPAN\/authors\/id\/T\/TE\/TELS\/graph\/Graph-Easy-0.64.tar.gz tar -xzf Graph-Easy-0.64.tar.gz cd Graph-Easy-0.64 perl Makefile.PL make test sudo make install PATH=$PATH:\/opt\/local\/libexec\/perl5.12\/sitebin\/graph-easy`, which also has wrappers lddot and dothost that provide nice screenshots. \nFor Mac users, Monodraw is suggested as a highly polished tool for diagram creation, which although not free, is praised for its value in saving time and aiding productivity."},{"question":"what is the benefit of compiling your own linux kernel?","response":"By compiling the kernel yourself, you can ensure that it includes only the components that are relevant to your particular computer, which can potentially reduce the size of your kernel and make boot time faster."},{"question":"are bad programming practices typical within the software industry?","response":"It's not unusual to find the application of academic concepts in software engineering to be relatively rare in the industry due to its vast diversity and the specific needs of different sectors. \nWhat one learns in the field of software engineering at university might not be commonly employed in many professional settings, as everyday software-related issues in non-software companies tend to be resolved with simpler solutions. \nIn the software industry, encountering less-than-ideal practices and results is quite typical, similar to the experiences one might have with any other tradesperson. \nThe root cause often relates to various factors within the organizational structure that affect how software development is handled."},{"question":"why is looping over finds output bad practice?","response":"One key issue with parsing command output in shell scripts is that whitespace can interfere with filename recognition, causing files with spaces in their names to be incorrectly processed as separate entities. \nMoreover, it's problematic to rely on looping over file names obtained from the `find` command because filenames might include a variety of characters, and relying on a specific character as a delimiter isn't failproof, which can compromise the robustness and safety of scripts."},{"question":"what is popd in bash?","response":"When using the popd command, you are essentially able to return to the last directory that was added to the stack and manipulate the directory stack. \nFor example, you can release the current directory from the directory stack or to delete it from the history of visited directories, either because you're done with it or for other reasons, using the popd command. \nThe popd command first switches you to the directory at the top of the stack then removes that directory from the stack documentation."},{"question":"do apple alarms turn off by themselves?","response":"The iOS 10 alarm clock will turn off after 15 minutes, and there's nothing you can do about it as it's built that way."},{"question":"macbook pro lock screen hotkey without sleeping?","response":"You should first enable the requirement for a password after the screen saver or display sleep begins. \nHigh Sierra and subsequent versions have introduced an Apple Menu item that uses the shortcut control+command+Q to lock the screen. \nYou can add the Lock Screen to your Menubar if you're using Sierra or an older version. \nBetterTouchTool allows customizable keyboard shortcuts to trigger a screen lock or start the screensaver. \nBy using FastScripts, you can download and assign a keyboard shortcut to a script that locks your screen. \nYou can also download and install LockScreen.scpt and save it to ~\/Library\/Scripts\/ , then assign the keyboard shortcut of your choice to LockScreen.scpt within FastScripts preferences. \nKarabiner is another tool that can configure custom keybindings, such as a shortcut for locking your screen. \nTo simply put the display to sleep, the command 'pmset displaysleepnow' can be used. \nHigh Sierra has a built-in shortcut CTRL+command+Q for screen locking. \nLastly, you can use Hot Corners to set up screen locking or sleeping actions."},{"question":"can huawei mediapad make phone call?","response":"Generally, tablets without a call functionality cannot be used to receive calls. \nThe SIM card slot in such devices is intended only for accessing mobile data services. \nFurthermore, while there is no app to enable GSM, you can use Voice over Internet Protocol (VoIP)."},{"question":"choosing between single or multiple projects in a git repository?","response":"Tools like git bisect become more difficult to use when you fracture your repository into sub-repositories. \nWhile splitting the model, controller, and UI might seem sensible, it's not always the best approach. \nA multi-repository approach can be a reasonable solution, especially when a single repository would be too large to be efficient. \nIt's essential to ensure that functional domains are properly stand-alone in their respective repositories, treating each service as its repository."},{"question":"why is it not possible to use the cut command to manipulate a file in the finder?","response":"In Finder it's no possible to cut files. \nHowever, there are apps available that allow this functionality, namely MoveAddict and TotalFinder. \nOtherwise, on Mac the keyboard commands are Cmd-C then Opt-Cmd-V for cut and paste respectively. \nOr if you prefer using the mouse, you can drag the file to the target folder's parent, wait for it to spring open, and then continue dragging the file to where you want it."},{"question":"why do sites implement locking after three failed password attempts?","response":"The lockouts are intended to prevent a brute-force attack, and also provide protection against password guessing by human attackers, especially by individuals who already know of a portion of the password, for example, by looking over someone\u2019s shoulder, plus you can use it to trigger a warning that an attack is happening. \n\nCompanies that are public (sell shares in stock exchanges) are regulated under Sarbanes-Oxley Act, which requires critical software applications to comply with certain security features, one being to lock accounts after failed password attempts. \n\nHowever, some suggest conducting a business-focused risk-analysis trade-off: figure out how many failed, legitimate attempts are likely, then double it."},{"question":"what window management options exist for os x?","response":"There are several options: SizeUp, ShiftIt, Arrange, MercuryMover, NuKit, Divvy, Afloat, Zooom\/2, Stay, Optimal Layout, Breeze App Store, Moom, Cinch, BetterTouchTool, BetterSnapTool, DoublePane, Magnet, HyperDock, SizeWell, Flexiglass, Spectacle, Slate, Amethyst, Alfred plugins, Window Maker MacPorts, Sticker, Zephyros, Better Window Manager, FastScripts, HazeOver, Magnets App Store, iSnap, Window Keys, Gridsutra, Split Screen, or ChunkWM."},{"question":"disable line wrapping for output in the terminal","response":"To disable line wrapping for output in the Terminal, you have to pipe the output through less with the -S or --chop-long-lines option. \nAlternatively, you can use the cut command, specifying the desired number of characters to display, for example, myscript | cut -c -100."},{"question":"is it unusual for a small company (15 developers) not to use managed source\/version control?","response":"Working without source control is not standard practice for any size of programming team, and for a professional team, it's considered inexcusable not to use such version control systems. \nThis consensus is reflected across multiple sources, indicating that not using source control is by no means normal. \nA variety of reasons for implementing source control are mentioned, including the organization and management of changes, branching, and automated merging capabilities that version control offers. \nAdditionally, it is highlighted that source control allows for precise tracking of changes, who made them, and when, alongside the ability to maintain different project versions and work cohesively on the same files."},{"question":"os x computer name not matching what shows on terminal","response":"It's perfectly normal, because when you login Terminal remotely bash does a reverse DNS lookup. \nIt would only be the same if the reverse lookup failed to resolve, or if the hostname is not specified on the network you're connecting from and there is no reply from the DHCP server."},{"question":"viewing all iptables rules","response":"To list the current firewall rules using the -L or --list option, you must specify the appropriate Netfilter table which could be one of filter, nat, mangle, raw, or security. \nIf you do not specifically indicate a table, it defaults to the filter table, so you can try iptables -t nat -L. \nTo view the firewall's complete state, it is necessary to invoke iptables on each table successively with the -v option for detailed output. \nThe -S or --list-rules command also lists all active rules, working even if the service is not running, and defaults to the filter table unless otherwise specified. \nFor comprehensive lists, commands such as iptables -vnxL or iptables -vnxL -tnat with various table options are used, although some like -traw, -tmangle, and -tsecuriy are seldom needed."},{"question":"does not belong to that event store?","response":"Close the Calendar app completely, then retry, or try editing the default calendar settings (Settings -> Mail, Contacts, Calendars -> Calendars."},{"question":"cat line x to line y on a huge file","response":"An effective method for achieving this is combining the `head` and `tail` commands like this: head | tail, as it avoids reading more lines than necessary. \nIt has been suggested to consider the `sed` solution, although it might not be the fastest. \nFor instance, if X=57890000 Y=57890010, run the command `sed -n -e \"$X,$Y p\" -e \"$Y q\" filename`. \nFor a fast operation using line numbers, employing `tail` and `head` in commands, like: `tail -n \"+$X\" \/path\/to\/file | head -n \"$((Y-X+1))\"` is recommended, especially when dealing with a large part of a file."},{"question":"is it normal for people to not work?","response":"One possible reason for lackluster work attitudes could be the example set by management, which influences employee behavior. \nMany individuals may be doing just enough to avoid termination, satisfied with just receiving their paycheck. \nIn roles where extra effort doesn't equate to additional rewards, employees may not find the incentive to push themselves harder, setting a lower standard to avoid increased expectations. \nOrganizational inefficiencies, such as excessive bureaucracy, can also hinder motivation by slowing workflows, contrasting with the dynamic nature of less structured environments like startups. \nIt's important to note that not all jobs, like software development, are marked by continuous active work; much of the time can be spent planning and problem-solving rather than coding. \nIf individuals appear unproductive, it could indicate underlying systemic issues. \nEffectiveness in work is complex and cannot be solely judged on immediate output; factors like employee contentment play a significant role. \nMoreover, developer productivity can vary based on experience and the nature of the job, with less coding but more thoughtful work expected from senior roles. \nEvery industry has varied work ethics, and adapting or seeking a better-suited environment is important. \nFurthermore, productivity styles can differ, with some professionals interspersing bursts of intense work with periods of apparent inactivity, which may be misconstrued as laziness. \nIt's important to avoid quick judgments about work ethic, someone surfing might be spawning multiple background threads and thinking about the best way to tackle a problem, or someone else might seem inactive because they're waiting for their code to compile. \nIn making the distinction between professionals and workers: professionals often need time to think and innovate, differentiating them from more routine task-oriented workers. \nFeeling unobligated to work hard can sometimes stem from a lack of engagement or appreciation by management, and there can be a strategic aspect to pacing one's work to manage expectations. \nPair programming is recommended for increasing focus and reducing distractions. \nIt's also worth noting that workplace culture and personal values heavily influence work habits, and finding a rewarding and challenging job can lead to a better work-life balance. \nIt is considered normal for some individuals to put in less effort while others work at their maximum capability. \nOur culture pays people for working a 40 hour (or X hour) week rather than on a task basis, which is a terrible idea because it offers no motivation."},{"question":"how do i add x days to date and get new date?","response":"You can specify \"+x days\" to calculate a future date using the date command string: `$date -d \" + 10 days`. \nIt's also possible to use the -d switch to calculate dates, for instance, adding or subtracting days to a given date. \nIn order to get 1 day back date using date command: `$ date -v -1d` will give (current date -1), `$ date -v +1d will give (current date +1). \nIt supports calculating dates for years, months, weeks, hours, minutes, and seconds by replacing \"d\" with the appropriate time unit. \nHowever, special care must be taken with time zones when using the -d switch, especially when daylight saving time changes occur, as this might affect the calculated dates like date -d \"$myDate + 10 days\"."},{"question":"is it possible to use boot camp with windows 10 from an external hdd?","response":"This is possible and one approach is to use the instructions originally for Windows 8, with some different terminal commands for Windows 10. \nAnother approach is, if you have Parallels or VMWare, get hold of two free Windows Utilities, miniTools for formatting and setting up the external drive and WinToUSB. \nAdditionally, you can use commands which are in the ISO instead of using the Automated Installation Kit. \nAfter the progress reaches 100% and integrity checks are through, you'll have a WIM file alongside the ESD file, run: Dism \/apply-image \/imagefile:install.wim \/index:1 \/ApplyDir:E:\\ \/CheckIntegrity. \nStart from scratch and follow the steps, googling each one before starting and getting information on hardware requirements. \nAn alternative approach is to run Boot Camp Assistant to put the Windows drivers onto a separate USB stick and to download Windows 10. \nThen transfer the ISO to your Windows installation, go into Windows: Install Windows ADK, uncheck all alternatives except \"Deployment Tools\", double click the Windows ISO to mount it as a drive Plug in the external USB drive, plug in the external USB drive and open an elevated command prompt. \nFinally, a simple method is to use Windows GO."},{"question":"what does c++ do better than d?","response":"One opinion offers that when programming in C++, you can attain complete control over your program, signifying total freedom to tweak and adjust intrinsic features such as memory allocation or the standard library to your specific needs. \nWhat can be done in D is not particularly notable and doesn\u2019t substantially outshine what C++ is already capable of, diminishing its attractiveness to C++ programmers. \nAnother opinion advises that D simplifies certain aspects by having just one casting operator whereas C++ has four, which can streamline some programming tasks but might lack the nuanced control found in C++. \nD has far fewer implicit casts than C++ and is more likely to declare that two functions are in conflict with each other. \nAnother perspective is that C++ surpasses D in terms of quality like better compilers, tools, more mature libraries, more bindings, more experts, more tutorials, etc.; basically, having a better variety of all the external elements to be expected from a more mature language. \nAdditionally, it is offered that the state of affairs is better in D and D disallows multi-root hierarchies but you cannot throw an int whereas you can in C++. \nOne opinion appreciates the ability in C++ to document a function argument or return value as a C++ reference instead of a pointer, hence implying taking a non-null value. \nC++ is much better at forcing you to be verbose, which might be better or worse in your eyes, depending on whether you like inference or verbosity. \nIn D, value-type inheritance isn\u2019t feasible, impacting the usage of RAII with stack memory. \nLastly, most important thing that C++ \"does better\" than D is interfacing with legacy libraries and benefits from having multiple independent vendors."},{"question":"if someone blocks you can they still facetime you?","response":"No, blocking a number will block it for normal calls, FaceTime and FaceTime audio."},{"question":"how many pictures can i store on my ipad?","response":"Assuming that each picture you shoot is 1 MB, 20,000 pictures will take up 20,000 MB, which is approximately 20 GB, so you can upload 40,000 more if you have an additional 40 GB to work with."},{"question":"can visa gift cards be traced?","response":"Visa gift cards can be traced due to the fact that purchases made with the card are tracked. \nFurthermore, every transaction is reviewable via Go Wallet or vanilla VISA."},{"question":"android browsers about:debug, what do those settings do?","response":"The option called \"Enable GEP Zoom\" on the HTC Desire HD is found under Menu > More > Settings, which disables the Text reflow feature and instead uses the standard Google Zoom functionality."},{"question":"how to run find -exec?","response":"Using the command `grep chrome`, you can search for occurrences of the word \"chrome\" in the current directory or recursively in all subdirectories. \nAn alternative method is to combine `find` with `grep` through an `-exec` command, such as `find . -exec grep chrome {} \\;` or `find . -exec grep chrome {} +`, which will either perform a `grep` for each file found or process as many files as possible in one go. \nFurthermore, you might use `find . | xargs grep 'chrome'` to produce a list of files containing \"chrome\", with the option to add `-ls` to only list the files rather than showing the lines within the files. \nTo specifically list files containing \"chrome\" without the lines, you can use the commands `grep -l \"chrome\" *` or `grep -r -l \"chrome\"`. \nLastly, the `find . -name \"*.py\" -print -exec fgrep hello {} \\;` sequence is useful for locating `.py` files and searching for the string \"hello\" within each file, printing both the file names and the lines that contain the search term."},{"question":"good detailed explanation of \/etc\/network\/interfaces syntax?","response":"In the context of network interfaces, a VLAN interface specifies its \"father\" or primary interface, while a bridge interface defines the interfaces that are its members. \nWhen discussing services for network interfaces, `ifup` and `ifdown` play a role, indicating that they pertain to bringing interfaces up or down."},{"question":"is your ssh password revealed when you attempt to connect to the wrong server?","response":"When using password authentication, the password is transmitted in plaintext to the remote server after an encrypted connection has been established."},{"question":"how to fix homebrew error: invalid active developer path after upgrade to os x el capitan?","response":"One solution to an issue encountered after updating macOS to Mojave was to install Xcode directly from the App Store. \nIt's also possible to resolve the problem by running the install command with sudo, and in cases of modified permissions, it may be necessary to use force root with the command `sudo xcode-select --install`."},{"question":"is `sudo` almost useless?","response":"Most anything without a Secure Attention Key is \u201calmost useless\u201d, and Sudo has no real security purpose against a malicious third-party, so, yes, it is basically useless for that purpose. \n\nHowever, it depends on how you configure Sudo, and it can be far from useless, as an admin can assign privileges flexibly and granularly and have accountability options (decent logging), but Sudo should be configured so that you are asked for a password."},{"question":"why ocaml is not popular?","response":"Some attribute its lack of popularity to too many people being taught ML as part of an introduction to odd and confusing theory about types. \nAdditionally, there is a prevailing notion that OCaml is primarily an \"education-only\" language, restricting its adoption in professional development. \nThe presence of a garbage collector in OCaml is cited as a factor contributing to its inherent nondeterministic nature. \nPractical issues also play a role, with inadequate tool support being a significant hindrance. \nThe debugger's limited functionality, especially on Windows, and a scarcity of development tools contribute to challenges in OCaml adoption. \nAnother crucial aspect is the absence of a sustained effort to propel OCaml into the mainstream, preventing it from gaining wider recognition and usage. \nThe perception that OCaml isn't immediately useful \"out of the box\" contributes to its limited appeal. \nSome find the cost\/benefit analysis of OCaml disadvantageous. \nThe unclear cost model and difficulty in predicting performance further add to the challenges faced by potential users. \nThe OCaml community's failure to develop a comprehensive standard library is considered a significant drawback. \nFor some, it is a problem of developers not feeling comfortable with the functional way of doing things. \nA lack of tutorial information, poor Windows support, and a steep learning curve have collectively impeded OCaml's adoption. \nAdditionally, the functional programming paradigm, which OCaml embraces, is not inherently intuitive for many developers, as procedural programming dominates initial learning experiences. \nThere is a political problem: OCaml's developers do not have the resources available for a robust library, but they are unwilling to release control of the product to the community which does have these resources. \nLastly some say that the problem with OCaml is not the language but the people who develop it, and by extension, a license problem (using the Q Public license for the compiler)."},{"question":"how to get the chrome tabs to always show when in full screen mode?","response":"To enter full screen mode that displays tabs, use Control-Command+F. \nThere is some disagreement about what Shift+Command+F does in this context, with some saying it will enter full screen mode and some saying it is for presentation mode."},{"question":"agpl - what you can do and what you cant","response":"AGPL introduces, in addition to GPL, the notion of who the user is. \nThe distinction is significant because while GPL considers the operator of the server as the user, AGPL expands this to include the actual end users of a web service or application. \nHence, if these end users are utilizing your application, you are effectively distributing the app, thereby necessitating adherence to GPL's conditions. \nRegarding the distribution of (A) GPL-licensed software, it cannot be shipped with the final product even as an isolated application\u2014for instance, bundling them in the same archive or storage is prohibited. \nHowever, providing instructions on acquiring the GPL software separately and integrating it with your application is permissible."},{"question":"is it dangerous to post my mac address publicly?","response":"No, disclosing the MAC address in itself shouldn't be a problem, as it\u2019s unlikely in most cases that disclosing your Mac address will pose any threat to your security, or any direct risk to you as a person, unless you're trying to remain anonymous. \n\nThere are some theoretical hazards, but in practice, anyone in a situation to exploit them has other ways to get your MAC address. \n\nOne theoretical scenario is if someone knew you MAC address when you were connected to a public Wi-Fi network with a paid subscription for internet access, someone disguising themselves with you MAC address would gain internet access at your expense, and the traffic will appear to come from your computer. \n\nSome Belkin routers set a default WPA password that could easily be derived from the router\u2019s MAC address, so if the default isn\u2019t changed, publishing your MAC address is an obvious security risk, because you\u2019re effectively publishing your WPA password. \n\nA MAC leak can reveal information about a server and, in a reported case, when a server was changed someone outside the organization became aware, and questioned the organization, causing worries about the possibility the server had been hacked, so in that sense it is dangerous."},{"question":"are passwords stored in memory safe?","response":"To keep the password safe and secure from end-to-end, particularly in .NET environments, you can use the PasswordBox control paired with the SecureString class. \nIt comes down to ensuring nobody can escalate to obtain these privileges. \nWhen you store a password in RAM, you are trusting the OS to keep that confidential. \nHowever, the safeguarding of passwords goes beyond software measures; if an attacker has physical access to your machine, they can potentially read your keys directly out of your memory. \nEven with encrypted keys, certain attacks, such as the cold boot attack, can compromise password security and retrieve your password. \nTo further mitigate risks, especially on machines with multiple users or software you do not trust, avoid doing any security-sensitive computing. \nAdditionally, consider running proprietary projects and trusted tasks on separate machines to ensure better security through physical separation. \nWhile certain precautions can be taken, like zeroing out secrets from memory after use, it should be noted that these measures cannot prevent all forms of physical attacks. \nMoreover, interfaces like FireWire and Thunderbolt present an additional risk as they can be exploited to bypass operating system protections and access plaintext passwords, so passwords stored in plaintext in RAM shouldn't be considered as safe."},{"question":"unix\/linux undelete\/recover deleted files","response":"To recover deleted files, one could utilize the \"Linux debugfs Hack: Undelete Files\" which provides a straightforward guide on file recovery using debugfs commands. \nOne user declares ext3grep superior to debugfs, photorec, and extundelete programs, finding its syntax very easy. \nUsing 'del' instead of 'rm' is also suggested as it has an undelete function and is compatible with any file system. \nOther methods include 'grep -a -C 200 -F 'Unique string in text file' \/dev\/sdXN' where \/dev\/sdXN is the partition containing the lost file, using the testdisk utility ('Undelete' within the '[Advanced] Filesystem Utils', 'ufs-explorer and photorec', or 'ext4magic'. \nWhen using 'ext4magic', it is advised to clone the HDD before attempting recovery and to avoid saving to the HDD you are trying to recover."},{"question":"adb backup creates 0-byte file; prompts for current backup password even though i never set one; failed to set password for desktop backup password","response":"An effective approach you may use is to apply an earlier version of ADB, specifically version 1.0.31, which has been successful for others in similar situations. \nThough this also depends on the version of ADB running on your device, An alternative to consider is escaping the spaces in the backup command like this: adb backup -apk\\ -shared\\ -all\\ -system. \nFor some users, the command \"adb backup -all\\\" worked to initiate the backup process. \nIn situations where the backup command fails, executing it on ADB version 1.0.31 has proven to be a solution. \nUsers of ADB 1.0.32 may find that entering a password when prompted on the phone screen allows the backup process to proceed successfully through the Android Backup Extractor. \nIt is also important to make sure the package names are up to date, as outdated package names can result in unsuccessful backups."},{"question":"how to copy-merge two directories?","response":"A one-liner in the command line can be used to move files from one directory to another: `$ for dir in images2\/*; do mv \"$dir\"\/* \"${dir\/2\/}\"; done`. \nAnother method for moving files is by using this command: `for dir in images2\/*; do mv \"$dir\"\/* \"images\/$(basename \"$dir\")\"; done`. \n`rsync` is another option you can use to copy or move files between directories, using commands like `rsync -a \/path\/to\/source\/ \/path\/to\/destination` or `rsync -a \/images2\/ \/images\/` and various flags to modify its behavior, like `--remove-source-files` to remove the source files after copying. \nAdditionally, you can use `rsync` in a more advanced way, utilizing flags such as `-avh --progress` to synchronize files from source to destination, showing detailed progress, and ensuring human readability; `rsync -avhu --progress source destination Unison unison` synchronizes in both directions, `unison Source Destination` syncs both directories in both directions and finally, `source equals destination`is like doing rsync twice from source to destination and vice versa. \nFor more advanced usages look at the man pages or the following websites: https:\/\/www.cis.upenn.edu\/~bcpierce\/unison\/ and https:\/\/rsync.samba.org\/. \nThe `cp` command with the `--link` option offers a space-efficient method for merging directories on the same filesystem without duplicating data."},{"question":"why is my internal ip address (private) visible from the internet?","response":"Your internal IP address could be exposed due to the X-Forwarded-For header sent by your browser or ISP. \nAlternatively, it might be obtained through JavaScript running on your machine. \nWhile the underlying TCP\/IP protocol does not disclose your internal address during public internet routing, it can be disclosed through headers and service banners communicated at layer 7 and it will probably be coming from your perimeter router. \nA known technique to discover internal IP addresses involves using JavaScript's RTCPeerConnection. \nWebRTC's implementation in your browser, particularly in Firefox and Chrome, also enables the retrieval of local and public IP addresses, and this has been utilized by some websites to differentiate between real visitors and bots. \nThe use of RTCPeerConnection is confirmed by examining JavaScript code in some links, specific to browsers that support it. \nMoreover, methods like WebRTC are among several ways to unearth LAN IP addresses, as shown by past security research and method demonstrations."},{"question":"remove all files\/directories except for one file","response":"Use the POSIxly compliant command \"find . ! -name 'file.txt' -type f -exec rm -f {} +\". \nAlternatively, in bash, enable extended pattern matching using \"shopt -s extglob\" and then remove the files with \"rm !(file.txt)\". \nFor users with Zsh, negating the pattern with a caret symbol is possible by enabling extendedglob and using a command such as \"rm -- ^file.txt\". \nAnother solution is to preserve 'file.txt' using the command \"{ rm -rf * tar -x } < Devices\" in Xcode, remove the undesired profiles from your device, and then proceed to delete and reinstall the app. \nFor iOS 14.4 and Xcode 12.4 users, you can address the problem by going to \"Settings,\" then \"General,\" followed by \"Device Management,\" and clicking on \"Apple Development\" to trust an app."},{"question":"do personal hotspots use data?","response":"Hotspots do consume data even though your device might show an active WiFi connection. \nThis could potentially result in very high charges."},{"question":"is putty unix or linux?","response":"PuTTY, which has been ported to Unix and Unix-like systems, is known as pterm on these platforms."},{"question":"password hashing: add salt + pepper or is salt enough?","response":"The effectiveness of using a \"pepper\" in password hashing schemes depends on the context and may not always enhance security due to the increased complexity it introduces. \nWhile peppers can add to the strength of password hashes when a database is compromised but the application is not, e.g., during an SQL Injection Attack, this security is contingent on the pepper remaining unknown to the attacker. \nThe advantage of a pepper arises as long as the attacker has access to the hash values in the database but not to the server-side pepper. \nHowever, if the pepper length is sufficient, it can improve security. \nThe practicality of securing a pepper value highly depends on the server setup and may require specialized hardware, which could raise costs. \nNotably, current guidelines from authoritative bodies like NIST Draft recommend the use of pepper in digital identity verification to counteract dictionary attacks."},{"question":"how to get execution time of a script effectively?","response":"For a simple measurement, use the command \"time yourscript.sh\" when calling the script. \nIf you are exiting a script and wish to call times without arguments, you can use ksh or zsh, where \"time\" also measures wall clock time. \nIn the absence of the \"time\" command, you can use 'date +%s' to capture the start and end times to calculate the duration. \nAlternatively, Python can be used to format the output to show minutes and seconds using this: \"start=$(date +%s) end=$(date +%s) runtime=$(python -c \"print '%u:%02u' % ((${end} - ${start})\/60, (${end} - ${start})%60)\")\". \nTools like 'perf stat' offer detailed performance analysis, and running 'perf stat' reveals the average execution time. \nThe \"time [any command]\" syntax allows you to monitor various types of commands in a user-friendly manner. \nThe bash time built-in also works well for timing commands, with the option to format the output. \nFor more technically demanding situations requiring millisecond precision, bash can manipulate file descriptors and process substitution to achieve this without calling external programs. \nFinally, there is also the \"\/usr\/bin\/time -v command\" for a built-in alternative."},{"question":"make all new files in a directory accessible to a group","response":"In your setup process, you can manage permission bits using umask, as well as set a group by making the directory setgid to a GROUPNAME. \nWhen working with file systems and partitions related to Linux distributions, it is necessary to mount with acl support and utilize access control lists (ACLs) for better access control. \nTo enable ACLs on your file system, you may need to alter the mount options. \nYou can set up the directory's ACL to allow the group to have write permissions and to ensure these permissions are passed on to any files created within."},{"question":"is pcie-based flash storage same as ssd?","response":"Yes and no: SSD, or Solid State Drive, has flash storage inside, but SSD is a special form factor, in most cases meaning that it is designed to fit in places that a normal 2.5\" HDD would be installed; PCIe is a different form factor."},{"question":"whats the canonical retort to its open source, submit a patch?","response":"In response to \"it's open source, submit a patch\", you don't have to say anything, as developers are typically aware of issues affecting their users. \nSome say there is no reasonable retort that will make any difference. \nIt's more constructive to offer collaboration, such as stating, \"If you do it, I will include it,\" rather than dismissively responding with a \"no\". \nHowever, if you're not in a position to contribute to the work yourself, it's advisable to privately share your circumstances with the project maintainer rather than seek solutions from an open-source community when you do not intend to contribute. \nA polite yet firm response to rude suggestions like \"submit a patch\" is either to explain that the individual is being impolite or to cease the conversation with them. \nIn some situations, if confronting a skill mismatch, it might be appropriate to convey that a task is beyond your capabilities by saying, \"There is no way I can do it as fast and well as you can\" or \"I don't have the skills, experience or time required\". \nAlternatively, initiating a dialogue about the broader value of your feature to the community could influence their decision to reconsider its implementation. \nStill, if a suggestion or bug report receives an unwelcoming response or no response at all, sometimes the most effective course of action is to discontinue the use of the software. \nYou could also fork the project or switch to a well-maintained alternative. \nOther possibilities include \"thanks for the response,\" or \"submit a patch\"."},{"question":"list of all packages installed using homebrew","response":"Running brew list will show a list of all your installed Homebrew packages. \nIn addition, brew list --cask will provide the items installed using Homebrew Cask. \nYou may use brew list | grep 'package-name' or if are looking for specific package. \nBrew leaves shows you all top-level packages."},{"question":"what is the rootless feature in el capitan, really?","response":"Rootless, know officially as System Integrity Protection, limits the power of the root account, so that even if you become root, you don't have full control over the system. \nEssentially, it adds another layer of protection, which prevents malware from gaining root access."},{"question":"where are whatsapp voice notes stored on android?","response":"Your voice files are also stored in the Whatsapp folder. \nThe specific path for your voice notes is: WhatsApp\/Media\/WhatsAppVoiceNotes\/."},{"question":"mkdir when directory already exists?","response":"Using the `mkdir` command will result in an error if the directory you're trying to create already exists. \nNevertheless, if you employ `mkdir -p`, the command will not return the error and will leave the existing directory's contents untouched. \nThe `-p` flag specifically suppresses errors related to the directory's existence."},{"question":"when is it appropriate to not unit test?","response":"JUnit's philosophy suggests that if a piece of code is too simple, it should not be subjected to testing."},{"question":"how do i create my own programming language and a compiler for it","response":"Firstly, you'll need the right educational background; go to college and specialize in software engineering and taking every compiler class possible. \nYou'll also want to stick with math classes throughout high school and your 4 years in college, focusing on non-standard math topics (logics, group theory, meta-mathematics) in order to help you think abstractly. \nAlso, expose yourself to as many good programming languages as possible. \nStarting with machine code and progressing to more complex languages, one could write a simple assembler first, then use it to create a compiler for a simpler form of C, eventually advancing to develop more intricate languages. \nAlso, simpler assembly languages like the PDP-8 or \"mix\" can help to demystify the complexity of computers and programming. \nLearning languages such as Python or Ruby, which have well-documented, open-source implementations, helps to understand various features and paradigms in programming. \nTools like ANTLR, a language generating framework, can provide a good starting point for those new to compiler construction. \nWhen considering the design of your own language, reflect on the deficiencies of existing ones and think about solutions within a domain you are familiar with, which could lead to the creation of a domain-specific language. \nCreating your own grammar is a fundamental step in compiler construction, much like the grammar rules of any language; you can then follow these syntax rules to translate your code into machine code or another intermediate form. \nWhen it comes to creating compilers, it is key to remember that both the source and target languages need to be well-defined and specific; this can apply to any form of language, not just programming languages. \nBy learning how to parse and interpret these languages, you create a compiler. \nTo grasp the fundamentals of computer operation, it\u2019s essential to understand the architecture of a processor, the role of memory, and the function of interrupts that facilitate input\/output processes. \nEvery program, including compilers, essentially functions in three basic phases: reading input, processing it, and then writing the corresponding output. \nIn the realm of programming languages and compilers, it is important to break down complex problems into manageable parts, then write code line by line and rigorously test the resulting software. \nEngaging in a concrete project and experimenting with it will integrate the theory behind compilers and actual practice. \nFurthermore, actually doing will help you gain a better grasp of concepts compared to just theory. \nPractical steps in compiling include reading a text file and extracting information which you then use to perform transformations until the desired machine-readable format is achieved. \nAdditionally, using simulators to construct a complete computer system from scratch can be a very comprehensive and practical way to learn the entire process from fundamental principles. \nFor an introduction to assembly-level programming, writing an X86 assembler in Linux that supports a subset of standard X86 assembly is a practical project that will deepen your understanding. \nFor writing an assembler, begin by crafting an interpreted language, then translate your language into another one such as JavaScript or a lower-level language like C (the lingua franca) or Assembly."},{"question":"what is the difference between cat file | .\/binary and .\/binary < file?","response":"The main difference is in the error handling. \nWhen attempting to access a non-existent file, different behaviors occur depending on the approach used. For instance, using redirection with `\/bin\/cat` will show an error and return an exit status of `1`. \nHowever, if a pipe is used, the exit status after execution is `0`, not reflecting the error that occurred. \nThe `PIPESTATUS` array is a feature in bash that allows one to get the exit status of the most recently executed foreground pipeline, but it only holds the value immediately after the command is executed."},{"question":"i cant access websites that use https, instead getting the message your connection is not private!","response":"It seems your ISP is intercepting all traffic you send over the Internet, so query with them exactly why they need to see the details of your encrypted traffic (for example, is this a legal requirement for your country) and if you're not 100% satisfied with the response, get a new ISP. \n\nThis is a very simple technical issue: your ISP has blocked encrypted and secure HTTPS connections, and this is a request to surrender all your privacy and security to them. \n\nEffectively, this is telling you that your ISP is reading your mail, and you can accept their certificate if you have no objection, otherwise, a good paid VPN can be a solution, if that is not being blocked as well, but it is better not to do what they say, and changing your ISP now is your best choice. \n\nThe error you're receiving is actually a common problem, and does not require you to install certificates, so, depending on your region, what they are doing may be looked at as a human rights violation under \u201cright to private life\u201d; all you are expected to do is make sure your systems are not compromised and you set your clock so that security certificates will work."},{"question":"how many hours can you be really productive per day? how?","response":"The actual productive time individuals manage to achieve varies, with some reporting about 4 hours of productivity within a 7-hour day, while others achieve an average of 3-4 (or even 2-3) hours of active work. \nProductive spans can extend up to 8 hours for some, butonly for short periods and tends to involve a well-defined project and work environment conducive to deep focus. \nSome people get their best work done in the first 4 hours of their morning, sometimes 7-8 hours when they have a clear problem to work on, while yet another group might feel satisfied with two solid 2-hour chunks of programming. \nThere are individuals who find 4-6 hours per day to be their productive coding limit, preferring 4 hours when possible. \nHowever, for others, 3 hours of concentrated code writing in a day would be ideal, and there are strategies like proper sleep and avoiding heavy lunches that help some reach over 8 hours of coding a day. \nSome even manage up to 12 hours daily, segmenting their time into 3-hour chunks with breaks and a balanced diet. \nOn productive days, the Pomodoro Technique helps some reach at least 6 hours of actual work."},{"question":"what does the broken pipe message mean in an ssh session?","response":"It usually means that your network (TCP) connection was reset; possibly your server closes connections that are idle for too long. \n\nAnother cause for the \"Broken Pipe message\" is that another machine is attempting use the same IP as your host. \n\nThe main reason for connection failures is that you have to reach the server on a UDP port (default range: 60000-61000) for mosh to work, which will not be possible if the server is behind a firewall."},{"question":"how do you know youre writing good code?","response":"For improving your coding practices, consider examining a respectable open source project in a language you\u2019re comfortable with and take note of their standards. \nYour code is far from ideal if it resembles the legacy patterns found in older software like send mail; instead, strive for a cleaner design similar to modern projects such as Postfix. \nOptimal code has algorithms that balance efficiency and clarity, alongside well-named classes, variables, and functions that are straightforward, allowing you to pick right back up after a break. \nIn professional coding, maintainability is crucial as it dictates the lifespan and adaptability of your code. \nIf you establish guidelines like avoiding code replication, ensuring complete understanding of your code, and enabling others to easily follow it, you'll contribute to a calmer codebase and support architectural enhancements. \nCode should be concise, with methods ideally performing just one task, allowing the caller to understand the function without inspecting its body too closely. \nGood coding feels natural when it leads to rare bugs, straightforward modifications, and does not confound your colleagues upon review. \nProse-like readability is a hallmark of quality in programming. \nStability and maintainability also play significant roles, with the added factor of how intuitive the software is to the end-user, reflecting on the quality of the code. \nEnsuring that each class and method has a distinct, singular role and that your codebase guides the user linearly without unnecessary complexity is vital. \nSeek peer reviews to validate the quality of your work; code that meets another coder's standards has a better chance of being well-received in the repository. \nCode quality encompasses readability, maintainability, and simplicity without compromising on efficiency or clarity, suggesting that adhering to good design, even outside of strict patterns, can result in high-quality software as long as it remains consistent within the project. \nRefining your ability to distinguish between good and bad code comes from active reading and analysis of code, including your own work, and possibly referencing authoritative textbooks for insights. \nEvaluating your code based on real-world needs rather than abstract standards of \"good code\" can often provide a more tangible measure of its value, particularly if the code accomplishes necessary functions and remains within an acceptable maintenance level. \nThe journey of a developer involves continuous learning where looking back at past code can indicate growth, with the changing perception of \"good code\" being a sign of ongoing improvement. \nCode quality is seen as subjective, inherently tied to a programmer's level of experience and available tools at the time of writing, and is often about finding better methods instead of simply categorizing things as right or wrong."},{"question":"how are api keys generated?","response":"API keys are easily generated by using \/dev\/urandom on Linux, *BSD, and MacOS X, calling CryptGenRandom() on Win32, or using java.security.SecureRandom."},{"question":"why does numbers hide a huge png file in exported excel sheets?","response":"Numbers hides a huge PNG file in exported Excel sheets as the default shape fill, which is strictly unnecessary if there are no shapes."},{"question":"where are whatsapp backups stored on icloud?","response":"In a hidden folder in the iCloud Drive, which you can find by typing a search term in Terminal."},{"question":"why are tar archive formats switching to xz compression to replace bzip2 and what about gzip?","response":"Xz is considered more efficient in terms of compression ratio, thus saving disk space and optimizing the transfer through the network."},{"question":"copy a file back to local system with ssh","response":"Use the `sshfs` command, create a directory, and then mount it to enable easy copy-pasting of files. \nYou also have the option to utilize `ssh-xfer` for file transfers or use `zssh`, which functions similarly to `zmodem` over ssh. Alternatively, the `xclip-copyfile` and `xclip-pastefile` tools provide a seamless method to copy and paste files without the need for `scp`. \nAlthough proprietary, SecureCRT offers convenient file transfer features, including ZModem, SFTP, and drag-and-drop capabilities, combined with session-specific configurations. \nFor a graphical user interface approach, Midnight Commander's Shell-Link feature can facilitate file management between local and remote hosts."},{"question":"is it completely safe to publish an ssh public key?","response":"Some say, yes, if RSA works as designed, this should not be a security issue, and not only is it safe to publish it, it is intended to be this way; in addition, even if it is not completely safe, no mathematician currently alive or dead has published a way to factor such a large number in acceptable time. \n\nOthers say, no, it is not a good idea, as it may let attackers identify you, and there is a slight risk of revealing your identity if your public key contains your hostname as a comment at the end. \n\nOne additional concern with sharing your public key is if it was unsafely generated: RSA and Diffie Hellman keys can be backdoored, but otherwise appear perfectly normal, in which case providing your public key would give an attacker all the information they needed to derive your private key."},{"question":"click is not working trackpad?","response":"The trackpad may be fixed by putting in a new battery, or look inside your computer for the small screw next to it and make a 1\/4 turn left or right to adjust the click on the trackpad."},{"question":"install shuf on os x?","response":"To install coreutils on a Mac, you have two options: using brew or Xcode Macports. \nWith brew, after installation, shuf is accessible with the command gshuf. \nAlternatively, when installing with Macports, the GNU core utilities will be available in \/opt\/local\/bin with a 'g' prefixed to their names, such as gshuf."},{"question":"what does ampersand mean at the end of a shell script line?","response":"This is known as job control under Unix, where & will cause the shell process to run in the background, and as the sys-snap.sh command continues to run, you can continue to use the shell, without having to wait until the script is finished; without & it will stay in the foreground until the script ends."},{"question":"texts are sending from email?","response":"Your iPhone employs the Messages application to dispatch communications to other apparatuses. \nMessages utilize an identifier, that is often your Apple ID, but the message is not transmitted via email. \nThis identifier function is particularly handy on devices without telephonic capabilities, allowing them to send messages using just an email address."},{"question":"how to add characters to the press and hold character picker in os x lion?","response":"To add characters to the press and hold character picker in OS X Lion, you can create a custom .plist file tailored for Chinese Pinyin input."},{"question":"would you put your stack overflow profile link on your cv \/ resume?","response":"Including a Stack Overflow profile in a resume can be advantageous as it demonstrates actual coding ability, problem-solving, and the capacity to seek help, especially if the profile has a notable amount of reputation. \nOn the other hand, adding such web profiles to a resume isn't seen as professional and could lead to potential employers scrutinizing everything one has ever said online. \nUltimately, whether or not to include a Stack Overflow profile depends on the quality and type of content that one contributes. \nSome choose not to include it simply because it hasn't occurred to them, though it can be highly visible in online searches."},{"question":"elegant ways to handle if(if else) else","response":"To improve code organization and readability, consider extracting a sequence of operations into a separate function that utilizes a return statement."},{"question":"display hidden files hot key on mavericks gone?","response":"Use the system extension Default Folder X, which still functions effectively in 10.9 and allows for revealing hidden files through one of its advanced options. \nAlternatively, in Mavericks, the keyboard shortcut \u2318\u21e7. is still effective for revealing hidden files. \nTo confirm the existence of such files in a folder, you can employ the `ls` command in Terminal. \nIt's advisable to check System Preferences \u2192 Keyboard \u2192 Shortcuts for any mappings to \u2318\u21e7. \nAdditionally, there's the option to assign a keyboard shortcut like \u2318 + \u21e7 + . in a save dialog box, which proves to be operational, or set up AppleScripts with shortcuts to toggle hidden file visibility within Finder. \nHowever, note that the key bindings do not work in Column view mode but are effective in List view mode, and you can switch back to Column view mode after applying the toggle to see hidden files."},{"question":"to sufficiently protect against krack is patching the client, the ap, or both, required?","response":"To comprehensively secure a network from particular attacks, both the client and the access point must receive patches. \nHowever, there are conditions under which it may be sufficient to only patch the access point to protect your clients, such as when the access point is used to mitigate attacks on unpatched clients, or when it has client-like functionalities, including acting as a repeater, supporting fast roaming, or being involved in station-to-station traffic. \nWhile it may be possible to prevent attacks by just patching the AP alone in certain scenarios, ideally, patching the client is advised for optimal security. \nNevertheless, for ordinary home users, the primary focus should be on updating the WiFi client for laptops and smartphones, as this can often be adequate for protection. \nLastly, patching the access point will not prevent attacks against vulnerable clients, and neither will patching all clients prevent attacks against vulnerable access points, so there may be conditions where you need to at least patch only the access points, only the client, or both of them."},{"question":"what does it mean when someone keeps digital touch message from you?","response":"Selecting the keep option will not remove items from the conversation; rather it's just a way to save space."},{"question":"do we really need oo languages to manage software complexity?","response":"OO languages are not a strict requirement to manage software complexity, as alternatives like procedural programming can implement features such as code reuse and modularity. \nHowever, OO languages provide strong benefits, such as binding functionality to data and promoting encapsulation and polymorphism, which some argue can enhance programmer productivity. \nDespite this, some believe that OO languages can simplify tasks in many cases, especially when dealing with GUIs. \nThe core principle of OO, combining data and behavior, is a significant innovation that aids in managing complexity. \nOn the other hand, it's argued that non-OO languages, like C, can accomplish the same tasks through other means, such as function pointers for runtime modularity, and that OO languages mainly benefit novice programmers."},{"question":"why would someone choose freebsd over linux?","response":"FreeBSD 4 gained popularity during the first dot-com bubble, especially with Internet Service Providers and adding features like jail and ZFS support further influenced its appeal to hosting providers. \nAdditionally, FreeBSD is known for its robust network stack which has been demonstrated in instances where it successfully managed high server loads. \nThe adoption of the BSD license and the unparalleled Ports system, which has even inspired Linux distributions, are among the reasons for its preferred use. \nBSD systems tend to have a more regulated code base, leading to a robust system with conservative policy changes, offering a more traditional Unix experience. \nComparing FreeBSD and Linux is somewhat akin to comparing apples to orange seeds since FreeBSD is a complete operating system, while Linux refers to the kernel. \nLicensing and device support are key reasons for choosing one over the other. \nOpenBSD has a remarkable reputation for security, with a record of only two exploits, due to a focus on writing quality code rather than just adding features."},{"question":"how to go to the previous working directory in terminal?","response":"To navigate back to the previous working directory, you can use the command \"$ cd\"or \"cd $OLDPWD\". \nFor those seeking an alternative method without the directory echo, \"cd ~-\" is suggested as it performs the same function more succinctly. \nFor a more organized approach, particularly when planning to return to the starting directory, it's recommended to utilize \"pushd\" and \"popd\"."},{"question":"how can i rename desktops \/ spaces in macos?","response":"The application TotalSpaces by binaryage offers the feature to name Spaces in macOS. \nAnother approach is to add a sticky note to each desktop with the label on each one."},{"question":"should i change the default ssh port on linux servers?","response":"When bad actors scan the internet they tend to look at the default port of IP addresses to save time, which is the crux of the advice to change your default port, so putting SSH on a port other than 22 will make it less likely to be hit with a random scan, though if someone was targeting you then they could find the new SSH port. \n\nAlthough changing the default SSH port doesn't gain you much from a security perspective, which depends on how up to speed you are going to be on patching your server and whether you have any kind of firewall in-front of the server, the cost of changing the port is very low, and the downsides are justified by the upsides. \n\nThere are other advantages, in that it stops failed login attempts on your server and in your logs."},{"question":"is there a name for the (anti- ) pattern of passing parameters that will only be used several levels deep in the call chain?","response":"Coupling refers to dependencies between modules that may cause a ripple effect when changes occur; despite being more explicit than global dependencies, refactoring may still be necessary to reduce it. \n\"Tramp data\" signifies distant communication between code segments, leading to increased code rigidity and unnecessary complexity; it hints at the need for refactoring to remove global variables. \nDependency injection improves code clarity by making dependencies explicit, facilitating unit testing, and enhancing the structural organization. \nExcessive tramp data often results from improperly encapsulated state variables, suggesting a need to create structured objects to simplify code and relationships. \nAvoiding tramp data often involves refactoring to higher logical levels to improve code clarity and testability, reducing the number of dependencies."},{"question":"can less retain colored output?","response":"Use the -r or --raw-control-chars option with the `less` command. \nIf you want to make git output color codes even when the output is a pipe and not a terminal, you can use `git diff --color=always` combined with `less -r` or `less -R` for ANSI color codes only. \nFor a global setup, consider using `git config` to enable color ui and set `less -r` as your pager, which would include the configuration in your `~\/.gitconfig` file. \nAlternatively, set the environment variable `LESS` with the value 'r' in your `.bashrc`. \nTo force color output from commands like `tree` and `ls`, use them with `-C` or `--color` option, respectively, piped into `less -r`. \nTo ensure `git diff` retains color when piped into `less`, `unbuffer` from the expect package can be of help, especially with the `--no-pager` option to prevent hanging."},{"question":"why do android phones have more cores than computers?","response":"The primary reason behind the numerous cores in mobile processors is the implementation of big.LITTLE combination strategy or Heterogeneous Multi-Processing (HMP) clusters that manage different workload scenarios efficiently. \nMobile devices often have to handle a variety of tasks that range from heavy to light loads. \nMore cores enable auxiliary processes to function more effectively, enhancing overall performance for both applications and background processes. \nIntel's lack of dominance in the mobile market has led to the prevalence of parallel computing, a norm outside the PC world. \nIt's advantageous for smartphones to have cores designed for power efficiency under low-performance needs, and cores that deliver maximum output when required. \nEven now, numerous desktop software struggle to utilize multiple cores efficiently, leading some to favor a 4-core CPU over an 8-core CPU with cores that are 20% slower. \nPhones require the ability to supply computational power immediately without the risk of overheating, which could happen with fewer, larger cores. \nJava virtual machines can take more advantage of multi-core compared to traditional desktop software, and many phone functions running in the background make additional cores beneficial."},{"question":"is it secure to store passwords with 2 way encryption?","response":"Encrypting passwords rather than hashing them is not a good practice because even with the encryption key, it is nearly as insecure as storing passwords in plaintext. \nEncrypting passwords can be reversible if attackers gain access to the encryption key. \nAdditionally, transmitting passwords over plain text email is insecure due to the prevalent issue of password reuse and the potential of email interception. \nThis behavior is clearly not secure and rust in a system's security should not be absolute; instead, it's recommended to use unique passwords for different systems and a password manager to manage them. \nWhen resetting passwords, it should be done through a unique key on a TLS-secured website, as email is not the most secure method of communication, even with encryption like TLS. \nIt is important to note that hashing is a one-way process, with no keys that can be stolen, making it a better practice for storing passwords. \nIf a password is stored by someone other than you, then it is not stored securely; there is never any need to store your password. \nFinally, the storing of passwords by IT personnel is unnecessary, and legitimate account access can be achieved through password resets, not password storage."},{"question":"how to bring back multi-touch gestures after it crashes without reboot?","response":"To recover gestures on your MacBook Pro (MBP), you should press the power button and let the MBP sleep for a short duration, about 5-10 seconds should do it. \nThis also works to regain the use of multi-touch gestures that crash on a per-app basis and can also be achieved by closing the laptop lid to make it sleep. \nA more immediate fix for trackpad issues is to go to settings, then trackpad, and finally disable and then re-enable all scroll and zoom gestures. \nIf only Mission Control gestures have stopped working, you can run the command 'killall Dock' in Terminal to restore functionality. \nFinally, using the command 'sudo killall hidd' works on OSX 10.13.6."},{"question":"how to sync two folders with command line tools?","response":"For synchronization tasks, one can utilize the \"unison tool\" developed by Benjamin Pierce of U Penn. \nAnother option is the \"Fitus\/Zaloha.sh\" which is a bash shell script relying solely on standard Unix commands."},{"question":"how to know number of cores of a system in linux?","response":"When determining the number of cores and processors in a system, one should consider sockets and cores per socket. \nUsing the command 'cat \/proc\/cpuinfo' can provide a detailed output for each core. \nAlternatively, the 'nproc' command can be used to obtain this information without requiring root privileges. \nTo find the number of cores online, one can use the command 'grep -c processor \/proc\/cpuinfo 8'. \nAnother method is to execute 'echo $((`cat \/sys\/devices\/system\/cpu\/present | sed 's\/0-\/\/'` + 1))'. \nThe 'getconf _NPROCESSORS_ONLN' command is also a reliable option, as it is a part of glibc."},{"question":"how can i run a command which will survive terminal close?","response":"To manage processes in a terminal, one can use commands like `$ nohup redshift &` or `$ redshift & disown` to prevent the process from terminating when the session ends, or when running kate & in Konsole: `nohup kate &` or screen\/tmux\/byobu, which will keep the shell running, independent of the terminal. \nAlternatively, if the process is already running, you can suspend it with `Ctrl-Z`, bring it to the background with `bg`, and then `disown` it: $` sleep 1000 ^Z + Stopped sleep 1000 $ bg $ disown $ exit.` \nAnother option is to initiate the process in a new session using `setsid process`. \nA script can help run commands in the background, manage their output, and ignore their exit status through `nohup`, redirecting output to `\/dev\/null`, and controlling the script's timeout. \nThe shell-only way to do all this is to close stdin and background the command: `command <&- &` prevent the process from closing with the terminal. \n`Screen` is another robust tool for managing terminal sessions, allowing multiple sessions within one terminal window and the ability to detach and reattach sessions as needed (`screen -S session_name`). \nTo protect a specific process from being terminated when logging out, you can use `nohup -p PID` to prevent it from receiving a HUP signal. \n`(applicationName &)` can ensure a smooth initiation of the background process. \nA predefined script can use `screen` to run long commands and allow them to continue running after the terminal is closed: `#!\/bin\/bash # if screen -ls | awk '$1 ~ \/^[1-9][0-9]*\\.'\"$1\"'\/' >\/dev\/null then echo \"WARNING: session is already running (reattach with 'screen -r $1')\" >&2 else exec screen -S \"$1\" bash -c \"$@; echo; echo '--------------------'; read -p 'ALL DONE (Enter to exit):'\" echo \"ERROR: 'screen' is not installed on this system\" >&2 fi exit 1 `. \nLastly, `reptyr` can attach an already running process to a `screen` session, permitting terminal closure without affecting the process."},{"question":"how do i assign a keyboard shortcut to an applescript i wrote?","response":"Use launching tools like Alfred, Keyboard Maestro, or FastScripts that allow setting global hotkeys and executing AppleScripts. \nIt's also feasible to accomplish this without resorting to paid third-party applications by utilizing Automator to make a Quick Action and assigning hotkeys through the System Preferences. \nAutomator is instrumental in creating a service that facilitates running an AppleScript and attaching a keyboard shortcut to it within the System Preferences."},{"question":"has it been mathematically proven that antivirus cant detect all viruses?","response":"Determining if a program is malicious is undecidable in the general case, as per Rice's theorem. \nFred Cohen demonstrated in 1987 that it's not possible to create an algorithm that can detect all possible viruses. \nIt was mathematically proven by Alonzo Church in 1935-36 and Alan Turing in 1936 that certain problems are undecidable. \nIt cannot be mathematically proven that all viruses can be detected since the proposition can't be mathematically formulated in the first place. \nIf false positives are not permissible, it's not feasible to detect all viruses; there will always be a contradiction. \nBruce Schneier stated that it is mathematically proven that there is no \"cure\" for viruses since it is always possible to create one that cannot be stopped by any existing antivirus program."},{"question":"what are chains in iptables?","response":"In the iptables, chains are lists of rules that are processed sequentially, including both built-in chains, such as INPUT, OUTPUT, and FORWARD in the default filter table, and user-defined chains, which can be referenced by other chains. \nRules within these chains are not static and they can be manipulated with commands like append, insert and delete."},{"question":"how do i remove a user from a group?","response":"The `gpasswd --delete user group` command can be used. \nSpecifically on Debian, the `deluser user group` command within the adduser package is available, and if this package is not present, manual editing of `\/etc\/group` and `\/etc\/gshadow` using commands like `vigr` and `v-s' -s' is an alternative. \nFor systems such as Solaris 5.9, the command `usermod\" \"G \"\" username` can be used to remove all supplementary groups from a user. \nOn SUSE distributions, the command `usermod -R group user_name` eliminates a user from a particular group. \nThe traditional method involves editing the `\/etc\/group` file with superuser privileges to remove a user from the group list directly. \nLastly, in the absence of the `-a' option, the `usermod` command can remove users from all groups except the specified new group."},{"question":"police forcing me to install jingwang spyware app, how to minimize impact?","response":"There's no way to trust this device anymore; they have the ultimate interpretational sovereignty. \nOne idea is to think of your phone as a networking device and nothing more. \nDon't do anything suspicious on it and let this app do its job. \nYou could do all of your communication through the computer. \nOne idea to bypass this is to clean and refurb an old phone you have; this is probably not illegal. \nYou can also search for solutions that are already implemented by other people. \nThere are some options for \"dual booting\" android phones. \nConsider alternative methods such as using a USB2Go cable or Bluetooth pairing. \nConsider app modification (somewhere there will be a fake version) or interceptors, or server spoofing. \nYou could use two custom ROMs. \nYou can use AFWall+ to prevent the app from phoning home and XPrivacy, XPrivacyLua or Xposed. \nAnother idea is to run \u201cBig Brother\u201d apps inside the isolated profile so they cannot access your data outside the profile . \nYou can let the app download, kill the network connection while it's installing, and then remove permissions before it starts. \nRemember that you should take into consideration any kind of validation processes that the spyware has implemented so you do not alter them. \nWeigh up the risk\/reward of trying to bypass this issue because it is not good to get caught by police. \nRemove illegal items and anything else the government wouldn't approve of from your property. \nIt isn't even unreasonable to expect that your Internet traffic is monitored (targeted) and even asking about how to circumvent the measures may move your name onto a different, more high priority list. \nIf the police does a deeper investigation, turned off permissions would be evidence that you have willfully tampered with the spyware. \nIn summary, if you are poor and unsophisticated don't fight the rich, powerful, intelligent army."},{"question":"does curl have a --no-check-certificate option like wget?","response":"The answer is yes; you can use curl with the -k or --insecure option to allow operations over server connections that are considered insecure. \nThis function is typically used when the server's certificate does not verify successfully with the certificate store."},{"question":"is arp layer 2 or 3?","response":"ARP is layer 2, due to the fact that a broadcast is sent on layer 2 and ARP will normally not traverse to layer 3. \nHowever, it can provide extra features to the layer 3 protocol."},{"question":"bash: what does >| do?","response":"The >| operator is a specialized form of the > redirect operator, distinct from pipe operations and is associated with the 'noclobber' shell option, which prevents existing files from being overwritten by redirection. \nYou can explicitly override the setting of noclobber with the >| redirection operator."},{"question":"python file naming convention?","response":"According to Python's PEP 8 style guide, module names should be concise and entirely in lowercase; if using underscores can aid in readability, they are allowed. \nPackages, like modules, should have succinct, all-lowercase names, though underscores are not recommended in package names. \nBy convention, class names should use CapWords, which means capitalizing the first letter of each word without spaces. \nFinally, for improved understanding, variable names and functions should be in lowercase with words separated by underscores."},{"question":"how to check whether my intel-based mac is 32-bit or 64-bit","response":"Go to the Apple Menu and select \"About this Mac\". \nAlternatively, you can use the arch command without arguments to display the machine's architecture type. \nTo check the kernel version, launch System Profiler (renamed System Information in OS X 10.7) and click on the Software heading. \nAnother method is to run the command sysctl hw.cpu64bit_capable in a shell, which will indicate if the CPU can run 64-bit programs. \nIf your MacBook Pro is newer than a 2008 model, it will have a 64-bit processor and OS. \nYou can also run Activity Monitor and check the Kind column for the kernel_task process to see if it's running in 32-bit or 64-bit mode. \nTo run applications in the correct mode, you can look for the application in Activity Monitor. \nOther quick checks include running getconf LONG_BIT or uname -m in the command line to display your system's bitness. \nIf you get x86_64 then you have 64bit OSx running. \nIf needed, sysctl or arch commands can also be used to check CPU architecture."},{"question":"what are emulated files on android?","response":"An emulated file system is an abstraction layer on actual file system and it serves two purposes.\nOne, to retain USB connectivity of Android devices to PCs. \nTwo, to restrict unauthorized access of apps and processes to user's private media and other apps' data on the SD card. \nTo find these files, you can look in the path: \/storage\/emulated\/0\/Download. \nOn Android 5, specifically, they are located in: \/sdcard >S> \/storage\/emulated\/legacy >S> \/mnt\/shell\/emulated\/0 \/mnt\/shell\/emulated >E> \/data\/media."},{"question":"get the chmod numerical value for a file","response":"You can use: stat YOUR_FILE. \n\nYou can get the value directly using a stat output format, e.g. BSD\/OS X: stat -f \"%OLp\" , or in Linux stat --format '%a' , and in busybox stat -c '%a' . \n\nYou can try list all stat --format \"%a %n\" *."},{"question":"can i automatically log in to open wifi that requires web login\/password?","response":"WIFI Web Login is highly effective for users needing to enter credentials like a username and password, an email, or simply to acknowledge the EULA with a checkbox."},{"question":"consequences of deleting .ds_store","response":"Deleting .DS_Store files typically results in loss of folder display attributes, like icon positions, size, background color and view settings, but generally, nothing adverse occurs. \nShould you remove a .DS_Store file from the Trash, Finder would no longer recognize the original location of deleted files. \nAlthough Spotlight may still find comments associated with files, Finder would not if their .DS_Store file was removed."},{"question":"what are whatsapp voice notes?","response":"Voice notes are voice recordings that you can make with Whatsapp."},{"question":"powerd process uses a lot of cpu","response":"Terminating the powerd process via Activity Monitor effectively solves CPU usage issues. \nAnother proposed solution is a command-line approach, which uses `sudo kill -HUP $(pgrep powerd)` to address the problem without explaining its necessity. \nResetting the System Management Controller (SMC) is recommended as a potential fix for power-related issues on Mac computers. \nAlthough resetting the SMC on a Mac is a known troubleshooting step, as mentioned on Apple's official webpage, it may not address the specific powerd issue some users experience. \nFor one user, quitting Activity Monitor was the key to resolving the excessive CPU usage by the powerd process. \nHowever, another user observed that powerd only consumes significant CPU resources when Activity Monitor is running, suggesting a link between the two."},{"question":"how do you maximize windows?","response":"For window management, the Cinch app from Irradiated Software is an inexpensive solution that maximizes windows by dragging the title bar to the top of the screen. \nRightZoom is another option that works like the Windows maximize feature. \nManually resizing a window to fit the screen can be done by dragging the window to the top-left edge and resizing from the bottom-right corner. \nIn Safari, Mail, and Terminal, command-clicking the + button maximizes the window. \nOn Yosemite, double-clicking the window top bar or option-clicking the green dot maximizes windows, while older OS X versions require a shift-click on the green (+). \nBetterTouchTool allows customization of window maximization gestures on multitouch pads. \nMac OS X lacks a specific maximize button, recommending manual resizing or utilizing the green plus button to fit content. \nCustom scripts can be assigned to the keyboard shortcut \u2325\u2318M for maximizing, but it might not work with all windows or displays. \nAlso, Moom offers configurable keyboard-based window management, allowing quick window resizing and movement. \nMeanwhile, DoublePane, available for $4.99, and Spectacle, which is free on MAS, provide maximization functions through keyboard shortcuts. \nSpecifically, Spectacle uses the shortcut \u2318+F to maximize windows. \nOS X versions 10.7 and later feature a full-screen icon for entering full-screen mode. \nA built-in OS method for maximizing involves Alt-dragging a window corner to the corresponding screen corner. Holding the Alt button and double-clicking a window corner enlarges the window optimally on macOS Sierra. \nYou can fill the screen with a window by option double-clicking any side with the resize arrow visible, without entering full screen mode."},{"question":"are no caller id calls dangerous?","response":"Unidentified calls don't seem to present a significant risk. \nHowever, you should keep interaction to a minimum, if you take such a call. \nScammers are experts at getting people to engage in order to trick them into a scam, so saying absolutely nothing is also an option. \nHowever, sometimes legitimate companies have proper reasons for hiding their number. \nIf this is the case, you can always terminate the call and phone the company in question back via their phone number, which should be available on their website."},{"question":"how to apt-delete-repository?","response":"To remove a repository, you have to do 2 things: remove it from sources.list, then use apt-key del to delete it, using sudo apt-key del 73C62A1B."},{"question":"how do i take a screenshot without the shadow behind it?","response":"You can enter a command into Terminal: defaults write com.apple.screencapture disable-shadow -bool TRUE. \nAfter executing this command, either reboot the system or restart the UIServer using the killall SystemUIServer command. \nAnother option to alter shadow effects in screenshots is the screencapture utility. \nTinkerTool provides a feature to remove screenshot shadows as well. \nAdditionally, you can remove the window shadow from screenshots by holding the Option key while clicking after initiating the screenshot command, combining Shift, Command, 4, and Space."},{"question":"finding the pid of the process using a specific port?","response":"In modern Linux systems, the `ss` command is considered the appropriate tool for retrieving network socket information. \nTo obtain the desired output when dealing with processes, one should elevate privileges with `sudo`. \nTools such as `lsof` and `fuser` offer alternative methods for accessing network and process information, with `lsof` revealing listening ports and `fuser` providing the user, PID, and command associated with a particular TCP port. \nWhen trying to view the PID of a process using `netstat`, running the command with `sudo` might be necessary."},{"question":"can i change the behavior of the home and end keys on an apple keyboard with numeric keypad?","response":"One option is to create ~\/Library\/KeyBindings\/ and save a property list in the Library\/KeyBindings directory and save it as DefaultKeyBinding.dict, although this may not be supported by all applications. \nIt might be easier to just use the default keybindings. \nAnother option is to enable the \"Use PC Style Home\/End\" setting in Karabiner, which is defined in Resources\/include\/checkbox\/for_pc_users.xml. \nThe tool keyremap4macbook, which is free and compatible with Macs, is recommended for easily changing the default home\/end buttons behavior. \nAdditionally, the latest version of Karabiner requires downloading specific settings from their website and following a process to import and activate \"PC-Style Shortcuts\"."},{"question":"can i install any ios version i wish by picking and choosing which firmware to restore?","response":"Typically, downgrading or upgrading to a version is not possible once Apple stops signing the old software, a process needed during iTunes restoration or installation. \n Putting a newer iOS on older hardware that never even supported that OS is near impossible. \nHowever, a newer method, utilizing a tool called futurerestore, allows downgrading or upgrading without requiring current signing from Apple. \nThis approach is particularly useful for newer devices not covered in the initial list."},{"question":"what is \/storage\/emulated\/0\/?","response":"The directory \/storage\/emulated\/0\/ is presented through an emulated or virtual file system, specifically as \/data\/media\/0\/."},{"question":"how to transfer messenger messages to new iphone?","response":"As of March 2019, to transition to a new device or alternate account access, you need to add a password to your Messenger."},{"question":"why did memory-managed languages like java, javascript, and c# retain the `new` keyword?","response":"It distinguishes between objects and primitives and improves readability as it differentiates instantiating an object from other operations. \nSpecifically, with the semantics carried over from C++ to other languages like Java and C#, it signals that an object is being created on the heap and can help avoid confusion when method names begin with capital letters. \nIn JavaScript, the new keyword clarifies the intention to create a new object since constructors resemble normal functions. \nThe keyword also ensures that code is easier to read and can mitigate potential naming conflicts between methods and objects\u2014even allowing a method and an object to share the same name. \nC# specifically allows types to be visible in contexts where a member with the same name could otherwise obscure them."},{"question":"best app to switch between all open windows","response":"The Optimal Layout app, priced at $14, offers keyboard shortcuts for swiftly arranging and switching between windows. \nSenebier is presented as a free alternative, with further details available on its website. \nQuicksilver (or Spotlight) can be invoked on a desired application, such as Safari, and allows users to search for and select window titles via keystrokes. \nContexts is an intuitive alternative to Witch for Mac users, notable for its keyboard and mouse window switching capabilities, as well as an optional side panel that enhances window and application management. \nHyperswitch is acknowledged as a compatible and aesthetically pleasing free option, albeit it has ceased updates as of May 2021 and lacks support for Apple's M1 silicon. \nKarabiner is highly recommended for its extensive options and keyboard customization, particularly its \"Tab mode\" for app switching and window cycling."},{"question":"in a bash script, using the conditional or in an if statement","response":"You can use expressions like \"if [ \"$fname\" = \"a.txt\" -o \"$fname\" = \"c.txt\" ]\". \nFor bash-specific solutions, you can use \"if [[ \"$fname\" == \"a.txt\" || \"$fname\" == \"c.txt\" ]]; then\". \nAdditionally, another POSIX-compliant method is \"if test \"$fname\" = \"a.txt\" || test \"$fname\" = \"c.txt\"\"."},{"question":"whats using my gps?","response":"Many apps use GPS functionality when it's switched on, and some apps, such as the camera, utilize it to embed location information into your photos. \nGoogle employs GPS for various services, including Buzz, Maps, and Latitude; Latitude can intermittently update your location, which is a feature you agree to by using the service. \nThe device may also inform Google about nearby Wi-Fi spots and cell towers to enhance GPS efficiency, enabling quicker location locking. \nTo maintain privacy, it's advisable to deactivate GPS when not in use and scrutinize app permissions during installation\u2014especially if an app like a cooking recipe app requests GPS access without a clear need."},{"question":"does udp do anything at all?","response":"UDP is a transport protocol, like TCP, which means it provides a protocol for an application to use IP; however, UDP is a message-based protocol, while TCP is a stream-based protocol. \n\nMost of what UDP does is supply a standard means for multiple applications to co-exist using the same IP address, by defining the concept of UDP ports; UDP makes this easy by allowing a broadcast a DHCP request to the existing network, and one (and hopefully only one) DHCP server will respond with an offer. \n\nThe key thing that UDP does is provide both source and destination port numbers, and hence allows not just multiple, different application protocols, but also multiple instances of the same application protocol; in principle you could build your application protocol directly on top of IP and obtain a protocol number for it. \n\nUDP, being such a simple protocol, is useful for upper layer protocols that prefer fast communication, without the need for establishing a connection or reliable data transfer; the key feature of UDP is that it is message oriented, not stream oriented, primarily involving very short and often infrequent exchanges of data, and provides the bare minimum for those first two points without getting in your way, as TCP does for these types of applications."},{"question":"how do i know if dd is still working?","response":"Send it a signal using the kill command to report its current status. \nThis signal varies by system, with INFO being used for BSD systems and USR1 for Linux. \nAlternatively, you can use lsof to watch positions within files for commands reading or writing files with `lsof. lsof -o -p1234 # where 1234 is the process ID of the command lsof -o \/path\/to\/file `or use ddrescue. \nYou can attach strace to a running process to see if it's blocked or active, or initiate another dd process if concerned about sending signals. \nOn OS X, pressing Ctrl+T in the dd terminal will display its output status and CPU usage. \nViewing disk I\/O activity can also be done with iotop, which indicates disk read\/write activity per program. \nIf you anticipate the need to monitor progress, consider starting your operation with pv, a tool designed for monitoring data transfer progress and speed, or go the other way and use dd to read and pv to write. \nReal-time information about the dd process can be gleaned from the `wchar line in \/proc\/$pid\/io`, and an example PHP script shows how to display the written bytes without changing terminals: ` 10) array_shift($history); $oldest = reset($history); $latest = end($history); \/ * get number of written bytes from \/proc\/$pid\/io *\/ #if (!($curr = exec(\"cat \/proc\/$pid\/io | grep ^write_bytes | sed 's\/write_bytes: \/\/g'\"))) # break; \/* prepare proc_open() parameter *\/ $descriptorspec = array( 0 => array('pipe', 'r'), \/\/ stdin 1 => array('pipe', 'w'), \/\/ stdout 2 => array('pipe', 'w'), \/\/ stderr ); $process = proc_open(\"cat \/proc\/$pid\/io | grep ^write_bytes | sed 's\/write_bytes: \/\/g'\", $descriptorspec, $pipes); if (!is_resource($process)) break; $stdout = stream_get_contents($pipes); $stderr = stream_get_contents($pipes); proc_close($process); if (!empty($stderr)) break; $curr = trim($stdout); \/ * caculate elapsed time from start *\/ $time_elapsed = time() - $start_time; \/ * avg speed since start *\/ $avg = $time_elapsed > 0 ? round($curr \/ $time_elapsed) : 0; \/ * avg speed of last 10 updates *\/ if (count($history) > 0) $speed = human_file_size(round(($latest - $oldest) \/ count($history) \/ $refresh)); $output = sprintf(\"\\rBYTES WRITTEN: %s :: CURRENT: %s\/s :: AVERAGE: %s\/s :: ELAPSED: %s\", $curr, human_file_size($curr), isset($speed) ? $speed : 0, human_file_size($avg), gmdate(\"H:i:s\", $time_elapsed)); printf(\"%s%s\", $output, str_repeat(\" \", exec(\"tput cols\") - strlen($output))); usleep($break_ms); } fprintf(STDOUT, \"\\ndd has finished!\\n\\n\"); function human_file_size($size,$unit=\"\") { if( (!$unit && $size >= 1<<30) || $unit == \"GB\") return number_format($size\/(1<<30),2).\" GB\"; if( (!$unit && $size >= 1<<20) || $unit == \"MB\") return number_format($size\/(1<<20),2).\" MB\"; if( (!$unit && $size >= 1<<10) || $unit == \"kB\") return number_format($size\/(1<<10),2).\" kB\"; return number_format($size).\" bytes\"; }`. \nMoreover, switching to dcfldd(1) is another option for a more convenient display of dd operations. \nWith recent versions of coreutils (v8.24 or later), dd itself includes a progress option to show its progress natively. \nLastly, you can use the progress utility, which showcases the advancement of a running dd command and leverages the `\/proc\/$pid\/fd and \/proc\/$pid\/fdinfo`."},{"question":"how can i open a .pkg file manually?","response":"If you navigate through a package's contents by right-clicking and selecting \"Show Package Contents,\" you will encounter a variety of files, including a BOM, or bill of materials, which is essential for uninstalling the app, as it acts as a manifest of items to be installed. \nTo inspect this BOM file, you would use the \"lsbom\" command. \nYou can also use Terminal commands such as \"sudo installer -pkg\" followed by the package's path and target location to initiate an installation. \nIn the event of issues with the \"pkgutil --expand\" command, an alternative would be to extract the files using the \"xar -xvf foo.pkg\" command. \nFurthermore, \"Suspicious Package\" is an excellent tool for inspecting package files and even offers a Quick Look plugin for immediate insights."},{"question":"why does it matter that html and css are not programming languages?","response":"The distinction between what qualifies as a programming language and what does not with regard to HTML and CSS is not particularly significant."},{"question":"why is my message not delivered imessage?","response":"\"Not Delivered\" implies an error of some kind, perhaps because the recipient's phone battery is low\/dead, the recipient's phone is out of wifi range, the recipient has you on block, or the recipient's phone is off, whereas if nothing is displayed that just means the message is queued up to an inactive phone, or backed-up in transit over the network."},{"question":"how can i list and edit all defined aliases in terminal?","response":"To display any active aliases in your terminal, simply type \"alias\" at the prompt and any active aliases will be listed. \nIf you wish to remove an alias within your current session, you can use the unalias command; however, to prevent the alias from loading in future sessions, you must locate and remove the alias definition from its initialization file."},{"question":"getting authentication is required when trying to access the play store","response":"If you want to address syncing issues on your device when you are trying to access the Play Store, you should delete all your accounts and then add them again, or simply re-sync your Google accounts from the Accounts & sync menu. \nIf changing your password is what caused the problem, restarting your phone might also resolve it effectively."},{"question":"is password entry being recorded on camera a realistic concern?","response":"Password entry being recorded on camera is indeed a concern. \nA recent example of a password security breach involves Kanye, who was observed on camera using \"00000\" as his password to unlock a device. \nA viable risk that has been addressed by the industry for a long time is the possibility of capturing the sound of the keyboard when a user types the password, even over the computer's microphone. \nAdditionally, it underscores the necessity of multi-factor authentication, which requires an additional security factor beyond just the password."},{"question":"why do so many applications require permission to read the phone state and identity?","response":"The permission allows apps to read a phone's IMEI, which serves purposes like copy-protection or user tracking. \nAndroid operating systems before version 1.6 did not require apps to request certain permissions explicitly, granting them by default, but from version 1.6 onward, these permissions must be specifically requested by the app. \nAdvertisers often use permission to access a phone's ID for tracking. \nFinally, it's clarified that only apps targeting Android version 1.5 will receive the extra permission by default, without the developer adding it expressly."},{"question":"how do i disable the select input method notification?","response":"Some custom roms, particularly CM9 and AOKP, have settings that allow the disabling of certain features, like notifications. \nYou can use Titanium Backup to create a backup and then uninstall specific system components like \"Android keyboard\". \nIn CyanogenMod versions such as 9 and 10.2, you can turn off Selector notifications by going to the system settings and adjusting the language and input options. \nTo use only one keyboard on your device, you can go into language settings and disable all others that you don't need, and additionally, disable other stock keyboards through the application settings. \nOn Xperia devices specifically, there's an option to disable the \"Smart Keyboard\" feature from the settings menu to change keyboard functions. \nIn Android versions like ICS, you can navigate to the system apps settings to find and disable the default keyboard listings if you wish to use a different input method. \nThe \"Disable\" function in Android allows you to turn off certain system applications and is not contingent upon having root access. \nThis function does not remove the application but prevents it from operating and can be used to manage both keyboard notifications and bloatware apps."},{"question":"why do we need ipv6?","response":"The main reason for using IPv6 is that everyone will have available as many public IPs as they need, and all the complexity of using NAT will disappear, plus, in this age of mobile devices, it has explicit support for mobility in the form of mobile IPv6. \n\nIPv6 provides enough public addresses to restore the original IP paradigm, providing lots of addresses and public addresses for every device, and giving the options back that were there before NAT was introduced."},{"question":"can i make a song from itunes my ringtone?","response":"Yes, if you create a version no longer than 30 seconds in iTunes first, change the file name from .m4a to .m4r, then import it as ringtone, which you can then sync to your iPhone."},{"question":"how can i run a script on boot?","response":"If you have root access, you can edit the script \/data\/init.sh that executes at boot. \nFor users with magisk installed, .sh files can be placed in specific magisk directories, like ` \/sbin\/.magisk\/img\/.core\/service.d\/` or `\/sbin\/.magisk\/img\/.core\/post-fs-data.d\/` and executed during boot, ensuring the script is set as executable. \nHowever, for scripts to run properly, it is essential to ensure SELinux policies are adjusted to allow unrestricted contexts like the one Magisk uses, which is u:r:magisk:s0."},{"question":"what do i type to produce the command symbol (\u2318) in mac os x?","response":"To input special characters and symbols on a Mac, go to System Preferences and navigate to Keyboard, then Input Sources, where you can click \"+\". \nNow, scroll to \"others\" and select \"Unicode Hex Input\" before clicking the \"Add\". \nAlternatively, in OSX Lion you can press Cmd-Ctrl-Space, type \"pla\" into the search bar, and then hit Return twice. \nAnother option is to download the BetterTouchTool app, in which you need to select 'Keyboard', click 'Add New Shortcut, and set the keyboard shortcut to 'Option+C'. \nThen, set trigger predefined action to 'Paste predefined text' and copy '\u2318' into the box before clicking 'OK'. \nNow, when BetterTouchTool is open, all you have to do is press 'Option+C' and it automatically types the '\u2318' symbol. \nFor future reference, you can copy and paste the following: \u2303 for Control, \u2325 for Option (alt), \u2318 for Command, and \u21e7 for Shift. \nAlso, Keyboard Maestro, allows for the creation of a macro that inserts a \"\u2318\" symbol whenever \"=cmd\" is typed. \nThis can be done by creating a new macro and giving it a name like \"insert \u2318\", then add \"Typed String Trigger\": =cmd and add \"New Action\" before choosing \"Insert Text by Pasting\". \nFinally, by pressing \"control+command+space\" in any application and typing \"place of interest\", you can find the glyph for Command (super)."},{"question":"are there any tools to sandbox a malware application even more than the granted permissions on android?","response":"The translated version of LBE, which is available on XDA developers, operates smoothly on the Jelly Bean version of Android. \nFor those looking for a means to manage app permissions on rooted devices, XPrivacyLua is an Xposed framework module that serves this purpose, and it is both free and open-source. \nWith the introduction of Marshmallow (Android 6), a new permissions model allows for more granular control and doesn't require rooting or additional applications, marking a significant change from the previous all-or-nothing approach in earlier versions of Android."},{"question":"what is the difference between requirements and specifications?","response":"Requirements document what is needed without detailing the method to achieve them, while specifications document how to achieve the requirements. \nIn other words, requirements are what your program should do, the specifications are how you plan to do it. \nAdditionally, requirements are based on the stakeholders' needs and specifications are more an inside, detailed, technical document. \nRequirements must come first before a specification can be written. \nA specification is a document full of requirements, plus other supporting and ancillary information. \nRequirements dictate what a system or subsystem should or must do, while specifications define what a component, system, or subsystem actually is. \nFinally, a requirement is considered an analysis artifact, and a specification is recognized as a design artifact."},{"question":"is a redirect showing the password in plain text a security vulnerability?","response":"This is definitely problematic: the interception\/downgrade risk is probably somewhat high as those plaintext passwords are probably being recorded on the server."},{"question":"why does unlocking the bootloader wipe phone?","response":"When a device's bootloader is unlocked, it allows the flashing of unsigned images, which in turn makes rooting the device quite straightforward. \nCarriers enforce locked bootloaders to ensure that if a handset is stolen, unlocking it will wipe all personal data, which prevents a tech-savvy thief from misusing the information or incurring costs for the victim through unsolicited use."},{"question":"how do organizations check *what* has been hacked?","response":"The technique to identify a weak spot in security is to find the hack, the hole, or the weak spot. \nSyslog, dmesg, access.log, and error.log are essential to confirm any suspicions of such vulnerabilities. \nSystem forensics is an approach used to examine which system components or assets have been compromised, often through analysis of logs. \nFor a comprehensive understanding of a security breach, Forensics entails multiple strategies, including Disk Forensics for recovering deleted files, and Memory Forensics for analyzing a captured memory snapshot. \nUsing tools like Syslog, firewalls' logs, and IDS and router logs can help check various aspects of a system's security status. \nIntrusion Detection Systems (IDS) like Snort may record irregular activities and can be a vital tool in Forensics. \nAttackers can be detected through system logs, but they can manipulate or erase them if not securely stored. \nRDBMS auditing is a significant asset in an investigation related to data access, as it allows for the reconstruction of stolen data sets, as exemplified by SQL Server Audit, which can log audits to the Windows Security log. \nThe analogy with security logs in a residential burglary illustrates that such logs provide insight into unauthorized access attempts. \nTo understand the extent of data transferred in and out of a network during an attack, some organizations implement deep packet inspection alongside tools like IDS for real-time alerting."},{"question":"is 4-5 years the \u201cmidlife crisis\u201d for a programming career?","response":"No, 4-5 years into a programming career doesn't signify a midlife crisis; rather, it marks the end of the honeymoon phase or a sign that you have reached a certain level in your career. \nConversely, some individuals agree it's a midlife crisis while others' personal experiences align with the notion that the feeling is not unique to any one person but is a common experience in the industry."},{"question":"i dont have administrator account on my mac","response":"One approach is to create a new administrator account by restarting the Setup Assistant. \nAlternatively, you can Boot into Recovery Partition, choose Terminal from the Utilities menu, and type the following: resetpassword. \nAnother option involves creating an admin group and account by using the dscl utility."},{"question":"why is storing passwords in version control a bad idea?","response":"Including your password in source control essentially equates to sharing it with anyone who has access to the repository, which may include future users. \nThe risk of such a system potentially getting compromised should not be ignored, as this may result in password leakage. \nAdditionally, maintaining passwords in a system that preserves history poses a security risk, as previous versions of passwords remain accessible. \nFor instance, if backup systems are managed by another department, or the build process is cloud-based, this would complicate password handling. \nWhen considering security measures, remember that storing passwords with your code in backups increases the risk of them being targeted by criminal entities, thereby amplifying potential damage from any breaches."},{"question":"how to transfer files from iphone to pc without wifi?","response":"To transfer photos to your PC, the charging cable also doubles as a data transfer cable. \nJust plug the USB end into your computer and the other end into your phone then you'll be able to transfer your files."},{"question":"which elliptic curve should i use?","response":"The secp521r1 is recommended but for faster solutions, non-NIST curves like Curve25519 are an alternative."},{"question":"what does it mean when it says your friend is on instagram?","response":"The notification means that one of your friends or mutual subscribers on Facebook has created an Instagram account. \nThe two services are now linked, because Instagram is now owned by Facebook."},{"question":"why 2des is not secure?","response":"Two-DES does not provide the expected increase in security due to its susceptibility to certain types of attacks, specifically the \"meet-in-the-middle attack\". \nDespite employing 112 key bits, 2DES only achieves a security level equivalent to about 257 bits rather than 2112. . \nConversely, although 3DES uses 168 key bits, it effectively offers a security level of 2112 bits, which is considered sufficiently secure for most applications. \nThe reason 3DES is preferred to 2DES is that 2DES doesn't actually give that much more security than DES."},{"question":"how do i turn off macbook display when i have an external display?","response":"Connect a secondary display with the clamshell open, then close the lid after the system recognizes the external monitor. \nAnother solution involves running the command: sudo nvram boot-args=\"iog=0x0\". \nAlternatively, setting the display to 'mirror' and then reducing the brightness of the Mac can prevent losing windows. \nUsing a third-party application, such as DisableMonitor, is also a viable option that adds the missing feature to disable a monitor on a Mac. \nOn Sierra OS or later versions, running the command 'nvram boot-args=\"niog=1\"' in recovery mode can accomplish the desired effect. \nPressing Cmd + F1 can switch the display to mirror mode. \nFor newer MacBook Pro models, you can set the external display as primary display by dragging the menu bar in the Displays setting in System preferences. \nSwitchResX is another third-party software that mirrors external displays and turns off the MacBook's built-in display. \nLast but not least, Lunar software allows users to mirror one display and darken the one that needs to be turned off with a simple keyboard shortcut."},{"question":"no partition scheme option when erasing a usb disk in macos high sierra?","response":"You can resolve this by selecting \"View\" and then choosing \"Show All Devices\". \nAfterward, select the actual drive you intend to reformat, and during the erase process, you should now have the option to choose a partition scheme."},{"question":"a modern and faster alternative to disk inventory x","response":"OmniGroup provides OmniDisksweeper, a free utility that helps list files and folders by size for easy deletion. \nDisk Inventory offers similar functionality and can be as fast or slow as other tools, recommending GrandPerspective as an updated alternative. \nDaisy Disk is noted for its speed but is not free, and for faster, Linux-based tools, PhileSight is recommended. \nMacOS has a built-in app called Storage Management, which is free and fast, offered by Apple for dealing with storage. \nFor those who prefer command-line tools, ncdu is highly recommended for its speed."},{"question":"can whatsapp calls be monitored?","response":"It's certainly improbable that WhatsApp calls could be monitored, but no impossible. \nFor this to happen, all of your network traffic would need to be monitored and your carrier would have to break the encryption, which is not an easy thing to do. \nAlternatively, your carrier would have to have installed some sort of monitoring software on your phone before you bought it."},{"question":"how can i monitor all outgoing requests\/connections from my machine?","response":"To monitor network connections, you can utilize the \"netstat\" command, which lists all active connections including TCP, UDP, and RAW and shows the associated processes. \nOther options include: the \"ss\" command; \"conntrack\" for those running Solaris or a derivative; iptables LOG target for simple comprehensive traffic logging in Linux; \"tcpdump\" to inspect all IP traffic on a given interface, with the ability to filter traffic as required; or \"nethogs,\" which is able to group connections by the originating application."},{"question":"how to recognize a good programmer?","response":"In identifying a proficient programmer, passion is often a good indicator of their coding abilities and enthusiasm for the subject. \nYou have to be a good programmer to recognize a good one and that means being well-acquainted with the nuances of programming to ask the right questions in an interview. \nIn addition to getting them to talk about programming, their language of choice, and so on, which can help to recognize if they have the passion of a good programmer. \nAdditionally, making them code by giving them a problem can reveal the coder's planning and documentation skills, as well as their coding style. \nTesting candidates during interviews and considering the working environment's influence is suggested, as even skilled programmers may struggle in a workspace burdened with technological debt. \nAgain, looking for those who have passion for the field is crucial, as a programmer who enjoys working with technology is more likely to be very good at it. \nIt is challenging to recognize a programmer's skills solely from an interview, so it is beneficial to look at their abilities to work in a team, write code that is understandable and maintainable and to learn about new technology. \nRemember, programming ability isn't the only factor, A programmers personality should be higher up on the list than most employers seem to rank it. \nEvaluative techniques during interviews might include reviewing and writing code, creating designs, and examining the candidate's thought process by asking questions about something the candidate claims to know well. \nStart with fundamental interview tactics, dive into discussions on programming principles, mainly taken from Effective Java, and conduct code reviews to determine a candidate's analytical skills and judgment."},{"question":"how to change the default behaviour of the fullscreen\/maximize button?","response":"You can download and use RightZoom, which overrides the green plus (zoom) button to provide a function that works like maximize in Windows. \nAlternatively, Spectacle is a free open-source app that contains several useful window management shortcuts. \nNote, while it doesn't change the default behavior of the green button, it does make it superfluous. \nAnother app, available on a 45-day free trail, is BetterTouchTool, which solves the issue via certain mouse commands. \nFinally, if you don't want to use apps, you can assign a shortcut for the Zoom menu item from System Preferences."},{"question":"make the green full screen window icon on yosemite maximize windows","response":"If you want to maximize windows, but not go to fullscreen, hold option and left click the green button. \nAlternatively, you can bypass the green button altogether by installing Spectacle, an open-source app that allows maximization with the shortcut \u2318 + \u2325 + F."},{"question":"why use a database instead of just saving your data to disk?","response":"Databases allow for efficient data querying, enabling users to ask questions and retrieve information rapidly. \nThey also enable the linkage of data from various tables. \nThis is particularly beneficial when dealing with relational data, such as customers purchasing products with connections to suppliers and manufacturers. \nDatabases are optimized to save just the things that change to disk in a fault-tolerant way. \nAlso, they are designed, so you can quickly just load the little bits of data you need at any given time. \nFeatures like indexing of records and efficient transfer of information further contribute to the advantages of using databases. \nMoreover, databases handle concurrent updates, transactions, caching, and asynchronous I\/O, making them more correct and performant, while simultaneously simplifying code implementation. \nThey are essential when multiple processes modify data to avoid conflicting changes or when data exceeds memory capacity. \nIn addition to managing concurrency, reliability, and performance issues, databases allow programmers not to bother with how bytes and chars are represented in the memory."},{"question":"can i copy by highlighting and paste by middle click on mac os x?","response":"To copy text by highlighting and pasting by middle-click on Mac OS X, you can explore BetterTouchTool, which allows you to assign a keystroke to the middle mouse button. \nAfter highlighting text in the Terminal, middle-clicking can paste it back without using copy\/paste keyboard shortcuts. \nAdditionally, there's a free C program that achieves a similar result. \nAnother option is using the ShiftCommandV shortcut or Command + two-finger-click to paste the content from the buffer."},{"question":"why would someone trust duckduckgo or other providers with a similar privacy policy?","response":"DuckDuckGo declares that it does not monitor its users, refrains from using cookies by default, and does not collect personal information. \nMoreover, DuckDuckGo emphasizes that they do not store any personal data and it does not require users to log in, allowing them to clear cookies and change IP addresses freely. \nUsers can use the platform as advertised with minimal hassle. \nDuckDuckGo stands by its commitment to user privacy, and their approach to protecting privacy through technical measures such as not storing cookies or identifiable HTTP GET parameters is apparent. \nThe option to easily manage what data is sent to third-party sites when clicking on links is provided as a feature for those concerned about privacy on DuckDuckGo."},{"question":"what is the actual size of an ethernet mtu","response":"The Ethernet MTU is 1500 bytes."},{"question":"can vlans span across routers?","response":"Yes, you can, and it's recommended to do so."},{"question":"why not use larger cipher keys?","response":"The RSA key length affects decryption speed significantly, where doubling the RSA key length results in a decryption process that is 6-7 times slower because larger keys require more processing time. \nIt is repeatedly believed to slow things down unnecessarily. \nGoing from a 128-bit AES key to 129 bits would double the time required for a brute-force attack. \nSpecifically for RSA keys, the generation of these keys is especially more costly because it involves finding large prime numbers. \nMoreover, an increase in key length leads to the generation of more data, which affects storage space. \nIf breaking 256-bit keys ever becomes feasible, it would require groundbreaking advances in our physical understanding of the universe, suggesting that such capability is extremely unlikely."},{"question":"what color codes can i use in my ps1 prompt?","response":"The correct code for creating a white foreground in terminal settings is 37. \nForeground colors include Dark gray (90), Light red (91), Light green (92), Light yellow (93), Light blue (94), Light magenta (95), and Light cyan (96) and for the background: Dark gray (100), Light red (101), Light green (102), Light yellow (103), Light Blue (104), and Light magenta (105)."},{"question":"why are native es6 promises slower and more memory-intensive than bluebird?","response":"The V8 promises implementation in JavaScript, rather than C, results in less optimal memory usage due to the allocation of arrays for promise handlers; a benchmark has shown the allocation of 160k unused arrays for 80k promises. \nBluebird's optimization for a common use case where a promise is branched once leads to significant memory usage improvements. \nMoreover, the creation of a promise through the `new Promise` method requires three closures per promise, making it an inefficient approach compared to Bluebird's promisify function, which allows for convenient API consumption and conversion of modules into promise-based ones."},{"question":"can someone take down wi-fi signal?","response":"Some devices can \"jam\" Wi-Fi signals, and Wi-Fi can operate on various channels. \nIt's possible to disrupt the communication between a router and devices by interrupting their specific frequency. \nYou can disrupt a Wi-Fi network without knowing the password by doing physical layer attacks i.e., jamming the frequency with your own signal. \nMAC and Network Layer attacks are particularly effective against networks that use outdated security protocols like WEP, as it's easier to forge de-authentication packets and throw out stations from the Wi-Fi network. \nThe \"Duration attack\" is a type of cyber attack in which the attacker sets the duration field in frames to the maximum value and uses a low data rate, thus, this forces the access point and other clients to honor the attacker's transmission time and causes a significant impact on the network."},{"question":"what is the difference between echo and print in shell script?","response":"When comparing \"printf\" and \"echo,\" the former offers additional formatting capabilities: specifically, it doesn't automatically append a new line to the output, contrary to \"echo,\" which does."},{"question":"how to use gps\/maps without an internet connection?","response":"To use GPS without the internet, Maverick for Google Android is available in both a limited free version and a paid version, as offered by Code Sector. \nIn England and much of Europe, ViewRanger is highly recommended for its support of the Ordnance Survey and other official maps. \nGoogle Maps 5.0 introduces support for an offline mode, enhancing its usability without an internet connection. \nThough Google Maps provides some offline functionality, HERE Maps is deemed the best free option due to its comprehensive offline capabilities, nearly worldwide map coverage, and various navigational features. \nAdditionally, MapFactor offers OSM-based offline navigation, which is fairly basic but shows potential, and TomTom maps can be purchased within the app. \nLocus is favored for its fantastic offline and off-road abilities, with support for large offline map tile sets and a user-friendly interface, available in both a free ad-supported version and an affordable paid version. \nMaps With Me offers a swift and free lite version for offline map usage. \nLastly, OsmAnd, which utilizes OpenStreetMap data, is an open-source app capable of storing detailed maps on a phone's storage in a compact vector format."},{"question":"are (database) integration tests bad?","response":"Integration tests are crucial for verifying that everything works together, which is harder to do but more meaningful in the end. \nIt's essential to utilize both unit and integration tests within the testing framework. \nWhile integration tests are not inherently bad, heavy reliance on them may suggest that your individual components were not designed with testability in mind. \nDatabase integration tests, in particular, are necessary to verify the functionality that interacts directly with databases. \nFinally, integrated tests, in the right context, can be more useful than solely relying on unit tests, as they test the system in a way that reflects its operation in production."},{"question":"how secure are virtual machines really? false sense of security?","response":"Malware has not yet been able to escape from the confines of a virtual machine (VM) sandbox by exploiting the VM nature to affect the hypervisor. \nVirtualization can be very secure when appropriate measures are taken to protect the host machine, and practices such as isolating VM server management and avoiding VM-host interfacing tools are implemented. \nHowever, VMs are not impervious to all security threats, as demonstrated by exploits like VENOM, which may allow attackers to escape a VM and potentially access the host system. \nVM security can theoretically be bypassed through various methods, including exploitable weaknesses in the host OS itself, bugs in vendor code, or vulnerabilities resulting from other software on the host."},{"question":"how to colorize output of git?","response":"To better handle the color output in git on terminals that support this feature, you should consider using the configuration `git config --global color.ui auto`. \nAdditionally, if you\u2019re looking to color code your command outputs, the Arbitrary Command Output Colourer can be used, although there might be issues with prompts not displaying for user inputs. \nA range of color configurations, such as `color.branch` and `color.status`, can be set globally to automatically apply color to git commands for ease of use and readability. \nIf you want to view colored diffs, the command `git -c color.diff=always diff [...] | less -R` can achieve that effect. \nLastly, for a more personalized setup in git, you can add a `color.diff` section directly into your `~\/.gitconfig` with specific ANSI color codes for new and old changes, adjusting the visual representation to your preference."},{"question":"if my team has low skill, should i lower the skill of my code?","response":"Maintaining your programming skills is essential, but it may be necessary to modify your coding approach to prioritize clarity for those who maintain it. \nWhile not lowering the skill of your code, you can ensure code expressiveness and maintain consistency in coding style across a team's work, which is crucial. \nElevate the quality of your comments, especially around more complex sections, without overwhelming the code with excessive commentary."},{"question":"am i too clever to be readable by jr. devs? too much functional programming in my js?","response":"According to some opinion, yes, your code was deemed too clever, suggesting that simplicity should be a guiding principle over complexity. \nIf you are in doubt about it, then it probably is too clever. \nOne reviewer found the first snippet of code easier to maintain, which is a valuable quality of code, but they found little of value in the second snippet. \nAdditionally, applying programming techniques like functional programming should only be used when it's actually needed, rather than complicating solutions unnecessarily. \nFinally, one opinion found that the original code is impressively clear and easy to understand for any level of programmer."},{"question":"how to open files via terminal","response":"To open a file with the default application from the command line, you should type \"open\" followed by the file name or path; if you want the file to open in a specific application, put \"-a\" followed by the application's name in quotes between open and the file."},{"question":"time machine ridiculously slow after el capitan upgrade","response":"One solution involves changing the storage disk settings by going to Time Machine Preferences to removing the currently associated disk and then reconnecting to the NAS drive using its IP address via SMB protocol instead of AFP. \nAdditionally, you can verify I\/O throttling via the Terminal through Spotlight, usually bound to \u2318Space, and potentially increase the backup speed by altering system parameters to temporarily disable the low priority throttling. \nIt is then advised to re-enable the throttling after your backup finished successfully with the following command sudo sysctl debug.lowpri_throttle_enabled=1, which is also confirmed by another user. \nMoreover, another approach was to discard all old backups, so one user dismounted the volume from the troublesome Mac, mounted the drive\/network share from another computer (not a Mac), deleted the entire .sparsebundle directory, and then started the backup again; this created a new .sparsebundle and performed backing up at around 10 MB\/sec. \nIf starting fresh is not preferred, alternative methods such as rebooting in Safe Mode or adjusting Spotlight indexing are suggested to be considered."},{"question":"what are the implications of nsa surveillance on the average internet user?","response":"The average internet user is not significantly affected by privacy issues from NSA surveillance since they tend to share a lot of information about themselves online willingly. \nHowever, the existence of surveillance programs such as PRISM does pose a real risk of expanding their scope beyond their original intent, which can lead to misuse and misinterpretation of collected data. \nDespite increased worry about privacy from some individuals, most people believe they have nothing to hide and are not concerned unless they see a direct impact on themselves, while more worried ones will try to figure out how to hide things."},{"question":"how to write a very basic compiler","response":"To start, delve into Intel manuals to gain a comprehensive understanding of linking and loading executable code, COFF and PE formats for Windows (or ELF for Linux), and .COM file formats. \nAdditionally, familiarize yourself with assemblers and grasp the intricacies of compilers and code generation engines. \nFor hands-on practice, begin by writing a compiler for Brainfuck. \nAs you proceed, develop a Lexer to segment the text into tokens, such as words, numbers, and literals. \nConstruct a top-down recursive descent parser for your chosen grammar, incorporating syntax tree generation into the parsing process. \nFinally, implement a machine code generator based on the syntax tree. \nFor a more practical approach, consider writing the compiler in a language like Python or Ruby, employing simple algorithms that align with your understanding. \nWhile doing so, you can choose to implement different stages of the compiler in various languages. \nAs a valuable tip, resist the urge to invent your language initially; instead, opt for an existing educational language to streamline the learning process."},{"question":"is the oft-cited xkcd scheme [...] no longer good advice?","response":"The XKCD password scheme remains effective because its security is based on generating memorable passwords from a large set of possibilities, not from being unknown. \nOn the contrary, Schneier has critiqued the XKCD password method, suggesting it's outdated advice, and promotes his own system as the superior choice."},{"question":"why does my dock keep moving back to my other monitor?","response":"You can summon the Dock on a different display by moving the cursor to the bottom of the desired display, and then continuing moving down. \nApple didn't account for the over\/under monitor configuration, the overhang catches your cursor and summons the dock."},{"question":"what do the icons mean on google hangouts?","response":"If there's a computer icon next to their icon, it means they're accessing Hangouts from a PC or Chromebook. \nIf it's a phone icon, it indicates they are using their phone. \nAlso, the location of their icon correlates with the most recent message they've read. \nFinally, if the icon is dim, it means they are not looking at your message."},{"question":"what is ni in top?","response":"\"ni\" refers to the user defined priority, \"Time spent running niced user processes\"."},{"question":"how many devices can you connect to iphone hotspot?","response":"The number of devices that can join your Personal Hotspot at one time depends on your carrier and iPhone model, but the typical limit is usually between 3 and 5 devices."},{"question":"how to stop os x from writing spotlight and trash files to memory cards and usb sticks?","response":"To do so, I utilize two tools: Clean Eject, which is a free application, and a custom-made Automator Service, which I have not made public. \nThese tools are integrated with a hotkey, enabling me to quickly clean and eject a volume."},{"question":"why dhcp offer is broadcast?","response":"When a DHCP server replies to a network, it uses a unicast IP packet and Ethernet frame addressed to the target MAC and IP."},{"question":"can cat-ing a file be a potential security risk?","response":"Yes cat-ing a file is not just a potential risk, it's a real risk, as various online documents warn, but as long as you don't run the thing, you're fine."},{"question":"how can i make press any key to continue","response":"Use \"read -n 1 -s -r -p 'Press any key to continue'\". \nThis command will only require a single character to resume, won't display the key pressed, and will interpret input strings in their raw form, disregarding backslash escapes."},{"question":"what do the numbers in a man page mean?","response":"The number corresponds to the specific section of the manual from which the page comes; for instance, 1 relates to user commands, while 8 pertains to system administration tools. \nStandard sections of the manual include user commands, system calls, C library functions, devices and special files, file formats and conventions, games, miscellanea, and system administration tools and daemons. \nSome sections of manuals can have subsections, such as POSIX specifications indicated by 'p'. \nThese section numbers have a history that dates back to the original Unix Programmer's Manual by Thompson and Ritchie in 1971. \nThe manual sections can encompass a variety of pages, including executable programs or shell commands, system calls provided by the kernel, library calls within program libraries, special files typically found in \/dev, file formats and conventions like \/etc\/passwd, games, miscellaneous sections including macro packages and conventions, and system administration commands usually reserved for root. \nNon-standard sections include header files, network functions, Perl modules, and new manpages, among others. \nAccording to SVr4 definitions, sections also include user commands, library functions, file formats, standards, environment and macros, games and demos, device and network interfaces, special files, maintenance procedures, and kernel and driver entry points and structures. \nWhen referencing man pages, specifying the section number helps in precision, particularly when multiple sections contain man pages with the same name. \nMan pages are organized into sections, and on the command line, different section pages can be called by using the section number to get the required information. \nWhile the default man path or the $MANPATH environment variable predominantly lists the available sections, not all sections in the manual may be listed."},{"question":"how do you organize your projects?","response":"When organizing projects, it's common to segment them by namespace, layer, or according to their functions within the application. \nFor instance, one might create separate projects for different components such as networking, logging, or a specific line of business framework. \nAlternatively, projects may be divided into layers like Core, Model, Presenter, Persistence, UI, Validation, Report, and Web, which serve as the larger \"building blocks\" of an application. \nAdditionally, for solutions with shared functionality across multiple projects, dividing by layers is a practical approach, where the layers represent shared code, plugins, or extensions that need to be accessible across various projects or solutions."},{"question":"how can a code editor effectively hint at code nesting level - without using indentation?","response":"One suggestion is to incorporate a heat map in the left column, with brighter colors indicating deeper indentation. \nAnother technique involves utilizing open and closed parentheses to visually represent the nesting structure. \nCombining both width and heatmap coloring is also an effective way to represent code structure visually. \nTo enhance the visual cues, some propose using gradients instead of squares, reducing the overall clutter of lines in the editor. \nAnother interesting idea is to add a 3D effect to the text by adjusting the font size based on the nesting level, creating a dynamic visual representation. \nSyntax folding rules provide an alternative solution, allowing the code to be folded using a nested outline structure. \nSwitching from squares to capsules is also suggested to improve the clarity of code nesting levels. \nSome code editors, like jGRASP, implement a visual marker in the margin to indicate nesting levels. \nUtilizing hue on top of the saturation effect is proposed as a method to convey nesting levels visually. \nLastly, for users who prefer a more direct approach, highlighting the whitespace characters used for indentation in different colors, such as spaces in yellow and tabs in green, can offer a clear representation of code structure without relying on traditional indentation."},{"question":"what does synchronize mean in mac mail?","response":"While Get Mail will only fetch new mail in the Inbox, synchronize will look for changes in the IMAP configuration, look for changes in the folder structure of your account, and probably a lot more. \n\nIf you make changes on one Mac, you can use Synchronize to make a second Mac aware of the changes. \n\nSynchronize basically double counts and double checks each and every message to make sure things are 100% correct, so resolving noise\/errors\/lost messages, incorrect statuses, and other real life bumps and errors."},{"question":"what versions of os x are affected by heartbleed?","response":"No versions of OS X are affected by Heartbleed nor is iOS affected. \nModification would result in a Mac or OS X program having the vulnerability. \nNo version of OpenSSL is vulnerable to CVE-2014-0160, aka the Heartbleed Bug. \nOS X doesn't ship with the affected releases of OpenSSL."},{"question":"how do i automate a key press in applescript?","response":"Run a script in AppleScript Editor to automate a key press: an example given is activating the application \"Firefox\" and using a loop to send keystrokes repeatedly with random delays."},{"question":"how can i install the `ll` command on mac os x?","response":"For macOS, an alias command `alias ll='ls -lG'` should be added to the ~\/.bashrc file or the ~\/.profile depending on the preferred setup method. \nFor system-wide applications on all accounts, the alias can be placed in \/etc\/profile. \nOn macOS El Capitan, adding the command `alias ll='ls -lGaf'` to ~\/.bash_profile and sourcing it is recommended. \nUsers of macOS with zsh shell should specifically add `alias ll='ls -lG'` to ~\/.zshrc. \nMoreover, with the introduction of macOS Big Sur, Apple switched the default shell to zsh, meaning aliases like `alias ll='ls -la'` should now be added to ~\/.zshrc and the Terminal needs to be restarted for changes to take effect."},{"question":"is telegram secure?","response":"Telegram seems to offer more secure communications in transit, according to their 'secret chat' feature, which suggests it could provide a higher security level for messages being transferred. \nThe EFF's Secure Messaging Scorecard grants a 100% security rating to \"Telegram (secret chats)\". \nHowever, some experts don't consider it to be secure as its protocol, MTProto, is controversial because it was created without crypto experts, resulting in certain vulnerabilities, as highlighted by various security researchers. \nFurthermore, despite any secure protocol that may exist, the app itself has suffered from significant vulnerabilities, undermining the security of communication overall."},{"question":"the volume cant be ejected because its currently in use","response":"When encountering issues with ejecting a disk due to a message suggesting that files are still open, running Disk Utility or, if necessary, DiskWarrior could resolve the problem by repairing the potentially corrupt file system, thereby allowing the disk to become ejectable once more. \nAlternatively, attempting to relaunch the Finder may also be effective in resolving disk ejection issues."},{"question":"does curl have a timeout?","response":"The curl command in Linux allows you to control connection timeouts and the maximum time for an operation. \nExplicitly, there is the --connect-timeout option to set a time limit for the connection phase and the --max-time option to limit the total time allowed for an operation. \nFor critical time-sensitive operations, you might use the --max-time option with a parameter like 900 seconds (15 minutes) and the --connect-timeout for about 60 seconds (one minute). \nThere is also a utility known as timelimit, which can effectively limit the absolute execution time of a process. \nThis tool allows you to define warnings and kill signals alongside their respective timeouts to manage process execution time. \nIf you are using MacOS and have coreutils installed, the GNU timeout command, which is part of that package, can be an alternative. \nFor instance, you could employ 'gtimeout' followed by the duration and the command you wish to run, terminating the command if it exceeds the specified duration."},{"question":"how are \/dev linux files created?","response":"These \/dev files, called device nodes, can be created either through the use of the \"mknod\" command or are generated automatically by the udev system."},{"question":"macbook pro: how to disable discrete gpu permanently from efi?","response":"Apple does not approve of users tampering with the EFI boot system, and any modification could result in severe consequences, including the bricking of your device. \nWhen changing the EFI, you also accept a heightened security risk. \nThere are several methods to use the integrated Intel graphics on a MacBook Pro under different operating systems, such as using rEFInd or a patched version of GRUB; however, each approach carries its own set of risks, including hard drive corruption or leaving the computer in an unbootable state. \nAnother approach is to edit the NVRAM variable from Single-User mode, which may circumvent steps that can become problematic with certain macOS updates and can involve using Linux to alter EFI variables. \nIt's possible to disable the discrete GPU on newer MacBook Pros, but this will remove the ability to directly output to an external monitor using built-in Thunderbolt or DisplayPort outputs. \nThere are alternatives, such as USB solutions or external GPUs, if you still need multiple displays."},{"question":"ive somehow enabled overtype mode in slack and i cant get back to insert mode","response":"Closing and restarting Slack is a simple and effective solution that works for many users. \nAlternatively, pressing the Help key can toggle between insert and replace modes, providing a quick fix. \nFor Windows users, using Ctrl+R can also help in this situation. \nFor users with an old Apple keyboard, the 'help' button can turn on\/off the overwriting function on the computer. \nIf you're using a PC keyboard with your Macbook, pressing the insert key on your keyboard might resolve the issue. \nSimilarly, on a laptop's built-in keyboard, pressing the Insert key could be the solution. \nFor Windows users facing this problem, running the On-Screen Keyboard and clicking the INSERT key is a workaround to regain insert mode."},{"question":"how do i remove the google chrome notifications bell icon from the mac os x menu bar?","response":"Previously in Chrome, users had the ability to hide the Notification Icon from the menu bar under \"Chrome -> Hide Notification Icon\" without delving into chrome flags. \nIn Chrome for OS X v35.0.1916.114, there was a feature called \"Enable Rich Notifications Mac, Windows\" which has since changed to \"Notification Center behavior Mac\" and can be accessed in chrome:\/\/flags. \nHowever, as of Google Chrome version 47.0.2526.73, the Notification center, identified by a bell icon, is no longer available."},{"question":"multi-mode and single-mode fiber differences","response":"Distance and cost are factors: singlemode fiber often costs less than multimode fiber, but the optics to drive it are twice the cost of multimode fiber optics. \n\nMultimode Fiber (MMF) uses a longer wavelength (850nm) and much wider beam, and generally has a reach up to ~550 meters, whereas Singlemode Fiber (SMF) uses short wavelength (1310nm+) and narrow beam, with the potential to reach 10,000 meters (40,000 meters with ER). \n\nMMF uses a much bigger core, and so the optics are cheaper, but suffers greater modal dispersion where multiple modes of propagation result in a time-smearing of the received signal, hence, distances have to be shorter. \n\nSinglemode fiber (SMF) has much tighter tolerances for optics used, the core is smaller, and the laser wavelength is narrower, meaning that singlemode fiber has a lower power loss characteristic than multimode fiber, and has the capability for higher bandwidth and much longer distances in transmission."},{"question":"is google spying on all of us?","response":"Yes, it's correct to say that Google monitors user data across their various platforms, such as search engines, Gmail, YouTube, and others, to curate information for targeted advertising. \nThis type of data collection is not typically considered \"spying\" in the conventional sense. \nRather, it's an effort to enhance the value of Google's services to both users and advertisers. \nGoogle's Terms of Service are clear in stating that by using their services, you're consenting to their data collection practices. \nThrough this exchange of information, Google can provide its services for free or at a low cost, funded primarily through advertising revenue."},{"question":"trying to ssh to local vm ubuntu with putty","response":"A solution to network issues with a VM running on different domain configurations, such as NAT or Bridge, is to add a second network adapter. \nFor direct accessibility of a host in the private network from the host network, port forwarding is also necessary. \nTo configure network settings in VirtualBox for Ubuntu 14.04 and Oracle VirtualBox 4.3.30, you should right-click your virtual machine, go to \"Settings\", then select \"Network\" and choose \"Host-only Adapter\" next to \"Attached to\". \nFor setting up network configurations in Ubuntu 18.04 and VirtualBox 5.2, create a Host Network Interface and configure the VM\u2019s network settings to use a Host-only Adapter, specifying a static IP address if required for easier SSH access."},{"question":"how to connect two pairs of bluetooth headphones to one phone?","response":"It is possible to do this in a couple of ways: you can use an additional device called a Bluetooth (BT) splitter, and you can connect two SkyGenius headphones to one iPhone without any splitter using a function they call \"ShareMe\". \n\nApparently, Apple is rolling this capability out in a feature called Airplay."},{"question":"why is my phone texting from email?","response":"Your iPhone employs the Messages app for communication with other devices, distinguishing the process based on the recipient's device type. \nWhen messaging an Apple device user, Messages uses your email to identify your Apple ID, not for sending the message via email but rather using the Apple network. \nConsequently, this allows Apple devices to communicate without incurring SMS charges, automatically determining the best delivery method."},{"question":"how to solve the issue that a terminal screen is messed up? (usually after a resizing)","response":"Using the shortcut Ctrl+L may help as it has the function of clearing or redrawing the terminal screen, which varies with the program used. \nAnother approach involves enabling the checkwinsize option, which should automatically adjust the terminal size but may require a resize of the window or a maximize\/minimize action for it to take effect."},{"question":"what is ^m line ending?","response":"The ^M character signifies a carriage-return character. . \nThis character typically appears in files that come from the DOS\/Windows environment where lines end with both a carriage return and a newline, in contrast to Unix-based systems which end lines with a single newline."},{"question":"when to use c over c++, and c++ over c?","response":"If you are equally familiar with both C++ and C, it's advisable to opt for C++, provided that a compiler for C++ is available on your platform. \nC++ allows you to code without using the elements of the language you dislike, such as classes or exceptions but also gives you the flexibility to incorporate these features in the future should you wish to. \nEssentially, there's no compelling argument to choose C over C++ if a C++ compiler is accessible since C++ is fully capable of supporting C-style coding while offering the option to expand your use of its features over time."},{"question":"how do i delete photos from my phone without deleting from icloud?","response":"If you want to delete images from an iPhone or any device without deleting it from all your devices, you have to disable iCloud Photo Library and use another form of sync or another service, like Dropbox, Google Photos, or Amazon Cloud Drive. \n\nHowever, if you turn on Optimize [device] Storage, iCloud Photo Library will automatically manage the size of your library on your device and free up space by keeping low-res versions of your pictures."},{"question":"how to delete directories based on `find` output?","response":"When using GNU find, you can easily remove files by employing the -delete option, (find . -name test -delete)."},{"question":"where does the mac store account pictures?","response":"To locate account pictures on a Mac, you can generally look in the \"~\/Library\/Images\/iChat\/Recent Pictures\" or \"\/Library\/User Pictures\" directories. \nAccount pictures are also stored within the Directory Service for Mac OS X 10.5 or later, with paths to files with the \"Picture\" attribute accessible via the \"dscl\" command. \nFor user login pictures specifically captured on Snow Leopard 10.6.8, the location is \"~\/Library\/Images\/iChat\/Recent Pictures\". \nOn Mac OS X Mountain Lion 10.8.2, users' account pictures can be a mix of JPEGs and TIFFs found in multiple locations, such as \"Macintosh HD\/Users\/user0\/Library\/Images\/iChat Recent Pictures\", where \"user0\" is the first-defined user on the system, as well as \"Macintosh HD\/Library\/Caches\/\". \nIn Mountain Lion 10.8.3, however, recent account pictures have been moved to \"~\/Library\/Containers\/com.apple.ImageKit.RecentPictureService\/Data\/Library\/Images\/Recent Pictures\/\" as discovered through the \"fs_usage\" command line tool."},{"question":"what is aosp rom android?","response":"An AOSP ROM is essentially a ROM that is built on the Android Open Source Project, and in its most original form, it refers to ROMs that are unmodified from the code provided by Google."},{"question":"does an established https connection mean a line is really secure?","response":"SSL is very secure, particularly if you are using SSL 3.0 and strong encryption, but (as with most things) it depends how you use it: because SSL relies on Certificate-Authorities (CA), and basically any organization can become a CA, so there is still the possibility of man-in-the-middle attacks with fake, yet CA-signed, certificates. \n\nSSL allows for secure communication, albeit far from foolproof, and is only as secure as the DNS infrastructure that directed you to that server \n\nNo, SSL is not secure, if you have an unsafe line, and the authentication is solved. \n\nHowever, even if a system is best practice, it is only secure if a user can be prevented from connecting to a fake intermediate site either via web spoofing\/hyperlink spoofing, or by being presented an invalid certificate and dismissing the browser warning and proceeding to connect anyway."},{"question":"how big is the pipe buffer?","response":"The pipe buffer capacity is not consistent across different systems and can also change within the same system. \nSpecifically, on Mac OS X, the default capacity is 16,384 bytes, but this can increase to 65,536 bytes under certain conditions, such as large writes being made to the pipe or a decrease to a single system page when there's heavy usage of kernel memory by pipe buffers. \nExperimental results from running a script on a Mac OS X 10.6.7 system show that for write sizes of up to 16,384 bytes, the successful bytes written before the error remained at 16,384, but when the write size was increased to 32,768 bytes and above, the successful bytes before error jumped to 65,536 or resulted in no successful writes for even larger sizes. \nOn a Linux 3.19 system, the same script demonstrated that regardless of the write size, from 1 byte to 65,536 bytes, the successful bytes before the error consistently remained at 65,536."},{"question":"apples open letter - they cant or wont backdoor ios?","response":"In certain cases involving specific hardware, it has been stated that manipulating the device's firmware is feasible. \nA data forensics company called Cellebrite has reportedly developed the ability to unlock and access data on various iPhone models, hinting at the existence of a vulnerability they can exploit. \nThe notion that this manipulation may be actionable has some support, indicated by Apple's own implications in their statements, although they acknowledge the security risks of fulfilling such requests. \nThere is suspicion over whether Apple will comply with creating a system that bypasses security features due to potential risks and their apparent objection to such demands. \nApple has a financial motive in portraying the iPhone as unhackable even by the FBI, and may also be attempting to capitalize on anti-government views. \nThe FBI's request has been described not as seeking a \"backdoor\" but rather an interface to exploit an existing vulnerability, with Apple's refusal to comply not eliminating the underlying security issue."},{"question":"how can i prevent applications from running on startup?","response":"Running task killers on Android devices is generally unnecessary as the operating system can manage applications effectively on its own. \nThe Android OS is proficient in handling and terminating applications without the need for third-party task killers. \nAndroid is designed to intelligently manage resources, terminating applications to free up memory for others and restoring them when necessary. \nThe System Tuner free app offers a feature to disable \"startup apps,\" which could be a better solution than using startup managers or task killers. \nAndroid handles task management better than task killers, and using such apps could lead to increased battery consumption due to repeated killing and restarting procedures. \nRooting the phone allows for the use of additional management applications like Autorun manager, which may provide more control over app behavior. \nAutostarts is an application recommended for rooted devices that provides the user with control over background processes and startup events, potentially improving phone boot speed."},{"question":"how to avoid being asked passphrase each time i push to bitbucket","response":"You should utilize an SSH agent to manage Secure Shell (SSH) keys and connections. \nKeychain is a tool that can assist with managing SSH keys and is available through package managers like apt-get in Debian and Ubuntu systems. \nFor an optimal setup, you should create or edit the \"~\/.ssh\/config file: Host * UseKeychain yes AddKeysToAgent yes IdentityFile ~\/.ssh\/id_rsa\" file to include directives that enable the use of Keychain, instruct the SSH agent to add keys, and identify the default identity file."},{"question":"where is my whatsapp backup stored on icloud?","response":"In a hidden folder in the iCloud Drive, which you can find by typing a search term in Terminal."},{"question":"can i remove files in \/var\/log\/journal and \/var\/cache\/abrt-di\/usr?","response":"It is confirmed that it is possible to remove the files from \/var\/log\/journal directory, for example using the command: `sudo journalctl --vacuum-size=500M` (500 megabytes being the specified size threshold in this example)."},{"question":"what is difference between find and ls?","response":"The \"ls\" command is restricted to the current working directory, showing a detailed list sorted by modification time in reverse, only for files and directories that start with \"file*\". \nOn the other hand, the \"find\" command searches through all files and subdirectories for names beginning with \"file*\"."},{"question":"how to remove an audio track from an mp4 video file?","response":"You could try avidemux. \n\nFirst run ffmpeg -i file.mp4 to see which streams exists in your file, then run ffmpeg -i file.mp4 -map 0:0 -map 0:2 -acodec copy -vcodec copy new_file.mp4 to copy video stream and 2nd audio stream to new_file.mp4. \n\nRemoving all audio tracks from an mp4 file can be done thus: ffmpeg -i input_file.mp4 -vcodec copy -an output_file.mp4. \n\nOther options are: Avidemux (GUI) and ffmpeg (console). \n\nIdentify stream numbers: $ ffmpeg -i in.mp4 ... Stream #0:0: Video: ... Stream #0:1: Audio: ... Stream #0:2: Audio: ... then use -map _file_:_stream_ to select which streams to process and output $ ffmpeg -i in.mp4 -map 0:0 -map 0:2 -vcodec copy -acodec copy out.mp4, further details at: https:\/\/ffmpeg.org\/ffmpeg.html#Advanced-options. \n\nThe command -an -vcodec copy will remove all audio."},{"question":"merging folders with mv?","response":"Files can be merged into a directory by using the command 'mv folder\/* directory\/folder\/ rmdir folder', provided no files share the same name in both 'folder' and 'directory\/folder'. \nTo renames the files instead of copying them and then deleting them, use `cd source; find -type f -print0 | xargs -0 -n 1 -I {} mv '{}' 'dest\/{}'`. \nIt is suggested to use 'mv with find' for a one-pass solution that covers both files and directories, using complex find command syntax to handle file movement and directory creation."},{"question":"how to remove unused macports packages?","response":"To remove a MacPorts port along with its dependents, you can utilize the command \"sudo port uninstall\" with the \"--follow-dependents\" flag; however, if a port has dependents, it might require a forced uninstall using the \"-f\" flag. \nAlternatively, the \"port_cutleaves\" (followed by the sudo port_cutleaves command) or \"debfoster\" packages or the \"macportsfoster\" script can help clean out your system and manage unneeded dependencies in MacPorts."},{"question":"can two uuid be same?","response":"A UUID is not guaranteed to be absolutely unique across different devices or installations since it is essentially a random 128-bit number; therefore, it's technically possible, but improbable for UUIDs to be identical. \nMost systems ensure uniqueness by checking new UUIDs against pre-existing ones and discarding any duplicates."},{"question":"how do i find out the applescript commands available for a particular app?","response":"You can start the Script Editor app, formerly AppleScript Editor, and open the app dictionary you're interested in to browse its AppleScript commands. \nAlternatively, you can drag the application icon onto the Script Editor icon to access its dictionary if available."},{"question":"how should i set up emergency access to business-critical secrets in case i am hit by a bus?","response":"For the management of privileged system accounts, it is advisable to create separate accounts that possess full access but are not meant for daily use, ensuring that no one has access to them under normal circumstances and that usage is closely monitored and possibly automated alerts are in place to inform key users upon access. \nAutomation plays a critical role in developing a secure hit-by-a-bus plan, especially in the maintenance of infrastructure through automated scripts that document the expected workflows, which then adapt as changes are implemented, thereby also serving as a form of living documentation. \nContinuity of business documents is essential when detailing in understandable terms the critical components of the company's infrastructure, including server details, software functions, and necessary passwords, which should be encrypted and accessible only to select individuals, such as the CEO, and updated as needed."},{"question":"are ssh usernames case sensitive?","response":"In multiple types of systems and local accounts, usernames are found to be case sensitive, although some state that this is variable when using LDAP. \nIn Unix systems, not only are usernames case sensitive, but the convention is also to avoid using uppercase characters to prevent potential issues."},{"question":"android phone charging slowly: how to make it faster","response":"To address a device that is charging slowly, one can increase the power supply by using a Type C port, especially if it supports Power Delivery for faster charging, or by connecting the device directly to a wall outlet rather than a computer. \nTrying different USB cables can also be beneficial, as some cables and adapters are more efficient, depending on the device's model. \nAnother solution to a device charging slowly is diligently cleaning the charging port with compressed air, toothpicks, or other non-conductive items, but metal objects like staples, while effective, pose a higher risk and should be used with caution."},{"question":"how can i type unicode characters without using the mouse?","response":"First, enable Unicode Hex Input in System Preferences -> Keyboard -> Input Sources. \nIn System Preferences, select \"Keyboard,\" then choose \"Input Sources\". \nAlternatively, Press CTRL+CMD+space to bring up the characters popover, type in the code point, press the down arrow to select the symbol, and then press ENTER to complete the process."},{"question":"how do you extract a single folder from a large tar.gz archive?","response":"When handling tar files, it is important to use relative paths without a leading slash when extracting specific folders, as indicated by the command: tar -xvf foo.tar home\/foo\/bar. \nBe cautious about security and the potential of overwriting important system files or your work, when not thoroughly checking the contents of an archive before extraction."},{"question":"what is wired memory?","response":"Wired memory is used for core functions of the Mac OS X operating system and cannot be reallocated by other applications. \nWired memory is basically used by your computer for internal bookkeeping of various sorts. \nIt includes memory used by core functions such as tracking applications, open files, and network connections and the memory used by integrated video chips. \nWired memory stores data that must always be accessible so it cannot be transferred to disk. \nWhen additional memory is installed in a system, wired memory increases accordingly."},{"question":"is there a specific reason for the poor readability of regular expression syntax design?","response":"The design of regular expressions was primarily influenced by their initial use with code editors, where commands had to be concise. \nThey were not intended to be a programming language but tools for executing quick edits. \nThis efficiency in design is a key part of their functionality, even though it can lead to complexity and confusion when used to parse input for programs."},{"question":"xperia companion where are backups stored?","response":"On Sony Xperia Z5 Compact, the backups are stored in SD-Card\/Android\/data\/SonyBnR\/Backup. \nOn Sony Xperia Z1 Compact, with no SD card or where storage destination is set as \"Internal Storage\", the backups are located in \/sdcard\/.semc-fullbackup, or \/storage\/sdcard0\/.semc-fullbackup, or \/storage\/emulated\/legacy\/.semc-fullbackup."},{"question":"what is akmod in fedora?","response":"Akmods are used to effectively manage kernel-related modules and drivers, particularly those that are not included with the operating system or are third-party, in order to ensure availability for the current kernel variant a user may be running, such as a custom-compiled kernel or one from an alternate source. \nAkmods serve a similar function to dkms but with a notable advantage: they only require the maintenance of a single kmod spec file that is compatible across both repository build systems and individual user systems."},{"question":"what is photoanalysisd and why is it using 77% of my cpu?","response":"Your iMac is currently processing the photos in your Photos library. \nThis might be occurring because you've recently imported or converted an existing Photos library from an earlier version of macOS. \nIf you have a large photo library, the processing can take some time."},{"question":"why do we use story points instead of man days when estimating user stories?","response":"The purpose of the estimation process is to improve over time by allowing estimators to maintain consistent metrics rather than having to adjust for previous underestimations in each new estimate."},{"question":"do symlinks take up space?","response":"Symbolic links occupy some storage space, specifically the space needed to maintain the name and target of the link, as well as a small amount of additional metadata."},{"question":"how do i remove icloud photos from my ipad?","response":"If you download apps and space is required, photos will automatically be removed, as they are securely backed up in iCloud. \nHowever, you could also turn off the iCloud photo library on your device. \nTo do this, go to Setting and tap on your name, then click on iCloud, and then photos. \nFinally, disable and tap \"remove from this device\"."},{"question":"why are salted hashes more secure for password storage?","response":"The salt is added before the hash, making the hash completely different for every salt. \nThis enhances security because when multiple users have the same password, they will have different hashes. \nA large number of iterations in password hashing algorithms like PBKDF2 or Scrypt is to deliberately slow down attackers, which reduces the key space they can explore in a given time frame. \nSimply salting MD5 hashes isn't sufficient in today's security environment; instead, one should use well-established security options like crypt, bcrypt, PBKDF2, or scrypt, which involve multiple rounds of hashing. \nSalting prevents the cracking of multiple accounts with the same weak password and makes it hard for attackers to identify which passwords are easy to compromise. \nA salted hash defeats rainbow table attacks because it makes the required rainbow table impractically large. \nUnique salts per password hash compel attackers to target each password individually, preventing a wide-scale breach, as even similar passwords contain completely different hashes. \nBy a factor of 2N, the storage requirement and the time to compute a rainbow table are increased by a salt. \nThe presence of salt in password hashing adds a layer of protection against rainbow table attacks by requiring attackers to resort to brute-force methods. \nWhile salts enhance security for medium-strength passwords, their effectiveness depends on the compromise of password hashes, which is already a severe security breach. \nThe primary benefit is evident when users reuse passwords across different systems, making medium-security passwords harder to reverse. \nEven a moderately secure password, when coupled with a salt, can withstand extended brute-force attacks, providing users with an opportunity to change compromised passwords and enhance overall security."},{"question":"should i return from a function early or use an if statement?","response":"It depends on the matter at hand, but either method can be considered valid. \nFor example, you could go ahead and write: if(someCondition) { SomeFunction(); }. \nDoing the pass\/fail conditions checks at the beginning allows for any failures to be dealt with at the top which also helps with the code's readability. \nMoreover, the early return approach is advised against in order to maintain the code's aesthetics, which can deteriorate, the more complex the code gets using this approach. \nHowever, for some, an early return can be more appropriate in terms of aesthetics if there are multiple conditions to check. \nAlso, early return can be a good approach to make the code easier to follow, especially if there are many 'if' statements, while some use early returns in order to avoid multiple level nesting in functions. \nOn the other hand, some consider an early return approach bad programming practice in that its use is a sign of weak code."},{"question":"can you add blank space to a photo in mac preview?","response":"Performing this task in preview mode is not possible. \nAcorn and Pixelmator can be used for this purpose, but they both cost. \nPixelmator comes highly recommended if you seek a comprehensive photo editing tool. \nAlternatively, a simpler method is to have the text in a window just above or below the picture and take a screenshot of the picture+words, if image quality is not a priority."},{"question":"why can i log in to my facebook account with a misspelled email\/password?","response":"Facebook tries to enhance user experience by attempting to \"correct\" a few common login mistakes such as inserting a random character before or after, capitalizing or not capitalizing the first character, or mistakenly using caps lock. \nFurthermore, the system automatically corrects certain typos or variations in your email address to improve ease of use as Facebook might have decided that usability is of utter importance. \nInstead of granting users several login attempts to manually fix common misspellings, the site tries to fix those misspellings automatically. \nThis measure also heightens security because it reduces the number of login attempts needed, allowing for stricter rate limiting against attackers."},{"question":"why do we need a 3-way handshake? why not just 2-way?","response":"A two way handshake would only allow one party to establish an ISN, and the other party to acknowledge it; while the three-way handshake is necessary because both parties need to synchronize their segment sequence numbers used during their transmission. \n\nLogically there are four steps involved, but the second and the third steps (of the four) are combined, so technically there are three packet exchanges, and the real reason for using 3-way handshake is to avoid half-connections."},{"question":"is there such a thing as having too many unit tests?","response":"Indeed, there can be an excess of unit tests, which may result from duplicative tests, those that are unnecessary, or tests that become a maintenance burden. \nPragmatically, the focus should be on tests that cover the primary entry points to ensure they function correctly and handle critical edge cases rather than seeking a suite of tests with redundant coverage. \nBulk testing, comparison against brute-force implementations, and random test case generation can be effective for complex algorithms. \nTests for newly discovered bugs and odd special cases are also beneficial. \nIt's important to test units, not just sub-units, and to integrate unit testing with higher-level tests for a more efficient effort. \nReach a certain test coverage across all classes before striving for complete coverage on subsequent modifications to maintain balance. \nIn cases of test maintenance overshadowing development, it may be necessary to reassess or even dispose of the less valuable tests. \nLastly, while code coverage is a good target, the quality of the tests and their alignment with crucial functionality take precedence."},{"question":"what vlan does cdp use?","response":"In regards to the behavior of CDP packets on network devices, it has been observed that CDP always chooses the lowest VLAN to send CDP packets."},{"question":"how can i track progress of dd","response":"The progress of the dd copy process can be estimated by adding a pkill -INFO command. \nYou can signal its progress by entering a Control + T character while executing the dd command. \nAs of coreutils 8.24, a status option has been included in dd, making it easier to monitor progress when using up-to-date versions of the tool. \nAdditionally, you may press Control + T for a visual progress update or use pv (pipe viewer) for a detailed progress bar on the command line. \nYou must install Homebrew Package Manager and then use it to install pv and dialog for progress visualization. \nA tool named progress, which can be installed via Homebrew, allows tracking the progress of data transfer processes using the PID of dd."},{"question":"prevent auto-pairing for certain devices (bluetooth)","response":"To prioritize sound output settings on a Mac, navigate to System Preferences > Sound > Output and manually select the Default option, which usually corresponds to the Speakers. \nIf your Bluetooth audio system isn't available via the AirPlay menu, you should manually switch the sound output within the System Preferences app, or alternatively, engage in some AppleScripting to automate the process. \nFor Bluetooth connectivity issues, run this command in your terminal: sudo defaults write \/Library\/Preferences\/com.apple.Bluetooth.plist DontPageAudioDevices 1. \nAfter doing this, you must manually connect to your Bluetooth audio system."},{"question":"is there a way to easily record a phone conversation in-progress?","response":"Google Voice allows you to record incoming phone calls only. \nSupporting this, another method involves using a Voice Recorder app while on a speakerphone, which may capture both sides of the communication. \nFor a more refined solution, the Ultimate Voice Recorder app can be employed, effectively recording both ends of a conversation. \nAdditionally, Tasker is an application capable of automatically recording phone calls to an SD card."},{"question":"what is the square icon on my iphone?","response":"The icon represents an active AirPlay session, which is Apple's technology to mirror screen content from one device to another."},{"question":"is zsh compatible with bash?","response":"Zsh's syntax is not completely compatible with bash, but it's close, so a lot of code will keep working, such as typical aliases and functions; the main differences are in interactive configuration features."},{"question":"how can i edit multiple files in vim?","response":"When using vim, you can open another file in a new tab without closing your current one by utilizing the command :tabe filename, open multiple files using vim -p file1.txt file2.txt or if vim is already open :tabe file2.txt. \nYou can switch between the opened files using commands like :tabn or :tabp for the next and previous files, respectively. \nIf you prefer using keyboard shortcuts, gT (previous tab) and gt (next tab) provide a quick way to navigate through the tabs when you're not in editing mode. ] \nAlternatively, for handling multiple files, split windows are also an effective method, and tools like tmux can enhance this experience by managing windows and allowing for quick program switching within the terminal."},{"question":"pptp vpn client for macos sierra or ios 10?","response":"The FlowVPN client is free and supports PPTP and OpenVPN on macOS Sierra and High Sierra."},{"question":"are ssl certificate port specific?","response":"Certificates used for SSL do not have a standard method for including a port number, and such details related to the port are not typically checked by clients. \nIn essence, certificates are not designed to be specific to particular ports, as the concept of identity they convey does not extend to port numbers."},{"question":"what are the names of the various versions of the android os, and how are these names chosen?","response":"Starting from Android 1.5, each version has been assigned a specific codename. \nThese codenames follow an alphabetical sequence and are traditionally dessert items or sweet foods. \nWhile some codenames represent multiple version numbers, others correspond to a single release, with no clear explanation for the variance. \nNotably, versions 1.0 and 1.1 were not given a codename for public use; however, it's understood that internally, Android 1.1 was known as \"Petit-Four\". \nThe versions and their dessert-based codenames, such as Cupcake, Donut, Eclair, Froyo, Gingerbread, Honeycomb, Ice cream sandwich, Jelly bean, Kitkat, Lollipop, Marshmallow, Nougat, Oreo, and onwards, illustrate this alphabetical dessert theme."},{"question":"does bcrypt have a maximum password length?","response":"Yes, BCrypt has an upper limit of 72 characters."},{"question":"what is a good analogy to explain to a layman why passwords should be hashed?","response":"Hashing can be understood as a method of writing text so that it cannot be read by others, which is crucial for protecting sensitive information like bank pins. \nThe necessity of using hashing for passwords is compared to avoiding a $5 million lawsuit; it is a financially sound defensive measure for companies. \nA password hash functions like an unbreakable code, providing security because it is one-way and cannot be reversed to reveal the original password. \nAn unhashed password is likened to a transparent lock that can be easily bypassed if observed correctly. \nHashing is described as a home guard, a last line of defense for password protection, given the severe consequences of not having this security in place. \nFinally, the analogy of password hashing without salting is equated to a shared bank vault that must be cracked, while salting each hash equates to having private bank vaults for added security."},{"question":"can you clone emv cards?","response":"Yes, they can be cloned, but not with only the information on the magnetic stripe."},{"question":"finding all large files in the root filesystem","response":"To list all the files bigger than 100M on your system, you can use the command `find \/ -xdev -type f -size +100M`. \nFor directory disk usage analysis, `ncdu` is a helpful command. \nIf you are not running on a Linux system, you might instead need to use the command with suffixes like `-size +204800` or `-size +104857600c`, as the 'M' suffix is not POSIX-standard. \nTo obtain more detailed information about these files, you can enhance the command by adding `ls -la`, which will require sudo privileges to execute."},{"question":"how do i delete photos from my iphone without deleting them from my icloud account?","response":"If you want to delete images from an iPhone or any device without deleting it from all your devices, you have to disable iCloud Photo Library and use another form of sync or another service, like Dropbox, Google Photos, or Amazon Cloud Drive. \n\nHowever, if you turn on Optimize [device] Storage, iCloud Photo Library will automatically manage the size of your library on your device and free up space by keeping low-res versions of your pictures."},{"question":"why can we still crack snapchat photos in 12 lines of ruby?","response":"Snapchat is not supposed to be impenetrably secure as it is for sharing, which is antithetical to securing; anyone can decrypt these because that was the intent. \n\nIt is a fundamental principle of information theory: if a machine can decrypt a piece of information and keep it for ten seconds, it can decrypt it and keep it forever. \n\nSome take a more critical view, saying this is a serious problem in password-management and bad practice combined with depreciated security standards: the code is not \u201ccracking\u201d the encryption, but merely decrypting the data with the correct encryption key, which was obtained by reverse engineering the application. \n\nSome suggest Snapchat is promoting a false sense of security, and when challenged, its reportedly dismissive response showed dysfunctional regard of security practices."},{"question":"why ospf is preferred over eigrp?","response":"One reason is actually because its more commonly deployed, leading most network administrators to be comfortable using it. \nFurthermore, OSPF beats EIGRP in terms of convergence speed, having more advanced options, supporting extensions like MPLS-TE and GMPLS, and scalability."},{"question":"what is difference between function and features?","response":"\"Function\" is the purpose, and \"Feature\" is a product behavior that a user can interact with."},{"question":"how to download songs from another itunes account?","response":"You cannot change 'ownership' of the files to another account, but you can turn on Home Sharing on both machines, then add this music to the new library, and use your account to authorize it; alternatively, you could possibly copy the files into the library, use iTunes Match to download the files from iTunes in the Cloud, then delete the local files."},{"question":"how to know who connect to my iphone hotspot?","response":"Unfortunately, no GUI exists in iOS for finding details about connected devices to the wireless hotspot (i.e., tethered devices), although you can use a network scanner app like Net Analyzer running on your iPhone, you can see who\u2019s connected. \n\nSome suggest that you can go to Settings, tap on the name of your Hot spot and you'll see the names of the devices connected you can then click on the names of the connected devices to remove them once you log into your iCloud account. \n\nIt has also been claimed that you can go to Settings\/Cellular\/go down to the CELLULAR DATA section and click Personal Hotspot that has a Data amount next to it, and you will see a list of each device and the amount of data they have used on the hotspot."},{"question":"how can i download an apk file from the play store?","response":"Downloading an APK file directly from the Play Store poses certain limitations, and traditional methods do not support direct downloads from market.android.com. \nHowever, one option involves using the Android emulator and the Android Market to indirectly download the APK onto the emulator. \nAnother workaround is to access the Market site on a computer, prompting it to install the app, which may result in a successful download. \nWhile there is no straightforward method, a Chrome extension, developed by redphoenix89, facilitates APK downloads, providing a practical solution. \nAdditionally, the Real APK Leecher program, written in Java, allows fetching APK files for free apps. \nOnline services like APK Downloader and its Chrome extension offer another avenue to download APKs from the Google Play Store. \nA tool like Raccoon, a desktop Google Play client, present yet another alternative for downloading APK files directly from the Play Store."},{"question":"is c++11 uniform initialization a replacement for the old style syntax?","response":"Uniform Initialization in C++ should not be universally applied as a replacement for traditional constructor syntax, as it does not clearly distinguish between two different intentions of object initialization. \nOne form of object initialization involves pouring values directly into an object, while the other involves guided construction of an object using provided arguments. \nThe misapplication of Uniform Initialization can lead to ambiguity in code, causing confusion for readers and potentially breaking code if a library is updated to include an initializer_list constructor."},{"question":"what are pros and cons for macports, fink and homebrew?","response":"MacPorts, unlike Homebrew, operates independently of MacOS libraries, making it less susceptible to future system updates. \nIt is also noted for its independence from Mac OS X, as MacPorts opts not to use many system libraries and software available in Mac OS X. \nAlso, MacPorts seems to actually be the \"faster \" option these days. \nFurther advantages include MacPorts' excellent support for legacy versions of macOS, with compatibility extending back to older systems like Tiger. \nHomebrew, in contrast, only supports the OS versions that are currently supported by Apple, typically the last three releases. \nHowever, Homebrew has gained significant popularity and is often preferred due to its use of the pre-installed MacOS libraries and the ease of installation it provides."},{"question":"how to define tab delimiter with cut in bash?","response":"Simply press Ctrl+V and then Tab to use \"verbatim\" quoted insert. \nTo extract the second field based on spacing in a file, use the cut command with -f2 -d' ' for normal spaces or -f2 -d$'\\t' for tab spaces. \nAlternatively, use awk with -F '\\t' and print $2 to extract the second tab-delimited field from each line in a file. \nYou may also use tr to change delimiters into an easily specified format for cut, for instance, by converting tabs to spaces and then using cut -d' ' -f2."},{"question":"how can i disable the red software update notification bubble on the system preferences app in macos mojave (not app store)?","response":"You have to replace the Systems Preferences icon on the dock with its Alias, effectively removing the System Preferences icon from the dock. \nThen, open System Preferences, navigate to Software Update, click \"Advanced\" at the bottom right, and uncheck \"Check for updates\". \nProceed to press Command + Q to quit System Preferences and apply the changes."},{"question":"how do i undo always show pictures from this sender on android gmail?","response":"In the Android Gmail app, to revoke image approvals granted to email senders, click the Menu > Settings > General Settings, and then click Menu again and open the sub-menu of options to access the 'Clear picture approvals' option, which will reset all approved senders. \nAlternatively, if you're using Gmail's desktop version, you can revoke image approvals on a per-sender basis. \nAnother way to do it on Gmail's web interface is by clicking the little down arrow next to the sender's name in an email and selecting 'Don't display from now on'. \nIt's also worth noting that as of 2020, a similar option to 'Clear Picture Approvals' can be found in the Android Gmail app under General Settings accessible through the Triple Dot Menu."},{"question":"why dont all companies buy developers the best hardware?","response":"The productivity difference between top-end and almost top-end machines is often negligible, while the price difference is considerably greater. \nThere is also no reason to overspend on such top-end machines unnecessarily. \nAdditional costs and productivity losses associated with constantly updating hardware, such as migration costs and loosing out on volume purchasing must be considered. \nAlso, the absence of dedicated IT staff may further complicate the process. \nSome companies may also be highly leveraged or cash poor, leading to financial decisions that prioritize other investments over hardware upgrades. \nMoreover, budget constraints can cause a discrepancy in the available funds for hardware as opposed to developers' salaries. \nFurthermore, there is often a misunderstanding among employers regarding the impact of hardware on developers' work. \nWhile work is completed, albeit at a slower rate, due to inadequate hardware, the expense is not always visible to those outside the technology department while those making the decisions might be completely unaware of any issues. \nIn some instances, managers do not recognize the need for high-quality tools for software developers, affecting productivity. \nOn the other hand, having to support special, high-end machines incurs its own costs. \nCosts associated with keeping hardware current are not limited to the purchase price but also include requisition, installation, support, and disposal. \nHigh-end machines are seen as overkill by some employers who have to juggle cash flow and other financial commitments. \nAlso, the best hardware doesn't necessarily produce the best developers. \nFurthermore, decision-makers are not always developers, which can affect the kind of hardware purchased, emphasizing policy over personal needs resulting from risk aversion among management and poor communication among other issues. \nNumerous conflicting factors influence business finance and resource allocation, and without understanding specific contributions to the bottom line, investment in better tools can be overlooked. \nAdditionally, improving PC hardware doesn't directly contribute to increased sales, so it might not be prioritized by finance departments. \nIt might also be the case that companies that don't provide sufficient hardware may consider their developers a liability rather than a resource. \nSome companies are not invested in hiring top talent and are content as long as the work is done, regardless of the equipment used. \nLastly, companies may hesitate to invest in better equipment if they are under financial stress or if they don't perceive a bottleneck in software development and in large organizations, hardware choices are often dictated by fixed, centrally managed specifications aimed at minimizing support costs."},{"question":"why cant i mitm a diffie-hellman key exchange?","response":"Diffie-Hellman is not generally resistant to Man in the Middle attacks."},{"question":"where can i find the unicode symbols for mac functional keys? (command, shift, etc.)","response":"CharacterPal is a widget that allows you to view symbol codes and copy them to your clipboard with a click. \nTextExpander is another useful tool that, for $45, lets you import a snippet group full of various symbols and shortcuts, including ones for keyboard commands and other sets like currency icons and miscellaneous symbols."},{"question":"applications dont show up in spotlight","response":"Removing the spotlight.plist in your user preferences may solve issues with re-indexing. \nLoading the metadata plist also works. \nHowever, in newer macOS versions, toggling the indexing feature off and on again often resolves re-indexing issues."},{"question":"how to download music from a different apple id?","response":"You cannot change 'ownership' of the files to another account, but you can turn on Home Sharing on both machines, then add this music to the new library, and use your account to authorize it; alternatively, you could possibly copy the files into the library, use iTunes Match to download the files from iTunes in the Cloud, then delete the local files."},{"question":"how do i install gcc via homebrew?","response":"You can simply run brew install gcc. \nAnother option is to install GCC 4.8 by using brew tap homebrew\/versions followed by brew install [flags] gcc48."},{"question":"how can i find a good open source project to join?","response":"An effective approach to contributing to open-source projects is by selecting a project that genuinely interests you and one that you find yourself using regularly. \nOpenHatch was specifically established to assist individuals in finding suitable open-source projects based on various criteria including type, technology, and skill level, helping you find a project that aligns with your abilities."},{"question":"how to connect two monitors to one thunderbolt?","response":"To connect multiple displays to a Thunderbolt MacBook using Thunderbolt, Apple's Thunderbolt Display is known to be compatible. \nThere's also the option of the Matrox DualHead2Go Digital ME, which enables the connection of two external DVI displays. \nAdditionally, Zotac offers an adapter that can split a regular or mini DisplayPort into two HDMI ports."},{"question":"how do i disable chromes two-finger back\/forward navigation?","response":"To disable two-finger page swiping system-wide, go to the Trackpad section of System Preferences. \nIn System Preferences you can change the Page change gesture from two to three fingers. \nOr uncheck Swipe between pages in mouse settings. \nGoogle Chrome uses Apple's default gestures, so by disabling Apple's gestures you disable Chrome's."},{"question":"how to conditionally do something if a command succeeded or failed","response":"Checking the variable $? can inform you about the success or failure of the last run command or function. \nFor conditional operations in bash, you can directly use the if statement to declare what happens after a command's execution, echoing an outcome based on the command's success or failure. \nFor simpler tasks following the execution of a command, you may use the \"&&\" and \"||\" constructs to execute further commands only if the initial command succeeds or fails, respectively. \nIn practice, a command followed by && and an echo \"OK\" or an echo \"NOK\" using || can succinctly report the outcome of the command."},{"question":"can a vlan have multiple subnets?","response":"You can, but generally having one subnet per VLAN is preferred because it simplifies documentation and troubleshooting. \nHowever, there are real-world scenarios where running two subnets on one VLAN can be advantageous, such as saving time and reducing the wiring costs in a multiple-office environment."},{"question":"why do business analysts and project managers get higher salaries than programmers?","response":"One reason is simply that they are higher up in the hierarchy, so their salaries should reflect this. \nThe basic principle of a workplace hierarchy is that management must be paid more than their subordinates. \nAnd in software organizations, Project Managers (PMs) and Business Analysts (BAs) are on top of the hierarchy, both being critical components of the software development. \nIn short, BAs and PMs are abstraction layer to development, while also being the single-point-of-contact between the customers and the company's technical staff. \nThat is to say dealing with people is more difficult than dealing with machines. \nWhile programming might more difficult, management also has its share of challenges and as a far as the workings of a company goes managers provide more perceived and actual monetary value than programmers. \nFurthermore, managers have to constantly make decisions and take more risks than programmers, and their jobs involve having more of the company's money at stake, so it's natural that good project managers often have higher compensation than programmers. \nAlso, PMs have to ensure projects get completed and if a project fails, the manager bears the responsibility, not the programmers, which may remain the case if its the programmer that screwed up. \nIt's also the managers who will face scrutiny from the powers that be when things don't go to plan. \nIn this sense the pay is proportionate to career risk and responsibility. \nManagers will also generally have more experience at the top, be more mature and garner more trust from business owners. \nManaging also requires a very multi-faceted skill-set: people skills, leadership, ability to estimate costs and time and juggle multiple projects. \nIn short, programming is much easier than managing people. \nAlso, the skill gained in years doing programming is not valued much in current company culture. \nThe principle of supply and demand also applies in the sense that there are too many developers out there in comparison to the number of skilled managers. \nFinally, programmers themselves don't put salary as the highest priority."},{"question":"fastboot doesnt see device","response":"To enter fastboot mode, you should first reboot the device into the bootloader by using the command `adb reboot bootloader`, and then look for the on-screen instructions to enable fastboot mode. \nIf you encounter a \"waiting for device\" error while trying to flash in fastboot mode, make sure you have the correct fastboot drivers installed; you may need to update the driver by choosing from a list of existing drivers in the device manager. \nIt is also recommended that if you are running Linux or OSX, you should run fastboot as root or use sudo. \nRemember that ADB and fastboot require different USB drivers, so your device can be detected under ADB but remain undetected in fastboot until the appropriate driver is installed. \nFor Windows users, it's important to note that adb and fastboot modes recognize the same Android device as separate devices. \nIf you face problems with detecting the device in fastboot mode, you may need to manually update the driver while the device is connected in fastboot mode."},{"question":"how do i clear bashs cache of paths to executables?","response":"The command `hash -r` is used to clear the cache entirely. \nAlternatively, to delete a specific entry from the cache, `hash -d' followed by the command's name is used. \nIt's important to note that the `-r` flag is designed to clear all entries without requiring any parameters. \nIf only updating the path for a single program is needed, use `hash svnsync `."},{"question":"how to change the name of my apple pencil?","response":"On iOS 12.1.1 and earlier versions, it's not possible to personalize the names of Apple Pencils."},{"question":"how can i update to a newer version of git using apt-get?","response":"Performing a search for \"git ppa\" provides Git stable releases. \nYou can also install the package by downloading directly from the web page, and installing with dpkg -i."},{"question":"ive inherited 200k lines of spaghetti code -- what now?","response":"When dealing with such a task, the initial focus should be on modularization. \nIdentify points in the codebase where you can establish somewhat independent segments, and consider generating a dependency graph to visualize the intricate interconnections. \nWhile some may advocate for immediate refactoring, understanding the system thoroughly and prioritizing your objectives is crucial. \nBe patient and systematic in the approach and ensure a version control system (SVN, Git, Mercurial, TFS, etc.) is in place before delving into any code modifications. \nOnce the version control system is implemented, focus on training your team. \nAdditionally, consider automating testing to streamline the development process. \nEngage domain experts in showcasing the advantages of revision control, emphasizing the ability to revert changes and track modifications. \nEncourage their involvement in creating end-to-end tests for continuous integration. \nLastly, before deciding what practices to teach, conduct a thorough analysis to identify and prioritize the most significant pain points."},{"question":"quoting within $(command substitution) in bash","response":"The correct syntax for assigning the output of the dirname command to a variable in a shell script, without issues arising from whitespaces or wildcard characters, is `DIRNAME=$(dirname \"$FILE\")`. \nThis approach works when one makes an assignment to a scalar (not array) variable."},{"question":"forking a repo on github but allowing new issues on the fork","response":"One opinion advises that it is possible to attach an issue to your own fork of a repository by navigating to the settings page of your fork, and enabling the issues feature. \nIn contrast, pushing a local Git repository to GitHub as a completely new repository is also an option, although this would sever connection with any issue tracking history."},{"question":"how to list keys added to ssh-agent with ssh-add?","response":"Use the `-l` option with `ssh-add`. \nThe'- L' option will suffice if you wish to see the full key in OpenSSH format."},{"question":"can anyone recommend an app for creating flowcharts and diagrams?","response":"Some recommended options are: OmniGraffle, iPlotz, Xmind, Google Docs, GraphViz, Shapes, NeoOffice's drawing tool, diagrams.net, Diagrammix, IHMC CmapTools, Inspiration, Gliffy, Dia, Lucid Chart for Google Apps, yEd, Delinieato, Apple's Keynote, Creately, Pencil, Lovely Charts, ProcessOn, Describio, ConceptDraw, and MyDraw."},{"question":"what is ge in unix?","response":"The comparison operator `ge` represents \"greater than or equal\" in the context of comparing integers."},{"question":"icloud has wrong email address?","response":"If you need to correct an incorrectly setup account, you must create a new one."},{"question":"how can i see dmesg output as it changes?","response":"The command `watch -n 0.1 \"dmesg | tail -n $((LINES-6))\"` can be utilized for closely monitoring system message changes and making them suit the terminal display. \nOn systems with systemd, the command `# journalctl -kf` can also be enlisted for a similar purpose. \nIn a separate approach, executing the commands `while true; do dmesg -c >> test.txt; sleep 1; done` and `tail -f test.txt` in different terminals achieves a similar result. \nShould you work with an embedded system like BusyBox, a straightforward Bash loop `$ while true; do dmesg -c; sleep 1; done` can be implemented as a solution to continually print dmesg output, though it lacks ideal functionality."},{"question":"keyboard shortcut for locking screen in macos sierra?","response":"Apple has removed this shortcut due to security concerns and Bluetooth issues, but users can opt for Hot Corners as an alternative solution instead. \nIf one wishes to put their computer to sleep, they can press the power button for about half a second; however, there's a risk of initiating a restart if the button is held down too long, and other methods may be necessary for keyboards lacking a power button. \nFor Sierra and preceding versions, using keychain settings or Hot Corners is recommended to lock the screen. \nAlternatively, lock the screen by using the CTRL+Shift+Power Button or CTRL+Shift+Eject-Key. \nIndividuals can create a custom keyboard shortcut to lock the screen using Automator to execute a shell script; the shortcut should function upon pressing, although the service may have to be accessed through the menu bar initially. \nHammerspoon offers another scriptable method to define key bindings for locking the screen or starting the screen saver. \nA user can put their Mac to sleep using the \"hs.caffeinate.lockScreen()\" command or the \"\u2318 command + option + \u233d\u23fb\" keyboard shortcut on macOS Sierra, but the screen saver approach is preferred. \nMacBook Pro users with the Touch Bar can allocate one of the virtual keys for locking the Mac, which is configurable through the System Preferences Keyboard section. \nLastly, macOS High Sierra (10.13) has introduced a built-in 'Lock Screen' feature in the Apple menu, which can be quickly accessed with a straightforward keyboard shortcut."},{"question":"where is bashs history stored?","response":"Bash maintains the list of commands internally in working memory (RAM), by default, while it's running and your session is active."},{"question":"how do i deal with a compromised server?","response":"When responding to a server hack, the first step should be to disconnect the affected systems from the internet. \nAdditionally, all passwords for accounts on computers within the same network as the compromised system should be changed. \nIt is critical to inform the person responsible for data protection immediately if the system holds any personal data. \nBefore network separation, it may be prudent to thoroughly investigate the intrusion to understand the scope and compromised areas accurately. \nTo handle the aftermath of an attack, it is also important to carefully investigate how the attack occurred. \nAfter resolving these initial concerns, you should conduct a thorough forensic analysis in a secured, isolated sandbox-type environment, ensuring to back up all relevant data. \nThe server should be disconnected from the network but not powered down to preserve evidence for forensic analysis. \nFollow any existing crisis management and disaster recovery\/business continuity planning (DR\/BCP) procedures."},{"question":"what percentage of devices have each of the android versions?","response":"To stay updated with the distribution statistics of Android versions, refer to the Official Android Developer's Dashboards. \nHowever, devices with versions earlier than Android 2.3.3 are not included in the data starting from September 2013 as they lack compatibility with the updated Google Play Store app."},{"question":"convince people not to share their password with trusted others","response":"State immediately that you don't want this information and ask them to type passwords in themselves (if they ask why, say you would rather avoid discussing it). \nOr just change the password after you're done helping them, and send them a password reset link. \nYou could try to educate them by changing it to a strong one. \nRemind them that they are responsible for everything that happens using their password, and that it's comparable to handing out copies of their house key. \nMaybe the mention of their financial security will be enough to dissuade them. \nExplain to them that giving you one password means it's easy to guess the others and that as an IT professional, you use a lot of tools and don't want clutter on your computer. \nConvince them to make the password literally be some embarrassing fact about themselves. \nOne thing you might consider trying is, \"If you trust me, then trust me when I say that you shouldn't give your password to ANYONE.\" \nThe best idea is to offer them an alternative like using Teamviewer; don't give them the opportunity to give your their passwords by doing tech support in person, never for free over the phone."},{"question":"exit vim more quickly","response":"Shiftzz (that is, ZZ, in uppercase) in normal or command mode saves the current file and exits or closes the current window\/tab (which is the same as :x but not :wq, which is one key more, and writes the file even if it hasn't been modified). \n\nTo exit unconditionally without changing anything, use: ZQ (same as :q!). \n\nAlternatively, just Q for 'Quit', if you haven't made any edits, which only requires one shifted keystroke (i.e. Shift and Q),or :q! which wipes out all edits and allows you to exit from vi.; and you could add to your .vimrc file: \" allow quit via single keypress (Q) map Q :qa, and if you have saved buffers, it will prompt you before exiting. \n\nCreate a custom mapping for frequently used tasks, for example, nnoremap :xa; if the is set to comma by let mapleader = \",\" then hitting comma twice will be a quick way of quitting vim. \n\nA simple and convenient solution for quit and save from vim - is: Ctrl + X shortcut (just add this code to .vimrc file: \"Fast quit and save from normal and insert mode :map :x :imap :x. \n\nYou could try nno : ; nno ; : vno : ; vno ; (if you use fFtT this will take some getting used to, but now quitting's just ;x to save if needed, ;q to not save. \n\nCtrl + s to save, ctrl + d to save and exit, ctrl + q to exit discarding changes."},{"question":"how to create a new window on the current directory in tmux?","response":"One user advises that with tmux versions v1.8 and possibly v1.7 too, use the following command: `tmux new-window -c \"$PWD`. \nAnother user offers that starting with tmux 1.9 the default-path option was removed, so it is necessary to use the -c option with new-window,and split-window . \nTo ensure this functionality is persistent, you can add specific bindings to your ~\/.tmux.conf file."},{"question":"can simply decompressing a jpeg image trigger an exploit?","response":"Yes, this is absolutely possible: feeding malicious input to a parser is one of the most common ways of creating an exploit (and, for a JPEG, \"decompression\" is \"parsing\", including the automatic rendering of inline images introduced by Twitter)."},{"question":"how hard is it to intercept sms (two-factor authentication)?","response":"In the GSM network, there exists the possibility for SMS interception by someone within the network operator, although carrying out such an act requires sophisticated resources and significant effort. \nGSM encryption provides a level of security through cryptography, but it can be challenged by various known attacks, especially the weaker encryption algorithms like A5\/2 which is highly breakable, while A5\/1 is stronger but still vulnerable."},{"question":"how to install and use gnu grep in macos","response":"Run the command \"brew install grep\" like you would with coreutils. \nAfter installation, to use the commands with their normal names rather than with a 'g' prefix, you should add a \"gnubin\" directory to your PATH in your bashrc. \nThis might include adding the line \"PATH=\"\/usr\/local\/opt\/grep\/libexec\/gnubin:$PATH\"\" to your bash configuration."},{"question":"what are some disadvantages of using the same key?","response":"Symmetric encryption utilizes the same key for both the encryption and decryption processes. \nHowever, a notable limitation of symmetric encryption is the requirement of securely sharing this key between the encrypting and decrypting parties. \nOn the other hand, asymmetric encryption does not encounter this problem as the public key can be openly distributed without compromising confidentiality. \nAs for performance, asymmetric encryption tends to be slower than symmetric encryption, which generally restricts its use to encrypting a symmetric key for subsequent message encryption. \nAdditionally, a shared key in encryption does not provide non-repudiation because if a message is decrypted, it does not confirm the identity of the encryptor, leaving room to argue that the decryptor could have encrypted the message themselves."},{"question":"is post or get more secure?","response":"POST is more secure than GET."},{"question":"how to take a screenshot with an android device?","response":"First of all, your phone must be rooted. \nIf you have an unrooted phone, Dolphin Browser HD with an addon can be used for screen captures. \nOnce rooted, using an app like Screenshot with either a timer or 'Shake' mode is effective. \nMeanwhile, rooted Androids below 4.0 can use an app like drocap2 for screenshots. \nThe ShootMe app works on the Galaxy Tab even if it's not rooted. \nUsing Android SDK connected to a computer, you can capture screens by selecting 'Device > Screen Capture' (or Ctrl+S). \nFor Galaxy S phones with Android 2.2, hold the back key and tap the home button for screenshots. \nAndroid 4.0 or higher devices allow screenshots using Power button + Volume Down button combination. For Android 10, briefly press Power button + Volume Down buttons for a screenshot. \nOn an HTC EVO3D allows screenshots by pressing the lock (power) button and home button simultaneously. Certain phones like the Droid Charge and new LG Android phones have built-in screenshot functions by holding specific buttons. \nSimilar built-in functionality exists for the Optimus Black using the lock+home button. \nStarting with Android 4, a screenshot can be taken without third-party apps by pressing Volume-Down + Power keys. \nThe Samsung Galaxy S II requires pressing the Power+Home buttons at the same time, though it may be tricky. \nThe Sony Ericsson Arc with the 2.3.4 upgrade offers a 'take screenshot' button in the power menu. \nOn rooted devices, Droid VNC server can be installed for easy screenshots. \nOn Linux, a one-line script can take screenshots on rooted handsets. \nThe Samsung Galaxy Pocket allows screenshots by pressing the Home button followed by the Power button. \nWith the Galaxy Note 2, an S Pen can be used to take and adjust screenshots. \nPress and hold the Home button until Google Now on Tap appears Tap the share button in the bottom left-hand corner. \nFinally, on Android 7.1.2, long press Home for OK Google and issue voice command 'Take Screenshot'."},{"question":"why is it wrong to *implement* myself a known, published, widely believed to be secure crypto algorithm?","response":"Side-channel attacks could be a significant threat when implementing cryptographic algorithms on your own. \nCrypto software might hide bugs that remain undetected even after extensive testing. \nSelf-implementing cryptography without a robust understanding typically leads to catastrophic weaknesses within the system. \nCrypto implementation can be viable given the necessary experience and resources but remains an exceedingly daunting task."},{"question":"how can i make ctrl+right\/left arrow stop changing desktops in lion?","response":"Updating an app called Karabiner can result in Mission Control shortcuts being disabled."},{"question":"are mozilla add ons safe?","response":"Historically, the FAQ in April 2017 and earlier offered a reasonably strong guarantee of safety, providing users with a level of confidence that the add-ons should generally be safe to install. \nHowever, instances of concern have been raised, particularly regarding add-ons in the Experimental category, where some have been discovered to contain malware. \nThis underscores the importance of exercising caution when installing add-ons, as there is a potential risk that they could harm your computer or compromise your privacy. \nDespite these cautions, the consensus remains that, under normal circumstances, Mozilla add-ons should generally be safe to install."},{"question":"which security measures make sense for a static web site?","response":"To ensure the security of data transmission for your website, you should consider utilizing HTTPS Strict Transport Security and Certificate Pinning to protect against data sniffing and manipulation. \nIt's also wise to implement a Content Security Policy, especially if your website incorporates external content like ads or social media buttons, to restrict unauthorized content. \nClickjacking protection is recommended to prevent your website content from being framed by unauthorized sites, though it does not harm if your site does not need such framing. \nIf you roll out HTTPS for your website, following up with HSTS is a logical step, as it enforces secure connections and prevents certain types of attacks. \nFor static websites, these security measures might be considered less urgent, but they are still important to consider for future-proofing and adapting to dynamic changes. \nThe belief that static websites do not require SSL certificates has changed, particularly with search engine rankings and browser treatments being influenced by the presence of HTTPS. \nFurthermore, utilizing HSTS adds a layer of security on top of HTTPS, helping both the websites and their users. \nHPKP is an effective method to combat malicious certificates, but it must be used correctly. \nThe consensus across discussions is that while static sites may seem to have fewer risks, security aspects like HTTPS, HSTS, and Content Security Policy (CSP) are still important for protecting against various threats and maintaining site integrity."},{"question":"what is the minimum distance for single mode fiber?","response":"Single-mode optical fibers typically operate at 1310 or 1550 nm wavelengths. \nThe minimum cable distance for all SFPs, including both multimode and single-mode fibers, is documented to be 6.5 feet (2 meters)."},{"question":"in a google account (sync), what is the difference between contacts and people details?","response":"\"People Details\" is a new sync service that is associated with the launch of Google Play Games, which aims to create a cohesive \"identity\" across all Google Play services, enhancing user experience across various Google Games. \n\"Contacts\" syncs with Google contacts, including details like email and phone number. \nMeanwhile, People Details syncs user information with Google Play and Google+, such as profile pictures and Play game profiles, and is specific to Google-related information."},{"question":"execute a command once per line of piped input?","response":"Xargs execute command and they are a good general tool for the job. \nFurthermore, GNU Parallel is also recommended for these kind of tasks: `cat stuff | grep pattern | parallel java`. \nAdditionally, another user offers a copypaste that can be used immediately: `cat list.txt | xargs -I{} command parameter {} parameter`."},{"question":"what scale or measure does mavericks and yosemites memory pressure adhere to?","response":"Memory pressure isn't a simple gauge of percentage of memory free and the sysctl value of vm.memory_pressure is calculated in relation to a computed target. \nThe absolute counters are viewed using the vm_stat command line tool to inspect detailed allocation of virtual memory. \nMemory pressure is a metric used by the kernel (xnu) with a dedicated thread called memory_status. \nOn Mavericks, pressure events and the memory pressure gauge can be viewed with tools like Process Explorer for OS X. \nMemory pressure is defined by two counters Mach keeps internally: vm_page_free_count and vm_page_free_target, which indicate the current and optimal free pages of RAM respectively. \nThese can be accessed via the sysctl command."},{"question":"how can i have `date` output the time from a different timezone?","response":"When setting a timezone for a command line query, use: `TZ=America\/New_York date`, remembering to include the whitespace between the TZ setting and the date command. \nThis adjustment to the TZ variable applies to Bourne-like and rc-like shells but in other shell environments such as csh, tcsh, or fish, the env command should be used as follows: `env TZ=America\/New_York date`. \nModifying the TZ environment variable is another way to adjust the local time for a specific timezone using `TZ=\":US\/Eastern\" date +%Y%m%d`, which will provide the local time for US\/Eastern, which automatically accounts for DST changes. \nTo obtain the current date and time in US\/Eastern timezone, you can utilize the command: `TODAY=$(TZ=\":US\/Eastern\" date) echo $TODAY`. \nIn instances where it's necessary to convert a timestamp from the local timezone to a different timezone, try: `TZ=America\/Curacao date -d 'Tue Nov 28 00:07:05 MSK 2016'`, where America\/Curacao signifies the remote timezone and MSK represents the local timezone."},{"question":"change canvas size in preview.app without scaling image?","response":"One approach is to cut and paste using the shortcuts \u2318-ALT-X and \u2318V after modifying the canvas size in the destination file. \nThis technique allows for transferring imagery without the image automatically snapping to the canvas edges."},{"question":"why do phishing e-mails use faked e-mail addresses instead of the real one?","response":"The goal of a phisher is typically to prompt recipients to send replies directly to a specified address to avoid email frameworks that screen for authenticity. \nPhishers want their spoofed emails to seem legitimate to unsuspecting users. \nThis aligns with the broader aim of spammers, which is to reach as broad an audience as possible, focusing specifically on the most naive or gullible individuals."},{"question":"how to choose on which display application switcher shows?","response":"To determine which display the Application Switcher shows on, experiment with moving your Dock to a different screen through System Preferences > Dock > Position on screen. \nAdditionally, you can use the cmd+tab shortcut, and the app switcher will relocate to the display where your mouse is positioned."},{"question":"coding standard for clarity: comment every line of code?","response":"It's generally not necessary to comment on every line of code. \nCommenting on every single line can result in redundancy and may obscure the code's real intentions instead of clarifying them. \nEffective comments should enhance readability and understanding, particularly in cases involving complex algorithms or decisions that might not be immediately apparent. \nIt's essential to exercise discretion when deciding which parts of the code to comment on and to focus on documenting the implementation for future developers' understanding. \nMoreover, not all code needs commentary; self-explanatory code is preferred, and if a line is complicated, it's typically a sign that refactoring might be necessary for clarity."},{"question":"use caffeinate to prevent sleep on lid close on battery","response":"A free menubar app called Fermata was created by Github user iccir, which keeps a MacBook awake even when the lid is closed and allows setting a timeout duration. \nThis app has been tested on macOS Catalina Version 10.15.6 and works on both battery mode and charger mode."},{"question":"how can i make safari show the url when i hover over a link?","response":"To enable the status bar feature in a browser, you can activate it from the View menu and selecting Show Status Bar, or simply use the \u2318\/ keyboard shortcut. \nAlternatively, you can obtain link information by clicking and dragging the link, which will display a small box including the title and a potentially shortened URL of the target page. \nThe Ultimate Status Bar was an extension that provided this functionality, but it is no longer maintained."},{"question":"what functionality do marks offer in the el capitan terminal?","response":"Marks in the Terminal, which began with OS X 10.11 - El Capitan, have functions related to, but distinct from, Bookmarks. \nThey are classified as lightweight or second-level bookmarks, which allow users to not only mark positions within the Terminal window but also to navigate back to these marked locations later on."},{"question":"how do i loop through only directories in bash?","response":"You can append a slash at the end of the search pattern. \nA one-line command in the shell can loop through all directories, including hidden ones, using `for name in *\/ .*\/ ; do printf '%s is a directory\\n' \"$name\"; done`. \nTo include hidden directories while excluding `.` and `..`, you can enable the shell options `dotglob` and `nullglob`. \nFor a complete path in each directory listing, use the command sequence `for i in $(find $PWD -maxdepth 1 -type d); do echo $i; done`. \nHowever, be cautious of scripts that do not properly handle the absence of directories, as certain loops may execute incorrectly."},{"question":"support for multiple users on same device","response":"An app known as Devide by Enterproid may help create separate and secure user profiles for work and personal use on a phone, but its compatibility with specific devices like the Xoom and its cost are uncertain as it's in an invite-only beta. \nAnother option is Titanium Backup, although it offers very limited support in managing multiple user data profiles. \nSwitchMe, an app for root users, allows management of two profiles with its free version, and more can be managed by purchasing the key, and it uniquely logs users in and out of different Android installations. \nThe update to Android version 4.1.2 introduced the capability for multiple user profiles, which can be managed using command-line instructions, though root access is required. \nDevices with Android 5.0 for phones and Android 4.2 for tablets have the multi-user feature, and Android 4.1 contains hidden multi-user functionality not available through the user interface."},{"question":"what is the eval command in bash?","response":"Eval is a feature of most interpreted languages and is used to evaluate code dynamically and is a shell command which is usually implemented as a built-in, meaning it is directly executable by the shell without needing to locate a separate utility. \nThe eval statement tells the shell to take eval\u2019s arguments as command and run them through the command-line."},{"question":"airpods: extremely poor mic quality on mac","response":"A temporary solution is to switch the mic from the AirPods mic to the internal microphone. \nApple is looking at this issue, and improvements might be forthcoming in future firmware updates. \nIt is currently recommended to use the Internal Microphone for Recording and the AirPods for playback during calls. \nThis is due to the AirPods switching to the SCO codec, which affects sound quality when the AirPod mic is activated. \nDownloading the \"Bluetooth Explorer\" tool from @Alex-Ruyven unofficial link and attempting to force the use of the APTx codec works only partially, as the SCO codec is still employed when the microphone is activated. \nA created menu bar app can be used to automatically select the built-in microphone as the default input, potentially improving sound quality and battery life. \nBy removing the AirPods as an input channel in the Audio MIDI setup, one can revert to high-quality stereo output. \nDeleting specific configuration files and then resetting the NVRAM is a step Apple support recommends to address the issue. \nIf using conferencing software like Zoom, changing the mic source within the application itself can sometimes resolve the problem."},{"question":"is there a way to look inside and modify an adb backup created file?","response":"Technically, you can extract specific data from an Android backup file, provided that you understand the requisite knowledge from the Android source code."},{"question":"how do i trim leading and trailing whitespace from each line of some output?","response":"The command `sed -e 's\/^[[:space:]]*\/\/' -e 's\/[[:space:]]*$\/\/'` is used to trim leading and trailing whitespace from each line of text. \nThe `sed` tool can substitute parts of lines that start or end with a space or tab with nothing and can either operate on piped text or edit files directly, though editing files directly can be risky without backups. \nSimilarly, `awk '{$1=$1;print}'` or the shorter version `awk '{$1=$1};1'` not only trim spaces but also condenses multiple spaces to a single one. \n`xargs` without arguments also serves to trim text. \nBash presents another approach for trimming spaces from strings using 'shopt -s extglob printf '%s\\n' \"${text##+([[:space:]])}\"' to remove leading whitespace from a string and 'shopt -s extglob printf '%s\\n' \"${text%%+([[:space:]])}\"' to remove trailing whitespace. \nFurthermore, short and continuous strings can be trimmed by passing them as parameters to a bash function. \nAn alternative method without using `sed` involves reversing the string, cutting the first field, and reversing it back. \nLastly, using Raku (formerly Perl_6), whitespace can be trimmed with simple one-liners or aliases within the bash environment."},{"question":"should i contact the manufacturer if their product allows access to other users location information?","response":"In your situation, it is advisable to inform the company of the vulnerability with caution. \nIt's essential because the problematic ID you discovered allows for tracking and potentially stalking by exploiting the static nature of these IDs, posing a significant privacy risk. \nSuggesting improvements such as implementing expiring or regenerable user IDs could benefit the company and its users, helping to prevent potential harm such as stalking or pranks. \nAnonymously reporting these issues may protect you from negative repercussions from the company while still ensuring they are aware of the security flaw."},{"question":"how can i verify the authenticity of an apk file i downloaded?","response":"To verify an APK's public key, you would attempt to validate the public key within the APK, which is usually located in the META-INF\/CERTS.RSA file. \nA new tool called apksigner, found in the build-tools section of the Android SDK, facilitates the verification process. \nAdditionally, VirusTotal.com provides a free service where APKs can be uploaded to check for virus signatures."},{"question":"what is the difference between delete from library and remove download?","response":"Remove downloads will leave the playlist in your library, but remove the music files associated with the songs, while Delete from Library will remove the playlist itself from your media library."},{"question":"prevent redraw of menu bar icons yosemite","response":"This is normal behavior caused by switching transparency on and off to show the active display. \nAn effective way to reduce this flicker is to adjust the settings in System Preferences by enabling the reduce transparency option. \nAdditionally, running the Bartender application can limit the number of active status bar icons, which improves the interface's responsiveness. \nIf the problem persists, systematically removing menu items may help identify and eliminate the software responsible for constantly redrawing or jittering menu bar icons. \nRestarting the Mac in Safe Boot mode by holding down shift after the restart sound plays, is also an effective potential solution."},{"question":"should you write your back-end as an api?","response":"There is not a clear-cut answer that one way is better than the other. \nIt depends on the type of application and the type of market you are in. \nHowever, if your project is meant to live for a while and is slightly complex, always have an API. \nAdditionally, If third parties are expected to use the system or if there is potential for reusability, constructing a well-defined API is beneficial. \nHaving an API not only makes your back end reusable but also allows for more security and better design. \nOn the contrary, if you don't have immediate plans to create alternative frontends, such as mobile or desktop apps, or a separate web application accessing the same backend, then introducing a web service layer might not be necessary."},{"question":"how to set path for finder-launched applications","response":"Adding particular configurations like export PATH=some_path:another_path launchctl setenv PATH $PATH to the .bash_profile has been successful for users who were unable to get their desired results with Eclipse on an older OS version. \nFor Mountain Lion users, modifying the Info.plist of the application has proven to be effective. \nHowever, on Mountain Lion itself, setting the $PATH via launchctl proved futile, and the only effective method was through \/etc\/launchd.conf, although it applied the path to all users on the laptop. \nOn Yosemite, use the command sudo launchctl config user path and reboot your machine to become effective. \nIn macOS Catalina, a user was able to successfully set a customized path across the system by running a script."},{"question":"command line: how do you rotate a pdf file 90 degrees?","response":"To rotate a PDF file clockwise, the command \"pdftk input.pdf cat 1-endeast output output.pdf\" can be used; for anti-clockwise rotation, \"pdftk input.pdf cat 1-endwest output output.pdf\" can be used. \nFor Debian and Ubuntu systems, an alternative is using pdfjam with the command \"pdfjam --landscape --angle 90 input.pdf\" for a clockwise rotation. \nTo automatically orient a PDF to be upright, the Ghostscript command \"gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dAutoRotatePages=\/All -sOutputFile=\"$outputFile\" \"$file\"\" is applicable."},{"question":"chroot jail - what is it and how do i use it?","response":"A chroot jail is a way to isolate a process that does not run as a root and its children from the rest of the system; you must create a directory tree where you copy or link in all the system files needed for a process to run."},{"question":"what are rainbow tables and how are they used?","response":"Rainbow Tables use a time-memory trade-off technique where you pre-hash all dictionary values instead of hashing each word on the fly. \nThey are useful for cracking strong passwords that cannot be easily found in a dictionary, and they work by creating a slow table and running multiple databases of hashes against it, which is faster."},{"question":"how to install dig on centos?","response":"To install the DIG tool on CentOS, you need to install the BIND Utilities. \nTo do this using the dnf package manager, type the following command: $ dnf install bind-utils. \nOn legacy systems, if dnf is not available, you can use yum instead with the command: $ yum install bind-utils."},{"question":"what happens when you mount over an existing folder with contents?","response":"When a hard drive is mounted over the existing \/tmp directory, the contents of \/tmp become hidden from view."},{"question":"what does it look like when you block someone on viber?","response":"When you block someone on Viber, that person will continue to see your profile information if you were saved in their contact list, but they will not be able to see any changes you make to your profile information afterwards. \nIf you were not in their contact list when you blocked them, they will not have access to your profile information at all. \nAdditionally, a blocked contact will not be able to see your status."},{"question":"what is \/usr\/local\/bin?","response":"\"\/usr\/local\/bin\" is intended for programs that a normal user may run; it's the most popular default location for executable files, particularly those that are open source."},{"question":"how can i test if a variable is empty or contains only spaces?","response":"If you need to determine whether a variable is empty, use the code: \"${name:?variable is empty}\". \nAlternatively, to check if a variable, which may include multiple lines, has only spaces, you could use: \"[[ $var = *[$\" \\t\\n\"]* ]]\". \nAdditionally, you can employ xargs: \"[[ -z $(echo $var | xargs) ]]\", or use sed: \"[[ -z $(sed \"\/^$\/d\" <<< $var) ]]\" for this purpose."},{"question":"whats the purpose of dh parameters?","response":"When static Diffie Hellman (DH) is used (as opposed to Ephemeral Diffie Hellman (EDH)), the DH parameters are set for the server and can actually be embedded in a certificate, so they are public. \n\nThe purpose of the DH parameters is to exchange a secret (a large prime integer belonging to a prime order group) that will be used to encrypt a transcript of messages within a session, where each party sets a private key that is combined with the secret to create a public key, enabling encrypted messages to be exchanged and then de-encrypted. \n\nThe DH parameters are set for the server and can actually be embedded in a certificate, so they are public; with Ephemeral DH, the session key (exchanged at the beginning of the session) is deleted upon session termination."},{"question":"how to search the play store by permissions?","response":"A simple answer to this query is that you don't need to take any action. \nHowever, an alternative approach involves creating a Java application using the android-market-api. \nAs of the current situation, it's not possible to search applications on Google Play based on their permissions because doing so would require access to a database which Google API does not grant. \nNonetheless, there's no official solution provided; an unofficial workaround is to use a privately maintained database that enables search by permissions. \nIf these options don't suit your needs, you can try using AppBrain's API for a simple solution."},{"question":"when is it not appropriate to use the dependency injection pattern?","response":"Making your project maintainable and testable may not always appear beneficial, especially if there's no immediate gain from these efforts. \nIn applications that are frequently started and run briefly, like a mobile app, using a dependency injection (DI) container might not be desirable. \nFor instance, when creating disposable code intended for short-term use, such as prototypes, the advantages of dependency injection (DI) might not be realized."},{"question":"how do i disable the minimize (command-m) shortcut in mavericks?","response":"To disable the Minimize (Command-M) shortcut in Mavericks, one approach is to install a key remapper, such as KeyRemap4MacBook. \nAlternatively, you can adjust settings directly without additional software by going to System Preferences > Keyboard > Shortcuts > App Shortcuts and assigning a less likely-to-be-used combination for the \"Minimize\" and \"Minimize All\" functions. \nIn macOS 10.12 (Sierra), setting the CMD-M mapping to a different action works right away: the method involves going to System Preferences > Keyboard > Shortcuts > App Shortcuts, checking off the Show Help Menu item, and assigning it a Command-M key combination. \nIf you're using Karabiner with High Sierra or higher, you can create a configuration file to customize shortcuts."},{"question":"difference between oauth, openid and openid connect in very simple term?","response":"OpenID is used specifically for authentication purposes, which involves verifying the identity of a user, while OAuth is designed for authorization, which is about permitting access to resources. \nMeanwhile, OpenID's focus remains on authenticating the individual's identity, whereas OAuth focuses on authorizing access to a person's data or resources. \nOpenID Connect encompasses both verifying identity and granting resource access, blending the functionalities of earlier versions of both protocols into one. \nOAuth is typically used to automate access to a single resource within a container."},{"question":"are man in the middle attacks extremely rare?","response":"Man-in-the-middle attacks are considered less common because they often lack the incentive or need to be performed. \nHowever, significant evidence is available to suggest that this type of attack is common, particularly since some banks have implemented security measures like two-factor authentication in response to these attacks. \nMan-in-the-middle (MitM) attacks are prevalent in the banking sector, and companies are targeted daily, sometimes multiple times. \nThe most common hacking actions include using stolen login credentials and man-in-the-middle attacks, indicating they are significant security concerns. \nMan-in-the-middle attacks are a very real threat even today, as considerably large-scale attacks, such as the one in Iran, have been documented."},{"question":"does constant charging harm my android cellphone?","response":"If your phone's charging circuits are sophisticated enough, it should be able to trickle charge without causing battery overcharge or poor conditioning. \nMost modern cell phones utilize lithium-ion batteries, which are designed to be charged frequently, and although some chargers may waste energy by getting warm, there's no harm to the battery if it's left charging for a few hours longer than necessary and the battery won't be overcharged. \nIt is also advised to avoid frequent full discharges, as lithium-ion batteries perform well under several partial discharges with frequent recharges. \nAll devices should automatically stop charging once full but may resume if the charge drops slightly, and batteries are usually good for about 1000 charge cycles before experiencing significant degradation. \nCharging circuits are engineered to be safely connected 24\/7, but to minimize battery degradation, the phone should spend minimal time at full charge."},{"question":"is there a way to convert audio files in mac os x or the command line without using itunes?","response":"For encoding audio on OS X to mpeg4 format, you can utilize the afconvert command-line interface."},{"question":"simple way to create a tunnel from one local port to another?","response":"Using \"ssh\" is a common method for port forwarding, which allows connecting a local port on your computer to a remote server's port and will stay open until it dies or it shut down. \nOpenBSD netcat arrives pre-installed on Linux and OS X, and another option for OS X bash is to use a bidirectional pipe. \nIn Ubuntu, the netcat-traditional package provides the traditional \"nc\" utility, which can be used for similar networking tasks, although it lacks encryption."},{"question":"on-the-fly monitoring http requests on a network interface?","response":"Wireshark is known to be a powerful tool capable of accomplishing the task at hand. \nAnother viable tool is nethogs, which has accessibility through core packages in Fedora and can be obtained via the EPEL repository for CentOS."},{"question":"where on the file system are sms messages stored?","response":"SMS\/MMS data is stored in databases on Android phones. \nThe specific location of these databases may differ between different phone models. \nGenerally, on most Android devices, the absolute path to the SMS and MMS databases is \/data\/data\/com.android.providers.telephony\/databases\/mmssms.db. \nHowever, this default path was different before Android KitKat 4.4, after which it moved to `\/data\/data\/com.android.providers.telephony\/databases\/mmssms.db` from `\/data\/data\/com.android.providers\/telephony\/databases\/mmssms.db`. \nWith the release of Android Nougat, the path appears to have changed again to data\/User_DE\/0\/com.android.providers.telephony\/databases on some devices like the Nexus 6."},{"question":"what does ` (backquote\/backtick) mean in commands?","response":"In the context of commands, the backquote\/backtick means that whatever inside the backticks is interpreted as the result of that command and runs the contents of the enclosed string. \nConsequently, everything you type between backticks is evaluated or executed by the shell before the main command."},{"question":"is it possible to see cp speed and percent copied?","response":"Standard versions of the 'cp' command lack the feature to show progress during file copying, although some say it will work if you use a tool called progress or a cp patch. \nProgress (formerly 'cv') identifies and reports on the progress of various core utilities commands. \nHowever, you have several alternatives to track the progress; for single files, 'pv' will work, and for multiple files or directories, you can combine 'tar' with 'pv' or use variations of 'tar' commands for systems like Solaris. \n'rsync' is also a versatile tool that can display the overall percentage of copying progress with flags such as --progress or --info=progress2. \nAdditionally, you can observe changes in the output folder using 'watch' with 'du' to monitor size over time, or you can write a script to estimate throughput. \nCommands like `sudo watch lsof -p`pgrep -x cp` can track the progress of already running 'cp' command processes. \nAlternatives like 'mc' (midnight commander) provide a file manager interface with progress visibility. \nThere is also 'cpv,' a wrapper for 'pv' to facilitate progress bars similar to 'cp', or another method to monitor reliability through '\/proc'. \nFor a text-based progress interface, 'vcp' can be used after it is installed."},{"question":"why should i offer http in addition to https?","response":"You don't have to, but offering a redirect to HTTPS from all HTTP URLs improves usability, noting that your HTTP server only needs to respond with the redirects. \n\nSupporting HTTP supports the default behavior of browsers and backward compatibility. \n\nYou'll sacrifice usability without a major impact on security if you completely shut off HTTP, but preloading your website is an alternative, which means you register your domain with the browser vendors so they will hard-code their browsers to visit your website via HTTPS only; if a user attempts to access your website over HTTP the browser will change the request to HTTPS."},{"question":"how can i display the current dns servers from the command line under os x?","response":"The 'grep nameserver <(scutil --dns)' command is a useful command to list current DNS entries. \nMoreover, to extract specific details for scripting purposes, you can employ a pipeline connecting to the 'awk '{print $3}' or 'grep -o \"[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\\\"' command."},{"question":"move folder content up one level","response":"To move files one level up, use `rsync -vua --delete-after foo\/`, or `cp -vaR foo\/. . && rmdir foo\/`, or (with dotglob option enabled)`shopt -s dotglob #` will include filenames beginning with a dot. \nBe sure to use both '*' and '.*' to include all files that begin with a dot, for example `mv subfolder\/* subfolder\/.* .`. \nIf you prefer to copy instead of move, the shorthand command `cp *\/* .` can be utilized to copy contents from subfolders to one level up, or to a new destination with `cp *\/* \/destination`."},{"question":"do imessages show up on text logs?","response":"If your text messages were from Apple device to Apple device (using iMessage for both sides), it's not going to show up on the provider logs. \n\nIf your text messages were from your iPhone (or other Apple device) to a non-apple device or an Apple device without a network connection but still connected to the cell network, that does go through your cell provider, and they will have a log of those messages."},{"question":"a tech from mackeeper wishes access to my computer for licensing and activation. is this a scam?","response":"Avoid allowing remote access to your computer for licensing or engaging software, as it's unnecessary and raises skepticism regarding intent or competence. \nMacKeeper is malware, and you are advised to uninstall it, use MalwareBytes for removal, and inform your credit card company of the scam if you've been charged for it. \nEmphatically, any unsolicited request for computer access is a scam, and no legitimate entity requires such access. \nIndividuals claiming to represent MacKeeper may be actually scammers with the goal of controlling your computer."},{"question":"colorizing your terminal and shell environment?","response":"One method to enhance script readability is to set a bold or colored prompt using shell customization techniques. \nScriptEchoColor is a project that can be used to colorize script outputs, which is available at SourceForge. \nAdditionally, for Mac users, setting the TERM environment variable to xterm-256color is recommended if the terminal supports it. \nExploring the ZSH and its plugin, oh-my-zsh, is also advisable for powerful console features like theming your terminal."},{"question":"difference between login shell and non-login shell?","response":"In a GUI, when you start a shell in a new terminal, it's recognized as an interactive non-login shell and hence will not source files like the .profile, but it will source your .bashrc. \nFor a shell to be considered a \"login shell,\" you would look at the first character of argument zero, which should be a '-' or should be started with the --login option. \nHowever, in the case of the VSCode integrated terminal on a remote Linux VM, it was found that the environment variables set in \/etc\/profile.d\/env_file.sh weren't picked up because the terminals were not initiated as login shells, indicated by the absence of the '-' in the output for `$0`. \nTo determine for sure if a shell is a login shell, it's necessary to check the output of both `echo $0` and `ps $(echo $$)`, looking for a '-' in front of 'bash' or for `\/bin\/bash -l` in the process status output."},{"question":"are off brand iphone chargers bad?","response":"They are generally safe to use, but cheap cables may break."},{"question":"what is the difference between sort -u and sort | uniq?","response":"The command sort | uniq existed before sort -u, and is compatible with a wide range of systems, although almost all modern systems do support -u, as sort -u will likely use fewer intermediate files to sort the data. \n\nThe uniq command has a number of useful additional options, such as skipping fields for comparison and counting the number of repetitions of a value, where sort's -u flag only implements the functionality of the unadorned uniq command. \n\nWith POSIX compliant sorts and uniqs (GNU uniq is currently not compliant in that regard), there's a difference in that sort uses the locale's collating algorithm to compare strings (typically using strcoll() to compare strings) while uniq checks for byte-value identity (typically using strcmp())\u00b9. \n\nUsing uniq is more predictable. \n\nThe command sort -u applies the unique flag only on the column that you sort with."},{"question":"are passwords saved in cookies?","response":"Usually the passwords aren't stored in cookies."},{"question":"hotkey to show hidden files and folders in file open dialog?","response":"\u2318 CMD+\u21e7 SHIFT+ reveals hidden files in Finder and Open\/Save dialogs. \nYou can also set \u2318 + H to enable show hidden files."},{"question":"delete first line of a file","response":"To remove the first line from a file, the simplest and shortest way is to use the command `$ sed -i -n -e '2,$p' file.txt`. \nAlternatively, another method is to employ `awk 'NR>1 {print}' file.txt > file1.txt`, which will output the result into a new file named `file1.txt`."},{"question":"what is id in top?","response":"In top, \"id\" refers to \"time spent in idle operations\"."},{"question":"single keypress types repeated characters (macbook pro 2016 & 2017)","response":"One recommended method is disabling the key repeat function through the Keyboard settings (Keyboard > Key Repeat > Off). \nAdditionally, applying more pressure on the keys can sometimes cause further unwanted keypresses, implying that the level of pressure applied is significant. \nIn cases where the problem is persistent with Apple products, the company offers a keyboard replacement or refunds for previous repairs. \nThere is also a utility named Unshaky written in Swift, which provides a solution by allowing custom configuration to suppress duplicate key presses, which is especially handy if a particular key like 'e' is problematic. \nAnother possible solution is enabling 'Slow keys' in the Accessibility settings, which can largely resolve the issue when slightly adjusted above the 'Short' threshold."},{"question":"why cant i just let customers connect directly to my database?","response":"The complexity of a database API and its potential for privilege escalation flaws present a significant security concern when considering direct access. \nIt's essential to manage the risk of sensitive or customer-specific data leaking into data warehouses used for giving customers indirect access. \nGranting direct SQL access brings risks such as performance degradation by unoptimized queries from users, validation issues leading to data integrity compromises, and difficulties in maintaining the database when significant changes or maintenance are required. \nHuman error in granting incorrect authorizations can have severe consequences, challenging customers to understand the database schema and form a dependency on the database's structure. \nExposing a DBMS to the public network is advised against because it has more potential for buffer overruns, presents a large attack surface for cyber attackers, and may lead to complex and performance-impeding security auditing processes. \nDBMS servers have more potential for exploits compared to web servers; thus, security experts discourage exposing DBMS to the public network. \nWhether direct database access should be provided depends on the nature of the customers, with a distinction being made between public and trusted business partners. \nThe lack of granular access control in database engines, which typically operate on a table-wide permission basis rather than per-record, is a key concern and one of the main reasons behind advocating for an API intermediary for security and additional business function purposes."},{"question":"why do we still use ethernet?","response":"We still use it as a means to transport IP because it is effective, simple, cheap, robust, and plentiful."},{"question":"how to find the port a device is connected to, based on ip, on a cisco catalyst switch","response":"The answer depends on whether the switch is a Layer 2 or a Layer 3 switch. \nOn a layer 3 switch, the port can be found by using a few simple commands on the device. \nHowever on a layer 2 switch, you have to log into both the switch and whatever device is doing the routing to locate the port. \nType Interface Internet 172.20.1.100 0 28cf.da1d.1b05 ARPA Vlan10, log in to the switch and the port should be listed (Dynamic 10 FastEthernet0\/1\/1). \nAnother method is to just telnet yourself into the switch, then unplug the device, then replug it. \nThe switch will write a message which port was down and then up."},{"question":"time machine backup how much space?","response":"Time Machine needs 2 to 4 times as much space as the data it is backing up; if you frequently add\/update lots of large files, then even 5 times may not be enough, and if you're a light user, you might be able to get 1.5 times to work."},{"question":"what is the difference between console and terminal mac?","response":"A console is generally understood as a physical terminal that is connected to a machine. \nFurthermore, while a system has got one console, it can potentially have multiple terminals. \nThe console can also be understood as the primary interface for managing a computer and the terminal is a session which can receive and send input and output for command-line programs. \nEssentially, the console is a special type of terminal, which is directly connected to the mainframe for the purpose of OS administration."},{"question":"my right click is not working in kali?","response":"Kali Linux has an option to turn on\/off \"Tap to click\" in \/Settings\/Mouse & Touchpad. \nThis option is unchecked by default, and all you need to do is check it."},{"question":"why is fhepfcelehfcepfffacacacacacacabn a top dns query from my devices?","response":"Google Chrome testing internet connectivity explains the unexpected behavior observed. \nThe domain in question translates to the string \"WORKGROUP\" and seems to be a NetBIOS name."},{"question":"xfce how to change resolution?","response":"The easiest way to change the resolution is to do so via the \"Display\" option, which can be accessed via Application Menu > Settings. \nAlternatively, you can do so in the terminal emulator using: xfce4-display-settings command. \nIt's also possible to change the resolution by manually modifying the file: .config\/xfce4\/xfconf\/xfce-perchannel-xml\/displays.xml."},{"question":"can you see how often someone checks your location?","response":"When using Find My Friends, individuals don't receive notifications or have access to logs showing how often they've been located by others; the location is shared only upon request and not at regular intervals. \nHowever, theoretically, a person can determine if they've been looked up via a Ping if they have the necessary tools and expertise."},{"question":"not all files are visible over mtp","response":"Using USB storage mode instead of MTP is a known workaround for a bug in Android that causes files to remain invisible when accessing a device using MTP, but this is not an option for all devices, such as the LG Optimus L5. \nClearing the data of the \u201cMedia Storage\u201d app and then using the SDrescan app to rebuild the media database is a suggested approach. \nThird-party apps like AirDroid can be used for sharing files over the network. \nDirectly going to the settings to clear the data for 'Media Storage' and then rebooting can often restore the visibility of files within Windows Explorer: settings > apps > all applications > media storage > tap 'clear data'. \nNavigating to Menu > System Settings > Storage > Unmounting and mounting the SD card from the system settings can trigger a rescan of media files on the card. \nMoving a movie file to another directory like \"Playlist\" using a file manager before connecting the device to a PC is another trick to consider. \nThe SD Scanner app can be effective without requiring root permissions and is compatible with Android 5.0.2, although it may be limited in functionality. \nDisconnecting the USB cable from the phone, clicking Clear Data or Force Stopping the Media Storage application, and then reconnecting the cable can also help to rescan and rebuild the media list. \nA simple yet effective method for some users has been renaming a missing folder via a File Explorer app on the phone, such as \"Music\" changed to \"Music 1\"."},{"question":"how to transfer calendar from windows phone to android?","response":"If you have a Google account, simply open Google calendar on your PC and import the CSV file. \nTo import the calendar, go to Settings --> Calendar settings. \nYou also have the option of syncing without the CSV file. \nTo do so, sync your Windows phone with Google, then when your Android mobile syncs, it will get the calendar entries. \nThis way you'll have two mobiles completely synced."},{"question":"uninstall apps locked by phone vendor","response":"To remove preinstalled apps from your phone, you must root your device, as they reside in a directory beyond regular user permissions. \nAfter rooting, using Titanium Backup is one of the simplest ways to uninstall system apps. \nHowever, ADB can also be used to remove applications if you prefer a method that doesn't involve marketplaces. \nYou can remove the app by using the command: `rm PackageName.apk pm uninstall class.name.of.package CyanogenMod`."},{"question":"how to insert text before the first line of a file?","response":"To insert text into a file on the previous line, one may use sed's insert (i) option, or use sed '1 i\\ your_text' your_file to insert text before the first line. \nFor updating text at the beginning of files with at least one line, a the sed command \"$ sed -i '1s\/^\/new_text\\ \/' file_name\" can be used, adjusting to accommodate different sed versions and shells. \nOther options also exist, such as using the POSIX standard tool \"ex\" or utilities like GNU awk, the latter allowing the addition of text even to empty files."},{"question":"what is the difference between directory and path?","response":"A directory is your current location, while a path indicates the steps or route taken to arrive at a particular file or directory."},{"question":"ios 12 is how many gb?","response":"The space taken for iOS 12 is 5.1 GB after restoring to factory defaults, or 7 GB on a relatively clean install."},{"question":"where to store a server side encryption key?","response":"Using an external Hardware Security Module is a method to enhance security operations by offloading them to a more secure device, which is a significant step for high-stakes situations. \nEncryption keys can also be bound to the admin login, providing control over encryption and decryption processes, but requiring the admin to be logged in for these actions. \nAnother method is to store the encryption key in memory, thus securing it against offline attacks. \nWhen using a password to tie a service account, a Powershell cmdlet can be utilized for less script modification, making the password dependent on a further compromise of Active Directory. \nTo meet certain compliance requirements, a key stored in plain text on an externally encrypted and access-restricted server may be deemed sufficient. \nEmploying key management solutions can help manage and protect master keys, with the recommendation that these solutions should support high availability corresponding to the infrastructure. \nSegmenting the key and storing each part on separate USB flash drives to be combined upon system startup is another proposed security mechanism."},{"question":"autohotkey equivalent for os x?","response":"One recommendation is to use Karabiner, which, although a bit challenging to customize (using XML), is powerful and comparable to AHK and can be used as a plugin too. \nAnother suggestion is Keyboard Maestro, allowing you to create macros with various actions triggered by keyboard shortcuts or other triggers. \nAdditionally, Hammerspoon is worth exploring for comprehensive OSX automation with a programmatic approach. \nIf you prefer a tool that emulates button presses and mouse clicks and provides various functions based on the open application, BetterTouchTools is a suitable choice."},{"question":"how to combine two images into one on a mac?","response":"You can use the command line tools that come in the Imagemagick package, installed with MacPorts or brew (brew install imagemagick). \nThen using Terminal, navigate to the directory containing the images, and create a combined version with a command such as: montage -geometry 100% left.jpg right.jpg merged.jpg. \nYou can also try Graphic Converter: open new picture 640 x 480; then in turn open each of the components, copy all, and paste into the new picture. \nPixelmator is another recommended option that will merge your images and do a thousand other things besides. \nSeashore app is an open source project much better at working with images than Preview.app. \nAlternatively, do it online for free at quickpicturetools. \nYou can also use TextEdit to copy paste (or drag) the 2 images in to TextEdit window side by Side. \nOr simply open both images side by side in Preview, take a screen capture with command-shift-4."},{"question":"how can i circumvent regional restrictions in googles play store?","response":"To bypass regional restrictions and access restricted content, you can use Market Enabler app to make it appear as if you're accessing the market from the United States. \nFurthermore, the Market Unlocker app is recommended due to its capability to unlock the market in just one click. \nAlternatively, you can use a VPN along with a Google Play store email that's set to the desired region to download apps; this method has been confirmed to work by creating an email specifically for this purpose."},{"question":"confirmed evidence of cyber-warfare using gps history data","response":"One example is Strava, which updated its global heat map and showed some areas in supposed desert areas full of activity, revealing locations and activities of soldiers at U.S. military bases; another is Polar, which dropped two pairs of coordinates over sensitive government locations and facilities, making it possible to find the names of personnel who track their fitness activities, dating as far back as 2014. \n\nIn another example, Ukrainian artillery units used FancyBear, a malware-infused app, to compute shooting solutions for their D-30 122mm towed howitzer, resulting in these units suffering suspiciously high losses; and a Russian soldier on duty posted pictures automatically tagged with GPS data that showed he was in Ukraine, at a time when Russia was denying having troops there."},{"question":"screen overlay detected dialog?","response":"In the context of issues with Android M, specifically for Nexus 5X, Twilight has been identified as the app causing problems related to overlay permissions. \nFor system apps and non-system apps, you can navigate to Settings, then Application Manager, and look for Apps with Overlay Permissions to manage these settings, which includes turning on Show System Apps for a complete view. \nAdditionally, for accessibility apps, you can go to Settings, then Accessibility, and at the bottom of the page, you can manage the apps listed by turning them off if necessary."},{"question":"how do i back up google authenticator?","response":"Creating a list of 'Backup codes' provides a convenient alternative for logging in without relying on authentication codes. \nTitanium Backup, available on the Google Play store, proves effective in backing up any Android app, including Google Authenticator. \nAuthenticator Plus, another app option, supports backup and restore functionality with synchronization across devices, ensuring a seamless transition. \nFor users with Android devices, utilizing a \"Root Explorer\" app from the Google Play store enables the backup of the Authenticator by connecting your device to a PC and backing up the folder to a secure USB or external HDD. \nOn a rooted phone you can use the \"amaze\" file manager as well: https:\/\/play.google.com\/store\/apps\/details?id=com.amaze.filemanager&hl=en. \nYou can also save or screenshot QR codes during the initial 2FA setup and rescan them in Google Authenticator for restoration (saving them in an encrypted location). \nAdditionally, manually setting up MFA tokens and storing them in an encrypted vault offers an alternative approach, ensuring the backup of configurations ahead of time\u2013just ignore the QR code based setup and use the token based setup itself. \nFor those seeking a more technical solution, a Python script is provided as a potential option for creating backups\u2013just paste your code and run them in Python environment (http:\/\/usefree.com.ua\/google-authenticator-backup\/). \nExploring the SQLite database on Android devices reveals that the original tokens are stored, providing insights for users facing similar challenges. \nHardware tokens and saving QR codes or secret keys during token enrollment are strongly recommended for long-term security. \nKeeping the Google Authenticator app updated and using the \"Transfer Accounts\" feature in settings after an app update is an additional step to consider for maintaining secure backups."},{"question":"how to run a program in a clean environment in bash?","response":"To execute a command in an isolated environment with cleared variables, you can utilize the command `env: env -i your_command`or `env -i somecommand`. \nAnother option is to access a minimal login-time environment by using the command \"ssh localhost somecommand\" for logging in. \nIt's also possible to initiate a bare but functional bash session by using `env -i bash -l -c \"printenv; and any other commands\"`, which resembles logging in a non-interactive mode. \nFor a \"clean\" bash environment, the command `$ env -i bash --noprofile --norc` can be used, and this prevents bash from reading initialization scripts that would usually set environment variables. \nOne user says that the problem with most answers here is that env -i clears HOME, so even if you run bash -l on the inside, it won't read your .bash_profile and that to simulate a fresh login shell, you can pass your HOME variable explicitly like `env -i HOME=\"$HOME\" bash -l -c 'your_command'`."},{"question":"is apfs required for mojave?","response":"No, APFS is not required, though, yes, it can work as an alternative to HFS."},{"question":"why does my phone charge so slow on usb?","response":"Phones charge slower when using a USB, due to the USB connection's specification. \nFirst of all, the USB port of a computer provides a lower voltage and amperage. \nA computer USB port is generally limited to 500 milliamperes, or 900 mA for a USB 3.0 port. \nA dedicated wall charger, on the other hand, is usually able to provide 1000 mA or more."},{"question":"what is the difference between .bash_profile and .bashrc?","response":".bash_profile is executed for login shells, while .bashrc is executed for interactive non-login shells."},{"question":"is mac os x unix?","response":"Yes, Mac OS X is Unix. \nAll releases of Mac OS X, except 10.7 Lion, have been certified as Unix by The Open Group. \nThe Unix certification for macOS is also detailed in Apple's Unix technology brief. \nFurthermore, Mac OS X has been confirmed to be fully POSIX compliant."},{"question":"how can i instruct yum to install a specific version of package x?","response":"Download the rpm file and then command yum to execute a local installation. \nTo obtain the needed packages, a resourceful website to visit is rpmfind.com, where you can search for the specific package name."},{"question":"how do i get detailed smart disk information on os x (mavericks or later)","response":"One option for obtaining SMART disk information on OS X is to install smartmontools then run it \"smartctl -a disk0s3\" for the full report to get a full report on the disk\u2019s status, with \"disk0s3\" being the identifier for the physical disk obtained from Disk Utility or the command line. \nAlternatively, smartmontools can also be installed using MacPorts with the command \"sudo port install smartmontools\". \nAnother option is GSmartControl, a GUI available that runs on top of smartmontools. \nYou can also download a native precompiled package from https:\/\/sourceforge.net\/projects\/smartmontools\/ for users with MacOS Sierra, Yosemite, or El Capitan, which can be run from the Terminal. \nFor macOS 10.15 (Catalina) or later, it\u2019s important to note that the behavior and output of smartctl 7.1 can vary depending on the SSD type."},{"question":"how to check if a shell is login\/interactive\/batch","response":"To determine if you are in an interactive shell, you can use the command `[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'`. \nUse the command: `shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'` to check if you are in a login shell."},{"question":"what would one need to do in order to hijack a satellite?","response":"With sufficient power from a satellite dish on the ground, an orbiting satellite's signal can be blocked, where you\u2019re basically jamming the uplink and\/or downlink (something like a DoS attack). \n\nAnother attack which can be performed is an orbital positioning attack, where you feed your target with false responses and satellite is \u201cconfused\u201d and \u201clost\u201d (it doesn't know its location). \n\nA more expensive option is to do as in Ian Fleming's Moonraker: go up there and steal the thing."},{"question":"does tail read the whole file?","response":"The command \"tail\" doesn't read the entire file from the start; instead, it seeks directly to the end and then reads in reverse to retrieve the specified number of lines. \nIt will correctly order the lines before displaying them up to the file's end."},{"question":"what is the difference between tcp and tcp6?","response":"The term \"tcp6\" refers to the TCP protocol being utilized over IPv6."},{"question":"is the message you must change your passcode within 60 minutes valid \/ non-malware?","response":"Your passcode is too obvious and needs to be changed. \nThis is typically the case if your device is enrolled under MDM and you receive a notification to update your passcode due to its simplicity. \nTo fix the issue with your passcode, go to the Settings app, select General, and then Profiles to delete any configuration profiles related to passcode control. \nIf you have any exchange mail accounts, disable them, as exchange servers can institute a passcode requirement. \nAdditionally, complex passcodes are generally more secure, and it's recommended to consider a more complicated passphrase. \nIt might be worth considering rolling back to a stock iOS for a while and choosing an entirely more complicated passphrase. \nFurthermore, if you're experiencing continuous prompts to change your PIN, trying a more complex 9-digit PIN might resolve the issue, as too simple of a PIN can trigger such alerts."},{"question":"is it good practice to always have an autoincrement integer primary key?","response":"Autoincremental keys are often lauded for their numerous advantages, particularly in boosting consistency on larger systems. \nHowever, it's crucial to recognize that an auto-incremented primary key may carry limitations, being essentially meaningless outside the context of the database and its immediate clients. \nSome further argue that using auto-increment fields in all tables is a bad idea, pointing out that not everybody likes or needs them, and their use depends on the table."},{"question":"when should i not kill -9 a process?","response":"It is generally recommended to use the regular kill command, often `kill -s TERM` or `kill -15`, before resorting to `kill -9`. \n`kill -9` should never be used on specific processes, such as mount, because it does not allow the process the opportunity to clean up resources, close socket connections, or tidy up temporary files, which can lead to system instability. \nInstead, it's better to try to terminate the process cleanly with other signals like `kill -15` (TERM), `kill -2` (INT), or `kill -1` (HUP) first, and only use `kill -9` as a last resort. \nHowever, there are cases where `kill -9` is necessary and appropriate, such as when a process is entirely unresponsive. \nFor processes, which cannot be killed directly, one should first attempt to use signals like `kill -15` on their parent processes. \nBefore using `kill -9`, ensure that the process isn't engaged in critical operations and that it has flushed its caches, especially for database processes."},{"question":"what is the difference between \/tmp and \/var\/tmp?","response":"According to a Wikipedia article on the FHS, \/tmp may be subject to cleaning on reboot, whereas \/var\/tmp is retained even after a system restart. \nMore security configurations, such as g+s and +t permissions, are commonly applied to \/tmp by default, unlike \/var\/tmp. \nFurthermore, \/var\/tmp is seldom mounted from RAM or swap. \n\/tmp is designed for fast access and typically has a short lifespan, which is why many systems clear it quickly, and it can be mounted as a RAM-disk. \nIn contrast, \/var\/tmp is usually stored on a physical disk, can be larger, and is intended to hold temporary files for an extended period. \nIt's also noteworthy that \/var\/tmp may not be available during the early boot process, since \/var and\/or \/var\/tmp might be mounted at that point. \nPOSIX standard 2.3 requires that the \/tmp directory must be available for applications to create temporary files but do not assume these files will be retained after the application closes. \nConversely, \/var\/tmp is for temporary storage that needs to persist through system reboots rather than \/tmp, and it is recommended that files here not be deleted upon booting."},{"question":"hosting company advised us to avoid php for security reasons. are they right?","response":"Using PHP for web development is not, in itself, a security threat. \nPHP is not more or less secure than Java, Rails, or other languages, as security issues arise when code is poorly written, implemented, or outdated rather than from the use of PHP as a scripting language. \nIt is a misconception to consider PHP inherently insecure; it can be exploited if there is a vulnerability not tied to the PHP code itself, but such risks are minimal. \nMoreover, it is important to maintain regular updates for PHP and the server to prevent potential security issues, so if an individual claims that PHP is not secure, they are most likely not putting in the effort to properly secure it. \nHowever, having PHP installed in the first place when you don't need it is not best security practice. \nThe presence of PHP on a system increases the attack surface, potentially leading to security challenges, but having PHP installed does not automatically lead to insecurity, especially when aware of its correct use. \nClaims that PHP inherently devalues the correctness in software and has a history of flawed security solutions are contested; rather, the use of any language can result in insecure code if it is not written and managed properly. \nThe main issue with PHP is its vulnerability to arbitrary code execution. \nIf a hosting company suggests that the use of PHP may compromise other systems such as cPanel, it may be wise to reconsider the relationship with that hosting provider."},{"question":"is there any reason to disable paste password on login?","response":"Disabling pasting into password fields is not supported for several reasons stated in different contexts. \nThe concept of the \"Cobra effect\" is introduced, where the solution of disabling pasting can worsen the problem by discouraging the use of strong, complex passwords that are often used in conjunction with password managers. \nFrom a product management perspective, it is acknowledged that while pasting passwords could be considered for disabling under certain security frameworks, it is generally not recommended for sites that rely solely on username and password authentication."},{"question":"does thunderbolt 2 provide power?","response":"Yes, it can carry power for devices if that Thunderbolt port is part of a device that is connected to an AC power outlet or is operating on battery power."},{"question":"when to use \/dev\/random vs \/dev\/urandom","response":"You can use \/dev\/urandom for most practical purposes. \n\nIt is appropriate to use \/dev\/random over \/dev\/urandom shortly after boot on a low entropy device, if enough entropy has not yet been generated to properly seed \/dev\/urandom."},{"question":"why does man print gimme gimme gimme at 00:30?","response":"This is an easter egg in man. \nWhen you run man without specifying the page or with -w, it prints \"gimme gimme gimme\" at 00:30. \nThis playful feature is a nod to the Abba song called \"Gimme Gimme Gimme a Man After Midnight\"."},{"question":"difference between us qwerty and international qwerty apple keyboards?","response":"Notable distinctions between the two keyboard layouts include the size and positioning of the Enter\/Return key, as well as some other layout differences. \nSpecifically, the ~ key and the \\ key are located in different positions on the two keyboards. \nMoreover, the US keyboard lacks a \u20ac label, even though this symbol can be inputted using a key combination. \nAdditionally, the International keyboard has one extra key compared to the US keyboard, which can be vital for entering certain characters that may cause issues for those using only the US keyboard."},{"question":"manually generate password for \/etc\/shadow","response":"Method 1: (md5, sha256, sha512) openssl passwd -6 -salt xyz yourpass (note: passing -1 will generate an MD5 password, -5 a SHA256 and -6 SHA512 (recommended)); Method 2: (md5, sha256, sha512) mkpasswd --method=SHA-512 --stdin (the option --method accepts md5, sha-256 and sha-512); Method 3: (des, md5, sha256, sha512). \n\nIn Ubuntu 12.04, you can use mkpasswd (from the whois package): Overfeatured front end to crypt(3) mkpasswd -m sha-512 -S saltsalt -s <<< YourPass. \n\nUsing Python3: python3 -c 'import crypt, getpass; print(crypt.crypt(getpass.getpass()))' getpass.getpass() will prompt you for a password on the command line."},{"question":"why use ssh and vpn in combination?","response":"Using SSH will encrypt the traffic carried in the VPN tunnel. \nTypical reasoning is that you want to reduce the exposure and possible attack vectors as far as possible."},{"question":"how to set to open folder with enter in finder?","response":"If you are using Mac OS X 10.4.x-10.7.x, the application \"PresButan\" can be employed to customize this functionality. \nAlternatively, for a more modern approach, \"KeyRemap4MacBook\" offers customization options for key mappings, including the ability to redefine the behavior of the \"Enter\" key in Finder. \nXtraFinder is another tool that provides extensive customization options for Finder, allowing you to set the \"Enter\" key to open files or folders based on your preferences. \nFor those using Karabiner, the setting \"use return as open\" can be enabled to achieve the desired effect; After checking this option, a relaunch of Finder is necessary for the changes to take effect. \nAn additional solution involves using BetterTouchTool to make the \"Enter\" key simulate a combination of \u2318 Command + \u2193 Down Arrow key press, effectively configuring it to open folders in Finder."},{"question":"what happens if you plug more than one charger in the new macbook pro (2016)?","response":"When multiple power sources are connected to a MacBook Pro, the system will automatically select the one that delivers the most power. \nUnfortunately, if a power source with more than 100W is connected, it could lead to a loss of charging ability that might still be covered by the device's warranty."},{"question":"is there any technical security reason not to buy the cheapest ssl certificate you can find?","response":"When considering the acquisition of SSL certificates, it's important to note that extended validation is unnecessary unless you require the green bar (EV SSL) feature. \nAcross multiple discussions, it's been pointed out that the deciding factor for domain validation certificates should be browser trustworthiness over any cryptographic advantages that one supplier may have over another. \nCost-effectiveness is emphasized as well, with recommendations to opt for the cheapest trusted option available. \nA basic SSL certificate satisfies the essential criterion of domain authority validation, and for most users, any additional features may not present a tangible benefit. \nThe security of a website in the eyes of its users is not significantly impacted by the choice of the Certificate Authority (CA) as long as the selected CA's practices do not incur distrust among browser vendors. \nFinally, opting for the least expensive technical solution that is still widely recognized by browsers is usually sufficient unless specific browser warnings, such as Comodo Dragon's treatment of DV certificates, are a concern for your user base. \nMore expensive SSL certificates may offer dynamic seals and a greater fraud warranty, though technically, a basic SSL certificate offers similar functional security as the most expensive ones on the market. \nLet's Encrypt is highlighted as a viable option that provides certificates at no cost and is technically on par with others, although it may pose challenges for sites not accessible via the Internet."},{"question":"how to find out what programming language a website is built in?","response":"There's no way to be 100% sure if you don't have access to the server, as your browser receives the end results of the code processing, so it's about guessing from file extensions, such as login.php, HTTP headers, and so on. \n\nHowever, an extension such as Wapplyzer, available for Chrome and Firefox, gives information about the programming language, server, analytics tool or about CMS & Frameworks on which website is built, and there are websites that will do this processing, such as Detect CMS and web framework. \n\nYou can also search evidence on the site itself Manually, such as footers saying, \u201cPowered by XXX\u201d, or search on the site to see if they it will attend any conference where they could talk about the website from a technical point of view."},{"question":"disk space not freed up after deleting files and emptying trash","response":"You can disable the local backups by running one of the following commands, depending on your version of OS X. \nFor older versions (pre-Leopard): sudo tmutil disablelocal. \nOtherwise: sudo tmutil disable. \nTo address issues with mobile backups taking up space, a weekly disablement and enablement of Time Machine through its preferences has been suggested. \nSometimes deleted content could remain in the .Trashes folder, which can be removed via the Terminal command: via sudo rm -rf someFolderName. \nThe inability to free file space might be due to applications that hold onto the file, and skipping the backup process can resolve this. \nSimply toggling Time Machine on and off has been found to fix related problems for some users. \nThe correct command for disabling local snapshots in High Sierra is: sudo tmutil disable localsnapshot. \nIf faced with incorrect disk space reports, restarting the Mac and running the Disk Utility app might immediately correct the numbers displayed in Finder. \nLocal snapshots, typically part of Time Machine automatic backups, may persist even when such backups are disabled, as observed on some systems. \nLaunching the System Information app, selecting Window > Storage Management, and observing storage can help with disk space calculations. \nA complex method of adding and deleting volumes on APFS-formatted drives can update free space calculations; however, this should be a last resort and is not recommended for less technical users. \nFinally, Purgeable storage or Optimized storage features in macOS can affect available free space as reported by the system."},{"question":"how to properly use drag and drop with macbook pro on os x 10.7?","response":"It is recommended to use your thumb to click on the lower part of the track and the index finger to move; then as long as you keep the trackpad pressed with the thumb, you can release the index finger. \nAn option for dragging is available by turning on the three fingers feature in trackpad preferences and one user believes that there used to be an option there called Click lock. \nMoreover, another user advises that by using the three-finger drag, you can tap with three fingers and drag them across the trackpad, which allows for a delay in the action for repositioning your fingers. \nAlternatively, you can enable a double tap feature for selecting and dragging without clicking in the accessibility settings. \nThe three finger drag is also available in the accessibility settings area."},{"question":"how do i kill all screens?","response":"To terminate screen sessions you can use \"screen -S $scr -X kill\"; for OSX, the \"pkill screen,\" \"killall screen\" or commands can be used. \nWhen dealing with dead screens, the command \"screen -wipe\" may be effective."},{"question":"is it normal for auditors to require all company passwords?","response":"The consensus of opinion is that this is neither normal nor professional. \nEngaging with a security company for penetration testing requires careful considerations that are not evident in the described situation. \nIt is not recommended to proceed with this company since such behavior casts doubt on their professionalism, as a legitimate pentesting process should never start without a comprehensive contract or NDA in place. \nPrior to any penetration test there should be a Scoping and Rules of Engagement document(s) that is signed by both parties. \nAdditionally, the request for sensitive information without the appropriate legal framework is abnormal and potential grounds for terminating any agreements. \nFurthermore, a responsible security company shouldn't need any more of the requested information to perform a pentest and should stop you from providing it. \nIf this is supposed to be a black box test, they should not get or require any passwords. \nIf you're not a CEO or CTO, it's crucial not to give the auditors any passwords."},{"question":"how to do integer & float calculations, in bash or other languages\/frameworks?","response":"Use the command `$ echo \"25 + 5\" | bc`, which yields the result `30`. \nAdditionally, one can leverage the bc program interactively by entering `$ bc` followed by the version number `1.06.95` to perform calculations. \nBash-based calculations can also be done with commands like `echo $((20+5))` or through the expr utility with `expr 20 + 5`. \nHowever, when dealing with cases that require floating point calculations, such as `9.0\/2.0`, which by default returns an integer in some scenarios, it is recommended to use a scripting language that manages floating points accurately, such as Lua. \nOther tools, such as `calc`, offer an interactive mode facilitating continuous mathematical operations within the same session, and `concalc` allows for calculator-like functionality on the terminal without a prompt. \nFor developers comfortable with Python, it can serve as an interactive calculator. \nWithin scripts or terminal commands, `$((...))` and piping expressions to bc, such as `echo \"...\" | bc`, are typically sufficient for integer and some arithmetic operations. \nFor evaluations in a ghci environment, `$> ghc -e '20 + 5' 25 it :: Integer`. \nFor unit conversions and calculations related to measurement and temperature, the `units` program\u2014along with its `-t` option\u2014can be particularly useful: `$ units \"1 + 1\" Definition: 2 $ units \"1 lb\" \"kg\" * 0.45359237 \/ 2.2046226`. \nWhen on the command line, the `awk` utility provides a simple but powerful mathematical computation capability that can be encapsulated within a shell function or script for convenience: `calc(){ awk \"BEGIN { print $*}\"; }` or`#!\/bin\/sh - awk \"BEGIN { print $* }\"` could also work. \nAccess to the GNU Multiple Precision Arithmetic Library is also achievable through the `run-expr` program. \nFor graphical and data plotting needs combined with calculation ability, `gnuplot` can offer function definition capabilities and built-in functions within its environment. \nLastly, setting up dedicated functions like `calc` in fish shell can streamline the process for shell configuration that involves frequent calculations: `function calc awk \"BEGIN{ print $argv }\" ; end`."},{"question":"why does uncle bob suggest that coding standards shouldnt be written down if you can avoid it?","response":"People tend to neglect reading documentation, and even if they do, following it consistently is uncommon. \nMoreover, the practice of updating documentation is often overlooked. \nRather than relying solely on written practices, it's significantly more productive to build a culture that inherently incorporates these standards. \nThis approach ensures that coding standards reflect the reality of what practitioners actually do rather than an idealized set of rules that are rarely adhered to."},{"question":"android calendar widget is not updating?","response":"To address issues with non-updating apps, ensure that you are not using applications like Greenify to hibernate your apps, as this prevents them from running in the background and updating. \nYou should clear both the cache and the data for widget apps in settings, and the launcher. \nAfter doing this, set up the widget apps again, and they should function properly. \nAdditionally, in case of persistent problems, try disabling any battery saving apps that might be interfering with the widgets. \nAgain, for these apps delete the cache, and app and launcher data. \nFor Huawei cam L21, specifically, go to Settings > Apps > App of widget > Battery and select the option to keep the app running after the screen is turned off."},{"question":"how can you tell if someone checks your location on iphone?","response":"On a device using GPS, there is no direct indication that it is being tracked, as the only sign is the location services arrow on the top bar. \nUsers can discern what's using the GPS by checking the settings under General -> Privacy, where a purple arrow indicates current use of Find My iPhone and a grey arrow shows it was used within the past day. \nAdditionally, installing the Find Friends app is suggested as a less invasive method to let someone know their location is being requested."},{"question":"enable and disable system apps via adb","response":"The command to disable an application on your device is pm disable, followed by the package's name, and you must have root access to perform this action."},{"question":"why do we use .\/ (dot slash) to execute a file in linux\/unix?","response":"In Linux and UNIX, the current directory is not included in your system's PATH by default. \nThis is why you need to specify \".\/\" when you want to run an executable that is in your current directory, as it tells the shell exactly where to find the executable you're attempting to run."},{"question":"is there any reason to use the var keyword in es6?","response":"In JavaScript development, using 'var' might be necessary when you need a temp variable to be available within the scope of a block inside of a function. \nHowever, 'var' may still find usage in edge cases such as machine-generated code, though such situations are quite rare. \nHowever, it's essential to note that 'let' generally functions as expected and is the preferred option in most cases."},{"question":"is there anything preventing the nsa from becoming a root ca?","response":"The U.S. government already has a root Certificate Authority (CA) that is trusted by default, meaning any SSL site's authenticity you check can be traced back to the U.S. government. \nBesides government Root CAs already in your trust stores, the NSA, being a spy agency, might have access to the private keys of various CAs, potentially even for false flag operations. \nThe NSA, utilizing legal tools like the USA PATRIOT Act, can compel major U.S. CAs to surrender their private root keys under the guise of \"national security,\" and do so secretly under penalty of law, effectively allowing the NSA to impersonate any of these CAs at will."},{"question":"generate file of a certain size?","response":"For creating a 24MB file, one can utilize the `dd` command with parameters `dd if=\/dev\/zero of=output.dat bs=24M count=1`. \nAnother method involves using `dd if=\/dev\/zero of=outputfile.out bs=1024k count=24` or `mkfile 24m outputfile.out` if you are on Solaris. \nAdditionally, the `truncate -s 24m example.file` command effectively generates a similar file under non-embedded Linux or Cygwin, or on any system with GNU coreutils. \nFor cases where file content is irrelevant, use dd`fallocate -l 24M filename` provides a much quicker alternative to `dd`."},{"question":"how can i find available network interfaces?","response":"To identify available network interfaces, the simplest method is to use ifconfig -a. \nAnother approach is to do cat \/proc\/net\/dev, a simple and easy-to-memorize command. \nIt's worth noting that for Solaris, the equivalent command is ifconfig, for Windows it is ipconfig, and for Linux, it is ip."},{"question":"what is the difference between default gateway and router?","response":"A router can be configured to function as a gateway, providing connectivity for a local network segment to other networks. \nThis is essentially the same device, seen from different perspectives. \nA router specifically facilitates IP packet routing between various networks, whereas a gateway, which is also a router, gives access to and from the local network for IP packets. \nIt is important to note that while all gateways must possess routing capabilities, not all routers are gateways, with the difference largely resting on their role in the network. \nGateways have a broader range of communication abilities because they can employ multiple protocols and can function at any layer within the OSI model."},{"question":"two html elements with same id attribute: how bad is it really?","response":"It is recommended to never duplicate IDs within the same document, as it is against the specification and can cause issues with JavaScript's getElementById function. \nIf the standard for validating HTML is strictly enforced, code with duplicate IDs would fail such checks, which is the expected behavior. \nUnique identifiers within a given scope are fundamental for programmers, and non-unique IDs break this important rule and fail validation checking. \nMany JavaScript libraries, such as jQuery, may not work as expected given non-unique IDs, which can lead to confusing code and unexpected behaviors."},{"question":"how can i remove an autocomplete suggestion from safaris address bar?","response":"In Safari, to remove specific websites from your history, you can use the keyboard shortcut \u2318 Y to show your history, then enter the web site name in the search field, select it, and press delete. \nAlternatively, deleting the website from your bookmarks may resolve autofill issues as it did for another user. \nLastly, another method is to type the website directly into the Safari URL bar, use the 'Search in History' option, select all, and delete."},{"question":"how to print an image across two pages","response":"One option to print an image across multiple pages is copy and paste the image into Pages or another application and then go to Page Setup to create a custom page size like 8\"x20\"; after doing this, you can scale the image to fit the new page size. \nAlternatively, you can open the image in Preview CMD+a to select all Grab selection handle, and drag until exactly in the middle of the picture, adjust the selection handle to the desired dimensions and print from there. \nYou can also print through Safari, which will automatically span the image over several pages. \nAnother method using Safari is opening the image and adjusting the Scale in the Print Settings to span the image across multiple pages before printing. \nSimilar methods can be used through exporting the image to a program like Excel, which has print scaling, or as a PDF to Adobe Reader, which offers a poster printing feature that allows for large-scale prints over multiple pages. \nThe Apple Numbers app is also capable of printing a PDF or image over many pages. \nFor those seeking specialized software, PosteRazor and other programs exist that can cut an image for printing across multiple pages; some of these programs only work with PDFs, but you can print to PDF then open it in another program, if necessary."},{"question":"can i open files in textedit from the terminal in mac os x?","response":"To open a file in TextEdit on a Mac, using the command `open -a TextEdit filename` works effectively. \nOther options for opening files include using -t for the default editor and -e to force open a file in TextEdit specifically."},{"question":"how do you detach the 2nd screen from within another screen?","response":"Use the command: ctrl-a a d. \n\nSo, if you have a screen s3 within another screen s2 within another screen s1, you can execute a command ctrl-a d in the screen: s1 by doing, ctrl-a d; s2 by doing, ctrl-a a d; s3 by doing, ctrl-a a a d ..."},{"question":"why was ~ chosen to represent the home directory?","response":"The practice of using tilde to denote the current user's home directory on Unix-like operating systems originates from the Lear-Siegler ADM-3A terminal, which was commonly used in the 1970s."},{"question":"ctrl + alt + delete: mac equivalent?","response":"The keyboard shortcut to bring up the Force Quit Applications window on a Mac is \u2318 + \u2325 + \u238b (Command + Option + Escape). \n\nUnfaithful answer with Insertions:\n\nWhen you need to force quit an application on a Mac, the required keyboard shortcut is \u2318 + \u2325 + \u238b, which can also be referred to as Command + Option + Escape. This will result in the Force Quit Applications window appearing, where you can select the unresponsive program. \n\nUnfaithful answer with Substitution:\n\nTo prompt the Force Quit Applications window and select programs to close on a Mac, use the shortcut \u2318 + \u2325 + \u238b, which is the same as Command + Option + Escape."},{"question":"how do i set a user environment variable? (permanently, not session)","response":"You have to put the declaration in the initialization files of your shell: for bash, you can use `.bash_profile (${HOME}\/.bash_profile)` or .`bash_login` instead. \nTo add environment variables in bash, modifying the .bashrc file is often recommended. \nYou'll need to know which shell a user logs in with (`path=\"$(grep $USER \/etc\/passwd | cut -d ':' -f 7)\" shell=\"$(basename -- \"$path\")\" `) and which dot files it reads (`man $shell`). \nNote that declaring a variable 'permanently' is specific to the session and the method varies depending on the shell. \nAnother method is to use: `echo 'export ABC + \"123\"'>> ~\/.profile`."},{"question":"recommended # of rounds for bcrypt","response":"You don't need to choose a number of rounds; instead, choose the amount of time password verification will take on your server, then calculate the number of rounds based upon that."},{"question":"what are the pros\/cons of deb vs. rpm?","response":"The openSUSE Build Service (OBS) and zypper are key factors that make RPM packages more appealing than deb for both packagers and users."},{"question":"why are shortcuts like x += y considered good practice?","response":"Firstly, they contribute to readability by being more straightforward and directly describing functionality, making it easier to grasp when navigating through extensive code. \nThey provide a consistent way of expressing a particular programming construct. \nIn addition, these shortcuts are concise, involving fewer operators and less surface area, leading to a reduced chance of confusion. \nMoreover, they are very useful when using a variable as an accumulator, enhancing readability, and don't have to evaluate its left operand twice. \nWhen dealing with long names, the shortcuts make the code more compact. \nThey are considered a nice idiom, offering speed and quick adaptability. \nFurthermore, the shortcuts prevent a whole class of errors, and their brevity facilitates code review, ensuring clarity about functionality. \nAdditionally, using such shortcuts makes the code easier to understand, eliminating the need for meticulous verification of long expressions and assisting the compiler in producing more efficient code."},{"question":"how can i move files and view the progress (e.g. with a progress bar)?","response":"In order to build a patched cp and mv, you can create versions that support the -g switch to show progress available online 9`$ sudo cp src\/cp \/usr\/bin\/cp $ sudo cp src\/mv \/usr\/bin\/mv `), but one user prefers `$ sudo cp src\/cp \/usr\/local\/bin\/cpg $ sudo cp src\/mv \/usr\/local\/bin\/mvg` because it doesn't overwrite coreutils or break scripts in case of a problem. \nRsync is another tool that can copy files with a progress bar when using the -P switch, so if you have rsync installed and you could use a simple alias in your shell's dotfile: `alias cp='rsync -aP'` or `rsync -aP --remove-source-files $src $dst && rm -r $src` and you can use a shell script to create a progress bar during file copying. \nThe latest version of rsync has an alternate flag `--info=progress2` that shows progress for the entire operation. \nThe pipe viewer command pv allows you to show a progress bar when copying files, as does Midnight Commander (mc). \nA tool named progress can find descriptors related to running commands to show progress and speed (`progress -w` outputs the stats for all running cp,mv etc. operations). \nGcp (Goffi's CoPier) offers an alternative method to add a progress bar without patching core utilities. \nOn Mint, you can use gcp (gcp SOURCE DESTINATION) or curl to transfer files with progress information. \nBy sending a SIGINFO to mv using CTRL-T, you will send a SIGINFO to mv, and can then get a report on the progress of the transfer. \nPv is another tool you can use to print progress based on line count or file count (You will need pipe viewer: http:\/\/www.ivarch.com\/programs\/pv.shtml mv -v sourcedir targetdir | pv -l -s filecount > logfile ) and combined with mv -v, it can give progress updates, use `find sourcedir | wc -l` to get file count. \nSimply checking the size of the directory (`du -hs \/directory\/you're\/moving\/data\/to`) can provide a way to monitor progress. \nFinally, bash script `#!\/usr\/bin\/env bash rsync -aP --remove-source-files \"$@\" && rm -rf \"${@:1:$#-1}\"` handles more then one source and filenames with whitespaces: `$ rsmv source1 source2 source\\ 3 \"source 4\" dest`."},{"question":"xkcd #936: short complex password, or long dictionary passphrase?","response":"In practice, long passwords tend to decrease security due to the challenges they present to users. \nA long password composed of random words provides robust security, provided that the words are chosen entirely at random. \nGenerally, favoring length over complexity is recommended, but it is crucial also to consider the total entropy desired when creating passwords. \nSome users say that in the length vs complexity debate, it is a wash because each would offer a similar level of protection. \nHowever, entropy significantly decreases when users attempt to create memorable or logical sentences from random word combinations. \nSome say that the number of words in a passphrase is more crucial than its length; dictionary attacks can be highly effective if the words are common and short. \nIn looking at several examples, one user believes that additional complexity should be enforced for shorter passwords, but longer passwords can be all lowercase if they exceed a certain character count, such as 20. \nThe difficulty of remembering a password is just as significant as its guessability, highlighting the importance of balancing security with usability. \nFour-word passwords are advantageous because users are more likely to remember them without resorting to insecure practices like writing them down. \nDiceware-type passwords are ideal for accounts accessed occasionally, but shorter passwords generated from random strings can be equally memorable for daily use. \nInstead of forcing complex character combinations, password validation should check against dictionary and brute force attacks to ensure strength. \nThe Openwall Linux pwqgen tool generates secure passwords using entropy, avoiding spaces and instead utilizing punctuation and digits for word separation. \nLong, complicated words do not necessarily add significant entropy unless used in abundance. \nThe practicality of typing long passphrases is a concern due to passwords not being visibly echoed on screens. \nLastly, despite the mathematical advantage of the Horse method, passphrases may not be as beneficial as initially thought, as empirical studies show similar usability issues between system-assigned passphrases and random passwords."},{"question":"where should a local executable be placed?","response":"For non-system binaries that need to be available to multiple users, an administrator should place them in \/usr\/local\/bin. \nThis allows the binary to be accessible system-wide. \nIf you're the only user, then $HOME\/bin is suitable."},{"question":"how do i disable system integrity protection (sip) aka rootless on macos [os x]","response":"To disable SIP on a Mac, you should use the command 'csrutil disable' in the Terminal window while in Recovery Mode, then restart your Mac. \nIf accessing the Recovery Partition is not an option, you could attempt to disable SIP with the 'nvram' command, using 'sudo nvram boot-args=\"rootless=0\"'."},{"question":"how can i figure out whats slowly eating my hd space?","response":"To visualize what is consuming disk space on your system, it is recommended to utilize apps like GrandPerspective or Disk Inventory X. \nAlternatively, Disk Cartography can be employed to reveal hidden system files and sort files by size, such as only showing those larger than 1 GB."},{"question":"is it bad that my macbook air is passing me electricity?","response":"Electric shock from your Mac is not normal and could be incredibly dangerous. \nThis issue should be taken as the default concern for any consumer electronics causing similar sensations. \nIf you encounter such an issue with your device, it might indicate a minor fault. \nUsing a grounded power outlet is advisable to prevent electric currents from passing through the body. \nThough some users have reported feeling vibrations without adverse effects on themselves or the computer, it's generally more responsible to address any such electrical issues."},{"question":"what is the modern way to do port-forwarding on el capitan? (forward port 80 to 8080)","response":"In El Capitan, the contemporary method for port forwarding is accomplished using pf."},{"question":"whats a good xml viewer\/editor for mac os x?","response":"With Apple Developer Tools, you have access to Xcode, which includes the \"Property List Editor\" application for editing plist files. \nVarious software options for editing XML on OS X include commercial offerings such as EditX, oXygen, XML Edita, and XMPlify, as well as shareware like TextMate and free tools like the plugin XMLMate. \nXmplify, although in beta, is useful for handling DTD, XSD, XPath, and XSL transformations. \nEclipse is a highly regarded XML editor on Mac OS, featuring XSD validation and a graphical XSD designer. \nText Wrangler is a free tool that caters to XML editing needs with an XML Tidy script. \nFor TextMate users, they can compile the source from GitHub and enhance functionality with language bundles. \nIntelliJ IDEA, while more generally known as an IDE, also supports robust XML editing. \nEmacs users can edit XML with modes like psgml-mode or nxml-mode. \nQXmlEdit and BlueFish offer feature-rich and open-source solutions for XML editing, while Brackets presents itself as a simple and highly recommended alternative. \nFor viewing XML, applications like XML Spy provide a straightforward, free service, although lacking editing features."},{"question":"disable command-w in the terminal","response":"One approach is to set a prompt before closing in the preferences: Terminal Preferences \u2192 Settings \u2192 Shell. \nAlternatively, in iTerm, you can go to Preferences > Keys, click the \"+\" in \"Global Shortcut Keys,\" type Cmd-W, and select \"Ignore\" as the default action. \nAnother solution involves changing the shortcut for the \"Close\" command. \nFor iTerm2, navigate to iTerm2 \u2192 Preferences \u2192 Keys, and add a key mapping with \"command + w\" set to \"ignore\". \nIf you prefer a system-wide solution, you can go to System Preferences, select Keyboard, then Keyboard Shortcuts, and finally Application Shortcuts. \nAdd a new shortcut for \"Terminal.app\" with the command \"Close Window\" and assign a different shortcut like \u2318ControlW."},{"question":"whats the most appropriate directory where to place files shared between users?","response":"The appropriate directory for placing files to be shared between users is recommended to be \/srv, as simplicity is a key goal of FHS. \nIn instances involving Network-Attached Storage (NAS), using \/export\/srv is suggested."},{"question":"can i manually limit the %cpu used by a process?","response":"CPUThrottle is a utility that permits the specification of a PID to restrict its CPU usage. \nIt serves as a tool to limit CPU usage for certain processes, and you can run scripts to monitor and throttle multiple processes. \nThe script \"#!\/bin\/bash ### # setup cputhrottle\" demonstrates how to keep CPUThrottle running only for new processes if old ones do not exist, ensuring that the command is streamlined and avoids redundancy. \nAlthough slightly unstable, similar tools like AppPolice can also be employed on systems such as Catalina to manage CPU resources. \nAdditionally, CPUSetter is a superior option due to its advanced features controlling hyperthreading, the number of cores, and individual power settings."},{"question":"do macbooks have a true hibernate option?","response":"Yes, MacBooks do have a true Hibernate option, and Apple refers to it as Safe Sleep. \nAdditionally, there is a free app called Hibernate by Patrick Stein that users have employed to enable hibernation on their Macs. \nThis feature is available on newer machines, with its debut in the 2011 MacBook Air, and is known as PowerNap."},{"question":"how and when do i use hmac?","response":"HMACs are utilized to confirm both the integrity and authenticity of a message. \nThis cryptographic technique ensures that the data has not been tampered with or replaced. \nSpecifically, HMACs offer a method to digitally sign data using symmetric keys instead of relying on public key infrastructure (PKI) systems. \nThis allows for the verification (authentication) without the need for public and private key pairs, but it does require careful management of the shared secret keys."},{"question":"how to transfer edited photos from iphone to computer?","response":"AirDrop or email the photo to yourself, or, if you've enabled iCloud Photo Library, download it from the Photos web app at iCloud.com."},{"question":"cmd-tab behavior on mavericks with multiple displays","response":"A method to improve user experience for those who prefer the dock on the side of their screen is to position the dock at the furthest side from the MacBook, which can be done by right clicking on the dock and choosing \"Position on Screen\" then selecting the appropriate side. \nAnother useful tip is that if the Alt+Tab interface is not appearing on the primary monitor, toggling the \"Displays have separate Spaces\" option within Mission Control System Preferences may solve the issue, and this action doesn't require logging out."},{"question":"can you still facetime if your number is blocked?","response":"No, blocking a number will block it for normal calls, FaceTime and FaceTime audio."},{"question":"why vlan range is 4096?","response":"For VLANs within the 802.1q standard, only 12 bits are allocated for VLANs. \nFrom the VLAN tagging perspective, the VLAN Identifier (VID) uses these 12 bits, which corresponds to the 2^12 possible combinations leading to the maximum of 4,096."},{"question":"why dp is not visible in whatsapp?","response":"If it's just one contact then it's possible they simply removed their profile picture. \nIf it's happening to multiple contacts, then the image cache of the app may be corrupted. \nIt could also be the result of a recently applied backend app, which effects contacts in your phone that don't have your number saved as a contact. \nIt's also possible that the individuals in question have changed their privacy settings, thereby restricting their information to either 'Nobody' or only to people saved in their contacts as 'My Contacts' and you are not saved as a contact."},{"question":"just how secure is a pattern lock?","response":"The security provided by pattern locks on touchscreen phones is questionable as it can be easily compromised. \nIn certain circumstances, the security offered by the Android Pattern lock is not robust. \nOn certain rooted devices, exploits involving adb commands can threaten the security of the phone, although not all adb commands necessitate root access. \nPre-setting \"USB debugging\" also plays a role in potential vulnerabilities. \nIt should be noted that enabling \"USB debugging\" heightens vulnerability, although even with it disabled, a seasoned hacker might discern other methods to access the device's data. \nOverall, the Android Pattern lock's inherent glitches and flaws render it a relatively weaker security option that doesn't encrypt the device's contents. \nFurthermore, it's been demonstrated that an individual doesn\u2019t require extensive technical knowledge to exploit the weaknesses in touch screen lock mechanisms."},{"question":"how do you extract an apps data from a full backup made through adb backup?","response":"To extract .ab files, several methods are available, where one option is an open-source project under the Apache 2.0 license, which allows conversion of .ab files into tar files. \nAnother method involves the Perl AdbBackupRoutines from an XDA thread, which requires certain Perl libraries and is feasible if the backup is unencrypted. \nAlternatively, a combination of bash, cat, and gunzip (gzip) can be used to handle the extraction process, starting with an unencrypted backup. \nIf employing bash is not preferred, a single command line can combine several operations to unpack the backup, i.e., ( printf \"\\x1f\\x8b\\x08\\x00\\x00\\x00\\x00\\x00\"; tail -c +25 backup.ab ) | tar xfvz -. \nFor Windows users, PowerShell scripts with header manipulation are another means to work with .ab files, but manual extraction with tools like 7zip may be needed due to potential issues with the tar executable in Windows."},{"question":"why would you not permit q or z in passwords?","response":"There is no security reason for the exclusion of the letters Q and Z from passwords; it's mainly due to legacy phone systems like rotary and touch-tone phones, that lacked these letters on their keypads. \nThe reason could also be administrative convenience in systems where multiple keyboard layouts are used, as certain letters are positioned differently on AZERTY and QWERTY keyboards. \nAdditionally, the infrequent occurrence of Q and Z in English might make them indicative of a randomly generated password in the eyes of an observer."},{"question":"what is the difference between two factor and two step verification?","response":"Simply put, every two-factor authentication is a two-step authentication, but not the other way around. \nHowever, from an information-theory point of view, there isn't any difference between them. \nIt is argued by some that two-step is just a layperson-friendly name for two-factor authentication. \nHowever, in more technical terms, the difference is addition versus multiplication. \nTwo-step is an additive process in which you authenticate once with one independent credential, and then again with another independent credential. \nTwo-factor is multiplicative, in that you combining one independent credential with another to derive a stronger single credential than each independent one."},{"question":"whats the difference between \/sbin\/nologin and \/bin\/false","response":"The primary role of '\/bin\/false' is to terminate with a non-zero exit code, which is utilized in scenarios where a login attempt should be immediately rejected. \nConversely, '\/sbin\/nologin' is recognized as a legitimate shell particularly in contrast with '\/bin\/false', and its purpose extends to instances where a command passed to a program should result in an error and immediate exit. \nAdditionally, while both '\/bin\/false' and '\/usr\/sbin\/nologin' can be used to inhibit user logins, the latter is specifically designed for this purpose and notifies the user they cannot log in. \nFurthermore, '\/bin\/false' is part of the GNU Coreutils, and '\/sbin\/nologin' is provided by the util-linux project, highlighting the different origins and roles they play within Linux systems."},{"question":"can a computer virus be stored somewhere else than on the hard drive?","response":"The short and unambiguous answer to the question regarding the presence of viruses beyond traditional computer hard drives is \"yes\". \nViruses are capable of hiding in various firmware, such as those in keyboards, mice, webcams, speakers, and even on the firmware of hard drives. \nExecutable files, DLLs, and drivers on the hard disk are common hiding spots for malware during operating system boot. \nOther potential hiding spots include the BIOS or UEFI, and other forms of firmware on devices such as network cards or graphics cards. \nAdvanced persistent threats may manipulate management engines like IME, but doing so requires significant expertise and resources. \nPeripheral devices with \"embedded driver disks,\" like certain USB sticks, are among the common but overlooked places where malware may hide. \nA USB device has also been known to act covertly as a keyboard to introduce malware to the host computer. \nAdditionally, it's worth noting that other storage devices connected to the PC, beyond hard drives, may harbor viruses. \nBeyond computer-based storage, extraordinary research suggests that viruses can be stored in biological entities such as E coli bacteria or even human DNA, although this is a forward-looking and unconventional perspective on data storage and security."},{"question":"why is clean code suggesting avoiding protected variables?","response":"Protected variables in programming should generally be used with caution as they can lead to \"You Aren't Gonna Need It\" (YAGNI) problems and can also introduce issues with the Liskov Substitution Principle (LSP). \nMoreover, protected variables can violate the Open\/Closed Principle (OCP) and tend to encourage inheritance-based design over composition, which can increase coupling and violate the Single Responsibility Principle (SRP). \nDespite these potential issues, occasionally, a protected member may be the most appropriate choice for the design. \nSimilarly, protected variables can be problematic because they make it challenging to track where the variable is accessed or modified across multiple files, leading to inconsistencies. \nEncapsulation is recommended over protected variables when their usage is not limited and clear."},{"question":"can i use 45\/60\/85w magsafe era macbook chargers interchangeably?","response":"Specifically, your 13\" MacBook can utilize a 15\" charger, but the reverse is not recommended. \nIt's crucial not to use a power supply with a lower wattage than specified for your portable device. \nDespite this, using an incorrect adapter won't cause harm to your MacBook. \nIt's important to note that a 60W adapter, when connected to a machine requiring an 85W adapter, won't overheat. \nThis situation could result in a flat battery, nevertheless, the MacBook connected won't experience a \"brownout\" scenario."},{"question":"how to get the complete and exact list of mounted filesystems in linux?","response":"Util-linux, as of version 2.18 released in July 2010, includes a feature,\"findmnt\", for displaying mounted file systems."},{"question":"why can i traceroute to this ip address, but not ping?","response":"Pings can be blocked (ICMP block) on a remote host but traceroute can still find the route to it using standard network routing UDP or TCP\/IP. \nThe ping utility relies on the ICMP protocol which is sometimes blocked at the network firewall or the firewall on the device itself."},{"question":"make the menu bar never show while in full screen","response":"Some users report that the menu bar on Mac OS X cannot be hidden on command whenever desired because of system limitations. \nHowever, disabling \"Displays have separate spaces\" in Mission Control can be a partial solution for a multi-monitor environment. \nA different approach involves using an AppleScript file named fullscreen.scpt that toggles full screen for applications and removes the menu bar. \nAnother solution is to import autopy.mouse in Python."},{"question":"why hasnt a faster, better language than c come out?","response":"Fortran is known to be faster than C for numerical tasks due to how it manages memory references. \nMoreover, there exist languages that surpass C's speed, including Fortran for its aliasing rules, as well as specialized assembly-like and mathematical languages that excel in their respective domains, like APL with built-in support for Vector processing units. \nWhile C once dominated various programming niches, contemporary languages often outperform C within their specific areas, such as C++ and Java in application development or domain-specific languages like Matlab in scientific computing."},{"question":"is the nhs wrong about passwords?","response":"NHS's suggestion that short passwords are more secure is incorrect, as longer passwords with a mix of characters have a higher number of possible combinations, making them more secure. \nIt's also acknowledged that the NHS wrong about which passwords are most secure and that certain outdated systems may truncate passwords, thus reducing the security of longer passwords if the systems only recognize a limited number of characters."},{"question":"how to connect airpods to apple watch only?","response":"The Airpods should automagically connect to the Watch once you set them up on your phone using iCloud, but if you need to pair them to the watch manually, you can do it like you would with any bluetooth headset."},{"question":"what is difference between $@ and $* in unix shell script?","response":"\"$*\" and \"$@\" are not the same in bash scripting; \"$*\" consolidates all input parameters into a single string, while \"$@\" actually keeps them as an array of distinct values."},{"question":"how to cd to a directory with a name containing spaces in bash?","response":"When navigating directories in a Terminal, you can press the Tab key after typing the first few characters to auto-fill the rest of a directory or file name. \nIn cases where folder names contain spaces, such as \"Application Support\", you must employ an escape or quote character like a backslash before the space to properly navigate into that folder. \nAnother convenient method is to simply drag and drop a folder into the Terminal window, which will automatically copy the complete file or folder path."},{"question":"why is the os obfuscation defense against its a unix system! not widely implemented?","response":"From a security perspective, the concept of restricting system calls by obfuscating command names is a flawed approach since there are strictly better options available, and such a method is overall ineffective. \nAn alternative approach that is more effective for improving security is to simply not install unnecessary utilities like 'ls' and 'cat' on the system. \nFurthermore, obfuscation is not equated with security, and attempting to obscure the operating system is essentially ineffective and is commonly understood as nonsensical. \nIn terms of usability, system administrators would struggle with the impracticality of memorizing obfuscated command names and dealing with additional complexity during system upgrades and debugging. \nUltimately, \"Security through Obscurity\" is identified as an antipattern, as it is an old and not-so-preferred idea. \nAdditionally, in security design, efforts to obscure a system's functions tend to be counterproductive, incur high time costs, and offer minimal security value. \nThe cost-effectiveness of obfuscation strategies also needs consideration; if the cost is low and the security benefit, even if small, is deemed worth it, such measures can be implemented."},{"question":"customise touch bar for a specific application","response":"To set the function keys as the default display on your Touch Bar on an app-by-app basis, go to Apple > System Preferences Select the Keyboard preference pane Click on the Shortcuts tab In the left sidebar, select the Function Keys option. \nAlternatively, for more advanced customization of your Touch Bar, using the BetterTouchTool is necessary. \nAdditionally, you should look for the Customize Touch Bar element within the application's menus, which is often found in the View menu or deeper within the app's preferences."},{"question":"how can i deal with a team member who dislikes making comments in code?","response":"One effective method to improve a developer's ability to write clearer code is to conduct frequent code reviews and refactoring sessions. \nRegular code review practices can also entail having the developers explain and defend their code in front of their peers and superiors, which can significantly enhance coding skills. \nMoreover, in addition to reviewing, pair programming is highly effective for honing developer skills, although it may be more challenging to put into practice. \nTo enforce quality standards for code, constantly asking questions during code reviews and documenting the answers can drive developers to make their coding intentions clearer, either through more comments or by refactoring their code."},{"question":"how can i disable animation when switching desktops in lion?","response":"There is currently no way to do so, but the beta version of TotalSpaces has an option to disable the animation for changing spaces."},{"question":"how to separate mouse and trackpad settings?","response":"You can install the utility Scroll Reverser for macOS which lets you reverse the scrolling behavior only for the mouse. \nYou can also use Karabiner to edit the two settings. \nOr use a Logitech M185 and the app from Logitech, which has the option to separate trackpad and mouse scroll directions. \nWith an Anywhere MX 2 mouse, the Logitech Options software solves this problem. \nA BetterTouchTool also solves this with a single checkbox."},{"question":"why only port 80 for web services?","response":"Port 80 and 443 are the \"default\" ports for HTTP\/HTTPS, which means that you do not have to specify the port (http:\/\/www.example.com:80, https:\/\/www.example.com:443) when using a web browser, and the server doesn't waste resources by handling connections in one or more ports (the Server needs to only listen on port 80 for HTTP, and not on several ports)."},{"question":"will high reputation in stack overflow help to get a good job?","response":"While some argue that a high reputation does not guarantee a high-paying job, others emphasize that it may be a deciding factor in the hiring process, is worth mentioning on a CV (based on personal experiences) and that it might get you an interview. \nOthers believe that a Stack Overflow reputation may not be a consideration at all in the job-seeking journey."},{"question":"how can get a list of all scheduled cron jobs on my machine?","response":"It depends on your Linux system and how it is set up, but you can try looking in: \/var\/spool\/cron\/* (user crontabs) \/etc\/crontab (system-wide crontab) and also many distros have: \/etc\/cron.d\/*."},{"question":"dns not resolving on mac os x","response":"For the DNS issue mentioned, one can utilize scutil commands such as `scutil --dns` and `scutil -r hostname` to interact with the configd dynamic store. \nAlso, bouncing mDNSResponder by unloading and reloading it with launchctl commands can resolve the issue. \nAlternatively, running dnsmasq locally can serve as a solution, which involves building dnsmasq and adjusting your DNS settings to use 127.0.0.2. \nHowever, removing any public DNS servers may be necessary until the DNS cache is cleared. \nRestarting the DNSResponder by using `sudo killall -HUP mDNSResponder` is another approach, specifically on macOS Mojave. \nAnother option is manually clearing your home WiFi router's blacklist and executing certain terminal commands such as `sudo killall -HUP mDNSResponder`, followed by DNS utility commands (dig, ping and traceroute), can restore proper functionality. \nFinally, a simple yet sometimes effective method is to toggle Wi-Fi off and on, which might improve network connections on a MacBook Pro."},{"question":"why is 80 characters the standard limit for code width?","response":"The coding standard of limiting code to 80 characters per line originates from IBM's 1928 80-column punched card format."},{"question":"are there guidelines on how many parameters a function should accept?","response":"There's no universally agreed-upon guideline regarding the maximum number of parameters a function should take. \nA high number of parameters may signal that a function is either handling more responsibilities than it should or there's an implicit object that needs to be defined. \nThe Parameter Object pattern is a recommended approach when dealing with functions that require multiple parameters. \nTo manage a function with many parameters, techniques like using args* or kwargs* in Python or object literal definition syntax in languages like JavaScript can be employed for more manageable and readable code. \nObject initializers can also apply in statically typed languages, offering clarity on how objects are set up."},{"question":"what is the difference between qt and gtk?","response":"There is no difference between qt and gtk with regards to their internal structures as programs. \nThe only differences are cosmetic in that they set themes independently; via qtconfig and gtk-chtheme, respectively. \nJust one thing to note would be that GNU\/Linux tends to be more gtk oriented."},{"question":"why is the accountsd process eating so much cpu?","response":"To address issues with iCloud services or high CPU usage due to Mail accounts, you might consider logging out of all iCloud services, rebooting your device, and then logging back in again. \nMultiple people have also reported that deselecting the option \"> Preferences > Accounts > Advanced > Automatically Detect and Maintain Account Settings\" in Mail's preferences under Accounts and then Advanced can be effective in reducing CPU usage. \nOthers have reduced CPU usage from the Mail app by going to Window > Activity and canceling all processes. \nAdditionally, accountsd appears to have a bug in the file indexing, which causes it to get stuck in a loop while indexing the files; this bug may be related to data in iCloud. \nFinally, it appears that a having a Gmail account signed into your Mail app may cause a problem: some have reported that removing the account can significantly reduce CPU usage and cool down your system."},{"question":"why are my text messages coming up as maybe?","response":"This is part of the Proactivity features new with iOS 9: It looks at info in emails to see if anyone with this number sent you an email and if it finds the phone number associated with a contact from your email, it will show you \"Maybe\". \n\nHowever, it has been suggested there is a bug in iOS 11.2 that can result in \"Maybe\" being displayed even when \"Find Contacts in Other Apps\" is disabled."},{"question":"how to find out the dynamic libraries executables loads when run?","response":"In order to examine the shared library dependencies of a program or shared library, you can utilize the ldd command. \nAlternatively, to explore the memory map of a process, the pmap utility provides detailed information and can be executed with additional options for more specific outputs."},{"question":"how to become a faster programmer?","response":"Engage in consistent practice and utilize productivity tools suitable for your development environment, such as Resharper for .NET. \nRefrain from excessively refining your code; focus on functionality as businesses prioritize working solutions. \nSketch your designs on paper and discuss them with peers before coding, which fosters clarity and peer feedback. \nReuse and repurpose quality code from previous projects whenever possible. \nDedicate yourself to practice and hard work, as familiarity with your tools can increase speed and creativity. \nConsider engaging with exercises like TopCoder's algorithm challenges for faster design and programming. \nCultivate deep knowledge of your editor and IDE to leverage their full feature set efficiently, adopting keyboard shortcuts to minimize the use of the mouse. \nAdopt a straightforward approach to test-driven development by following the \"red, green, refactor\" pattern, which involves writing a failing test, implementing just enough code to pass the test, and then refining the code without being hindered by tests temporarily. \nStrive to implement solutions correctly on your first attempt to save time on revisions. \nConsider evolutionary prototyping to quickly produce functional prototypes that meet immediate needs, which also helps streamline documentation efforts. \nSimplify your development tasks as much as possible by focusing on the essential requirements rather than perceived needs or over-engineering solutions. \nEnhance your knowledge by reading helpful resources like Neal Ford's \"The Productive Programmer\" and thoroughly familiarize yourself with your tools' documentation. \nIdentify and eliminate unproductive activities in your workflow, focusing only on productive tasks. \nLearn your runtime API thoroughly to increase coding efficiency and produce more accurate project time estimates. \nIntegrate build and deployment scripts into your process to save time and focus and ensure you have robust version control to help manage changes effectively. \nFor practical tooling and faster development, start using Resharper and gain comprehensive knowledge about your IDE. \nImprove your touch-typing speed and work with offline documentation to minimize distractions. \nKnow your technology intimately, implement only what's necessary, and maintain simplicity in your solutions. \nLearn to get into \"The Zone\" for peak productivity and recognize when you're not in this optimal state. \nAfter completing projects, conduct postmortem analysis to understand where time was spent and identify opportunities for improvement. \nBreak down work into small, time-boxed tasks with clear scopes, effectively harnessing tools like Stack Overflow to enhance efficiency. \nUtilize frameworks to accelerate development without starting from scratch. \nApply the \"Don't Repeat Yourself\" (DRY) principle, organize shortcuts for easy access to commonly used tools, and focus on one task at a time to increase concentration. \nIdentify your specific time bottlenecks, avoid excessive work beyond requirements, and ensure you have chunks of uninterrupted thinking time. \nContinue to learn about design patterns and test-driven development, which can reduce the occurrence of bugs. \nUtilize tools like ReSharper for code quality and speed. \nRemap your IDE keyboard shortcuts for efficiency, and use cursor navigation skills to expedite the coding process. \nEstablish benchmarks for how long tasks take and compare yourself to peers, understanding corporate culture expectations around work hours. \nWrite less code using a code generator or a preprocessor, focusing on performance tuning to reduce code bloat and increase efficiency, standardize and use existing libraries. \nEmploy code snippets and stay inspired by reading widely to broaden your perspective and speed up problem-solving. \nCollaborate with others using real-time code editing tools. \nUse CodeRush for its helpful shortcuts during coding, which can speed up your work. \nSpend a little bit of time each week just looking for new creative ways to do things that may or may not be directly related to what your currently working on is a great way to find new tricks or tools. \nReduce distractions by limiting social media, email checks and work with a clear view to encourage focus; you might try the Pomodoro Technique for time management as well. \nIt also helps to work with other programmers around you. \nEveryday come to office and write down everything you want to finish in (sticky notes) outlook notes. \nPair programming provides multiple benefits, such as forced articulation of thoughts and exposure to different working styles and tools. \nUse Emacs as a tool to augment your coding productivity. \nOpt for ergonomically optimized keyboards to support comfortable and efficient coding. \nBuild a functional part of the project, prototype in small parts, and add features as you go along to avoid significant debugging later on; aim for incremental changes on a stable system. \nWrite your own productivity tools tailored to your frequent tasks for long-term efficiency gains. \nWorking from home can offer an optimized environment with fewer interruptions, helping you to concentrate on demanding tasks. \nConsider using functional programming and lambda expressions to streamline your code. \nHaving a clear vision of your objectives and the pathway to achieving them can significantly boost productivity. \nBeing genuinely enthusiastic about your work naturally increases your efficiency and enjoyment. \nListening to music, using a comfortable chair, and eating beforehand, juggling, drinking Yerba Mate tea are all ways to create a conducive environment for relaxed and focused programming."},{"question":"is it ok to have multiple asserts in a single unit test?","response":"Having multiple assertions in a test is acceptable provided they sufficiently pinpoint the cause of a test's failure. \nThe principle of using one assert per unit test depends on the specific aspects you are testing and how they might fail. \nRather than adhering to strict rules about the number of asserts, you should prioritize the clearness of your code and test results."},{"question":"are longer ethernet cables slower?","response":"Having long cables does not necessarily slow down a network connection, but you should keep in mind the maximum length for copper cables is about 100 meters. \nAlthough there's a very tiny extent of the effect, mostly the latency increases by one nanosecond per foot of cable, which is typically unnoticeable for most applications. \nSo, if the cable is within the standard maximum length, the slowdown is minor but can become noticeable as you approach that mark. \nHowever, this delay in a local network setup is practically non-existent and the relevancy of cable length related delays becomes significant only over much greater distances, far surpassing typical Ethernet cable lengths. \nNevertheless, while the signal does weaken with increased cable length, causing potential data loss and retransmissions, it's important to note that the effect on speed is negligible until the signal becomes too weak. \nBut practically speaking, there's no significant impact on the speed of your connection due to the length of the cables used within their maximum specified range. \nFinally, it's theorized that longer cable runs can reduce bandwidth and signal-to-noise ratio, affecting the potential capacity of a communication channel."},{"question":"can gid and uid be same?","response":"As a general rule, the UID and GID are equal for ordinary users, but this is not always the case. \nIn fact, the UID is only equal to the GID by default if no separate ordinary groups are added and if no groups are explicitly specified during the creation of a user. \nSo, in short, they are not always the same, but can be."},{"question":"how to correctly add a path to path?","response":"One simple method involves appending the new path to the existing PATH using either PATH=$PATH:\/opt\/bin or PATH=\/opt\/bin:$PATH. \nAn alternative solution employs a combination of commands, utilizing awk and sed to ensure the uniqueness of the added path within the variable: PATH=$(echo -n $PATH | awk -v RS=: -v ORS=: '!x++' | sed \"s\/\\(.*\\).\\{1\\}\/\\1\/\"). \nOn Mac OS X, an effective approach is to add the path name (e.g., \/mypathname) to the file \/etc\/paths. \nFor a more sophisticated implementation, two functions, pathadd and pathrm, can be utilized. \nAnother straightforward method involves exporting the new path to the PATH variable: export PATH=$PATH:\/new-path\/. \nAdditionally, a concise and efficient way is to use the syntax PATH=\"${PATH:+${PATH}:}~\/opt\/bin\"."},{"question":"why do we need private variables?","response":"Private variables are a core principle in programming to ensure the integrity and state of an object are maintained by preventing external alterations. \nThey also discourage reliance on specific aspects of the code that may change. \nBy managing complexity and limiting access to a class's internals, private variables ensure that potential bugs are isolated to specific sections (usually one source file), making troubleshooting far more efficient. \nAnother advantage is related to the concept of 'coupling'. \nEncapsulation, which makes the external interface of the class explicit, and is fundamental concept of object-oriented programming, leverages private variables to ensure that the corresponding variable remains in the defining class only. \nIn essence, private variables ensure that later references outside the scope of an object or function won't inadvertently affect other variables. \nThey also make it easier to expand code in the future, without relying on heavy documentation as to what the many public variables do. \nThere's less of a threat of accidentally breaking functionality if fewer variables can be overwritten. \nVariable scope allows you to show consumers of your code what they can and cannot alter. \nA person wanting to change the code would have to work very hard and have really high runtime permissions in order to change it. \nEncapsulation goes beyond mere discretion; it's about not overloading the user of the class with unnecessary details, and facilitating autonomous changes to a class without affecting other classes that may rely on it. \nIncreased encapsulation results in cleaner, more reliable code by reducing the interdependence of different code parts. \nFurthermore, opting for private over public variables helps guide the design mindset from the get-go, prompting careful consideration of how class internals are exposed to users, leading to more thoughtful API creation. \nIt's important to recognize which aspects of a class are core functionality and which are meant for interaction with external code. \nLastly, private variables are good to avoid misuse leading the object into an inconsistent status, hard-to-track bugs, and unforeseen exceptions and are also excellent for protected fields."},{"question":"where can i find programming puzzles and challenges?","response":"Books like \"Cracking the Coding Interview,\" \"Programming Challenges,\" and \"The Art of Computer Programming\" provide valuable programming puzzles and challenges."},{"question":"view stdout\/stderr of systemd service","response":"To check the standard output and standard error of a systemd service unit, you can use the `sudo journalctl -u`."},{"question":"my college is forcing me to install their ssl certificate. how to protect my privacy?","response":"It's a good idea not to use their network for anything personal. \nYou can use their certificate, and use a VPN on top of that so you are not connecting to any site directly (provided they don't block it). \nAlternatively, use a virtual machine with the certificate installed when you want to use their network. \nIf ssh is not filtered out, then you can use ssh to produce a SOCKS proxy running over an ssh tunnel. \nYou can also safely use a Chrome OS device, with a dedicated \"school\" Google account that you use solely for access to the school network. \nOr just use your own internet; if you don't trust them, don't use their network. \nGetting a cellular hotspot is another option, but don't try to bypass the firewall. \nThe best solution for protecting your privacy is probably to try your hardest to get this policy overturned."},{"question":"is plaid, a service which collects user\u2019s banking login information, safe to use?","response":"Plaid's security efforts have been criticized because they require users to give the company full access to a vast range of personal financial data, unlike other payment services that only need an account number. \nFurthermore, Plaid may share this collected information with their clients with whom the user engages through their services."},{"question":"i changed one method signature and now have over 25,000 errors. what now?","response":"Test the changes you've made to your code. \nCreating a comprehensive regression test suite for your large project can be dull, but it helps confidently release updates and speeds up the release process if automated efficiently."},{"question":"why are part-time jobs in programming an anomaly?","response":"Employers don't want any limitation at all on the hours they can ask of you and often expect coders to work excessively long hours without additional compensation and may penalize those who do not comply with their demands for extended work hours."},{"question":"how to record both screen and sound with quicktime on el capitan?","response":"To record audio when using QuickTime on El Capitan, you'll need to install Soundflower, a virtual soundcard that allows for the capture of computer sound. \nAlso, alternatives such as ShowMore and Jing can be used as screen recorder, which will get the job done. \nIf willing to invest in a paid solution, Capto, previously known as Voila, offers helpful features for recording."},{"question":"is there a way to get the min, max, median, and average of a list of numbers in a single command?","response":"The R programming language can be used to perform statistical analysis with ease, providing means to calculate minimum, maximum, median, and mean values from a dataset. \nSimple-r, which operates within the R environment, works as a solution to simplify statistical analysis. \nAdditionally, pythonpy is an effective tool for such statistical computations. \nLastly, GNU datamash works well for its ability to calculate maximum, minimum, mean, and median values."},{"question":"is it ok to use the root user as a normal user?","response":"In most cases, it's a significant security and stability risk to be logged in as root user since it exposes your entire computer system to potential threats. \nAdditionally, using the root account indiscriminately can result in a high risk of losing or having personal information stolen, having system-critical functions and files altered or moved and making mistakes that have a high impact on your system. \nInadvertent actions as root can have severe repercussions, accidentally altering critical system files beyond easy repair. \nHowever, while some argue that the risks of using the root user by default are exaggerated and acknowledge that Unix's permission system may have limitations, they do not believe it is as dire as others imply. \nIn any case, it's recommended to keep ownership of personal files separate from the root user and exercise caution when operating with administrative privileges. \nSome programs, including Homebrew, cannot be used as root, which may lead to issues with permissions and organization, outweighing potential security concerns. \nFor specialized tasks such as penetration testing with tools like Backtrack or Kali Linux, the superuser role is acceptable."},{"question":"why zfs not in linux?","response":"There is a known incompatibility issue regarding ZFS's presence in the official Linux kernel due to licensing conflicts. \nFor ZFS to be allowed on Linux systems, the ZFS modules must be shipped separately from the Linux kernel. \nAdditional challenges include claims by NetApp that they own patents on certain ZFS technology, a situation further complicated following a lawsuit settlement with Sun after Oracle's acquisition; however, the settlement doesn't extend to other Linux distributors like Red Hat or Ubuntu. \nMeanwhile, the ZFS on Linux Project has enabled ZFS to be ported successfully to Linux, and users have the option to use Ubuntu with a native ZFS kernel port or other RPM-compatible distributions."},{"question":"how can i start the python simplehttpserver on port 80?","response":"To initiate the SimpleHTTPServer using Python, you could employ the command \"sudo python -m\" followed by \"SimpleHTTPServer 80\" for Python versions before 3.x, and for Python 3.x or later, \"sudo python -m http.server 80\" should be used. \nHowever, ports below 1024 require root privileges and, this practice can expose your system to security risks. \nAn alternative command to start a server without needing root access involves specifying a higher port number, for instance, \"python -m SimpleHTTPServer 50505\", where \"50505\" represents the port."},{"question":"how would a resourceful government block tor?","response":"In order to block Tor, all that has to be done is have the current list of Tor nodes then block them bi-directionally via the Routers or Firewalls. \n\nIf France wants to ban Tor, it will need to perform deep packet inspection (similar to Chinese firewall), but even such measures could be defeated by specialized tools like Obfsproxy. \n\nA government that controls all the network equipment of ISPs in the country can decide which websites and services residents are allowed to access, and can know who is accessing what, and the ISP-level filter can detect whether someone is connecting to a Tor relay and deny it. \n\nTor binaries have a hard-coded list of IP addresses they use for bootstrapping (the process of finding other nodes on the Tor network), and the Tor client will normally connect to one of these servers on startup to download the list of relays, so blocking the directory authorities will block the bridging IP addresses and prevent the exchange from taking place."},{"question":"how do you make people accept code review?","response":"Implementing a higher authority review process should help encourage code review acceptance among team members. \nFor important projects, it's effective to assign them to programmers willing to undergo code reviews, thereby emphasizing the significance of quality and collaboration. \nHosting training sessions on delivering positive criticism can facilitate a better understanding of company principles, benefit team building, and enhance the review process. \nEmphasizing the learning opportunities in code reviews can also increase their value and acceptance, as it resonates with the natural desire to learn that many programmers share. \nProviding clear guidelines for reviewers can mitigate resistance by removing subjectivity, as knowing what to expect can result in a more favorable attitude towards the process. \nEnsuring that code reviews are conducted in a productive, non-confrontational way, avoiding overly strict adherence to best practices via automation, and offering snacks and drinks can create a more relaxed environment that may help lower defenses. \nLastly, approaching the review process with questions rather than commands can also foster a constructive environment for both reviewer and reviewee."},{"question":"should utf-16 be considered harmful?","response":"UTF-16 should not be considered harmful. \nHowever, contrasting views argue that UTF-16 should indeed be considered harmful. \nSome argue that the very reason UTF-16 exists is because some time ago there used to be a misguided belief that WideChar is going to be what UCS-4 now is. \nAdditionally, the harmfulness of UTF-16 is tied to issues with exercising code."},{"question":"is tethering bad for your phone?","response":"There is no substantial evidence to suggest that tethering is detrimental to device hardware. \nTethering should be a manageable task for any Android device that supports it and shouldn't cause harm to the hardware, with the possible exception of some battery wear from overheating."},{"question":"grokking java culture - why are things so heavy? what does it optimize for?","response":"Enterprise solutions demand heavy tools contributing to the preference for heaviness in the Java ecosystem. \nJava's conservatism in adding features, aimed at preserving backward compatibility and ensuring long-term sustainability, results in a language that lacks a lot of modern syntax to express concepts tersely. \nThe optimization focus of Java aligns with the development of high-value software intended for extensive maintenance by large teams over many years. \nAs a traditionally single-paradigm class-based object-oriented language, Java emphasizes explicitness and consistency in its design, optimizing for these qualities. \nThe culture surrounding Java is tailored to create an impression of understanding software development, particularly appealing to managerial perspectives. \nCompile-time programmer error detection is optimized, ensuring that no assumptions are made. \nJava classes, in this context, are designed not for lightweight data passing but for more comprehensive functionalities. \nAdditionally, the limitation of returning a single value from a method is a characteristic that further shapes the overall optimization strategy of Java."},{"question":"can i change the application icon of an automator script?","response":"One approach to change an application's icon on a Mac is, after creating the applet, open the Applications Folder, right-click on automator script, click on view package contents, add your custom icon to the resources folder and then rename it to AutomatorApplet.icns. \nAlternatively, after the script has been created, you may copy an icon from another application using the Get Info command, then paste it into the Get Info window of your automator script. \nSimilarly, you can change the icon of any file or folder by copying an image and pasting it with the Get Info command in Finder. \nHowever, it should be noted that any modifications to AutomatorApplet.icns could be lost if the bundle is modified and re-saved within Automator, and there may also be issues with icon caching."},{"question":"why are programs written in c and c++ so frequently vulnerable to overflow attacks?","response":"In C and C++, there is traditionally no overflow checking, which means if there's an attempt to write more data into a buffer than it can hold, the system will not prevent it. \nCompared to Java software, exploiting software vulnerabilities is typically easier in C\/C++ because these languages allow direct memory modification and do not include run-time checks to prevent buffer overruns. \nC\/C++ is idiosyncratic and sometimes described as similar to a macro assembler, which makes it suited for system-level programming but also risky if misused, such as writing beyond the bounds of an array. \nHowever, the languages themselves are not inherently more vulnerable; rather, they provide the programmer with a high level of control and responsibility, which can lead to vulnerabilities if the programmer does not write safe code. \nA significant amount of C code exists that performs unchecked writing to buffers."},{"question":"are root certificates self signed?","response":"Root certificates are inherently self-signed; they can only be self-signed, as per their definition."},{"question":"why do phishing emails have spelling and grammar mistakes?","response":"Emails with mistakes are probably from people who don't know English well enough to write it correctly, although it could be part of a strategy to select gullible targets, because people who respond to badly written emails may be more likely to be gullible enough to be phished, like those who fall for scammers relying on the tired old 'Nigerian Prince' strategy. \n\nIt may be that by appearing to be less intelligent, the senders seem (perhaps even subconsciously) to be less of a threat. \n\nSpam filters work by looking for certain words (among many other test), so if these words are misspelled, the filter won't recognize them. \n\nHowever, using grammar and spelling as an indicator of either spam or phishing is becoming less useful as an increasing number of legitimate messages are authored by people who are not native English speakers, and there is also an increasing tendency for people to value speed over accuracy, so spelling and grammar errors seem to be increasingly accepted."},{"question":"how can i stop my retina display from taking 2x sized screenshots?","response":"One approach is to employ third-party utilities like RetinaCapture. \nAnother solution involves using specific add-ons, such as an addon for Firefox. \nIf you have a non-Retina external monitor, you can drag the application window there and capture the screenshot, particularly useful for browsers. \nAlternatively, you can press \u2318CMD+- to reduce font size to 50% before taking the screenshot. \nUtilizing the built-in Automator in macOS, you can create workflows or services to automatically downsize screenshots after capturing. \nIt is also possible to create an Automator workflow that executes a bash script. \nMonosnap is another third-party application that effectively addresses this issue. \nAdditionally, for a one-time solution, you can adjust the image size in the Preview app. \nAnother creative workaround involves using Evernote to paste and copy screenshots."},{"question":"are facetime calls on phone bill?","response":"FaceTime calls do not show-up as \"FaceTime\" on your phone bill, as it's simply a data transfer and will be lumped-in with all other data transfers on your bill."},{"question":"error opening a zip file: no such file or directory?","response":"If you encounter issues with a zip file, it is advisable to reacquire the file by re-downloading or re-copying it from the original source and attempt to open it again. \nShould the file still appear problematic, then it's likely that filename.zip is either not actually a .zip file, or is corrupted. \nChecking if the file is genuinely a zip file through the terminal can help determine if the file is valid, and using commands to repair permissions and unzip the file can potentially resolve issues."},{"question":"how is it possible that people observing an https connection being established wouldnt know how to decrypt it?","response":"The key thing here is asymmetrical or public key encryption. \nAsymmetric cryptography is a technique where two keys are needed: a public one and a private one. \nWhat is encrypted with the public key has to be decrypted with the private key and the other way around. \nThe session is protected now because only the client and the server can know the session encryption key. \nThere is no way for an opponent to derive the private key from the publicly viewable information. \nWikipedia \"Transport Layer Security\" gives an answer that is more correct in technical particulars. \nProblems do exist with this model when you run into things like a certificate authority being compromised. \nRemember not to overlook the interception capability of the ISP or NSA. \nAn ISP can simply perform a man-in-the-middle-attack on any of your HTTP downloads of applications or their patches, and thus update the browser trust chain directly or update it indirectly with a self-destructing trojan. \nThe EcoParty Conference announced a tool called BEAST that reportedly decrypts SSL3\/TLS1.0 traffic and lower, presumably by observing it."},{"question":"restarting sound service?","response":"A reboot is sometimes necessary to address audio issues, although it is not a permanent fix and does not address the underlying problem. \nTo reload the audio kernel extension, you can execute the commands `sudo kextunload \/System\/Library\/Extensions\/AppleHDA.kext` followed by `sudo kextload \/System\/Library\/Extensions\/AppleHDA.kext`. \nAdditionally, the process `coreaudiod` can be immediately terminated by using the command `sudo pkill -9 coreaudiod`, prompting MacOS to restart it, which often resolves audio problems."},{"question":"do websites track mac address?","response":"Generally, remote sites can only learn your public IP address and not your device's MAC address, except when using IPv6 with an EUI-64 address, which could potentially reveal your MAC address. \nIt is generally not possible for websites to determine your MAC address; however, certain conditions, such as being on the same network segment as the server or instances where ISPs embed MAC addresses in reverse DNS records, could allow for this information to be obtained."},{"question":"find command: how to ignore case?","response":"With GNU find, or other versions of find that have it, the command is as follows: `find . -iname \"WSFY321.c\"`."},{"question":"how to append multiple lines to a file","response":"You can append content to a file using `printf` with the syntax `printf '%s\\n %s\\n' 'Host localhost' 'ForwardAgent yes' >> file.txt`. \nSimilarly, you can use SED to insert text at the end of a file with the command `sed -i '$ a text to be inserted' fileName.file`. \nFor operations that require elevated privileges, `sudo` can be paired with `sed`, as in `sudo sed -i '$ a text to be inserted' fileName.file`. \nAnother method is to use `echo` with the `-e` option to control newline characters, such as `echo -e \"Greeting 1\\nGreetings 2\\n\" >> greetings.txt`. \nAdditionally, `tee` can be used to append text to files using a command like `tee -a ~\/.ssh\/config << END Host localhost ForwardAgent yes END`."},{"question":"is social-engineering an actual threat","response":"Yes, any system is as weak as the weakest member, and that is the human being, which may include secretarial staff."},{"question":"what is meant by now you have two problems?","response":"Regular expressions (regex) should be used only if there's no alternative way to solve a problem since other solutions might be easier to code, maintain, and support. \nHowever, when regular expressions are not used correctly, they can lead to the original problem persisting and create additional issues with unreadable code. \nRegular expressions can be tempting for parsing tasks, but an over-reliance on them often ends badly. \nIncorrect use of regex adds difficulty due to the complexity and maintainability of the solution. \nOnly perfect application of regex solves the problem without introducing additional issues. \nThe complexity of adding a regex solution needs to be balanced against the complexity of non-regex alternatives. \nFinally, regex can be seen as a sarcastic joke among programmers, highlighting the pain of using complicated tools that may not be the ideal choice and emphasizing the importance of responsible usage to avoid problems for future maintenance."},{"question":"where are cron errors logged?","response":"To check for emails from crond regarding job failures or non-zero exit codes, you should type: $ mailx at the command terminal. \nmailx(1) is the basic mail reading program on most every Unixlike system, which is quite primitive by modern standards, but you can count on it to always be available. \nNote that unless you have configured your system as an Internet email server, this mail subsystem is used only within the machine."},{"question":"how do i find out what hard disks are in the system?","response":"The 'lshw -class disk' command is often used to gather disk information. \nOn Fedora 14, the 'fdisk -l command' can be used to list out disk partitions and their details, although it requires root permissions to execute. \nThe 'hwinfo' command is also useful, especially when inquiring about disk hardware information, and can be used with options like '--disk' to get detailed insights about disk characteristics. \nLastly, 'sfdisk -l' is a convenient command for exploring detailed information about physical disks, and it is generally pre-installed on all Linux variants but also demands root access."},{"question":"how to get bsd ftp and telnet back in 10.13 (high sierra)?","response":"You could try to obtain libtelnet and lukemftp from the open-source repository for macOS 10.12.6 and compile them yourself. \nIf you prefer to use Homebrew, you could easily install BSD telnet with the command brew install telnet. \nAnother option is to grab the binaries directly from a macOS Sierra installation at \/usr\/bin. \nAlternatively, you could use Homebrew to install inetutils, which restores telnet, ftp, and other utilities with the command brew install inetutils. \nIf you're using MacPorts, telnet is included in the inetutils port, and you can install it using sudo port install inetutils. \nLastly, Apple's Telnet and FTP programs are available again in High Sierra through a homebrew pull request, and you can install them using the command brew install tnftp tnftpd telnet telnetd."},{"question":"why we need igp in bgp?","response":"One reason for using a single routing protocol is for clarity: it eliminates the need to redistribute routes between different protocols. \nBGP is necessary to avoid carrying the entire internet routing table in IGP, as protocols like OSPF were not designed to handle a large number of routes. \niBGP is utilized by eBGP routers for the purpose of sharing their routes with one another. \nThis facilitates internal network communication by allowing eBGP routers to know the routes received by others, thus possibly allowing for transit through your network."},{"question":"do macbooks support nvme ssd drives via the use of a sintech adapter?","response":"This depends entirely on the Mac model, for example, this doesn't work with MacBook Air early 2014 or Macmini late 2014. \nFor macOS High Sierra beta 9 and GM there is a BootRom update for ALL Macs supported by HighSierra, so that they can boot from APFS drives, which brings NVMe boot ability on every mac back to the Mac Pro 6.1 late 2013 and upwards. \nThis means that every Mac which has an Apple 12 + 16 PCIe connector has the ability to boot from any NVMe drive once they have been upgraded to High Sierra and updated their BootRom. \nFurthermore, there is a guide on the MacRumors forum by user Cmd+Q which details how to upgrade your SSD step-by-step."},{"question":"what is the difference between native vlan and default vlan?","response":"The Default VLAN refers to the VLAN to which all Access Ports are initially assigned unless they are specifically placed in another VLAN. \nThe Native VLAN is adjustable, and it can be set to any preferred option, while the Default Native VLAN is always 1 and cannot be changed."},{"question":"ecdsa vs ecdh vs ed25519 vs curve25519","response":"Ed25519 is noted for its significant practical advantage over (EC)DSA due to the latter's total failure in the event of a compromised random number generator, a situation that has occurred in the past. \nECDH and ECDSA are established cryptographic methods, with ECDH being a key exchange method and ECDSA a signature algorithm, both of which conceptually have been proven secure. \nEd25519 is a variant of EdDSA (Edwards version of ECDSA) that utilizes Curve25519 for signing."},{"question":"linux how do symlinks work?","response":"The symlink uses the real file's name as a reference point within the file system: the operating system, upon accessing a symlink, follows through to the actual target file. \nOnce the file is reached and the inode is in use, the original path used via the symlink becomes irrelevant as the inode is the main reference for file operations and will be used for any further read or write operations on that file."},{"question":"failed to fetch jessie backports repository","response":"If you're looking to continue using Jessie backports, you must now use archive.debian.org for fetching them. \nSome found archive.debian.org worked for provisioning a Vagrant box under Debian \"Jessie,\" but also needed to add it to \/etc\/apt\/sources.list.d\/jessie-backports.list."},{"question":"do i need csrf protection?","response":"If a GET request is involved in altering the application's state, which ideally it should not be, then implementing CSRF protection becomes crucial. \nSpecifically, CSRF protection is deemed necessary for state-changing operations within an application. \nHowever, if the GET request is primarily focused on returning data, CSRF protection may not be required. \nOrdinarily, safe methods do not have to be protected against CSRF and if your site is implemented as per standards, your GET requests should be safe."},{"question":"how do i transfer files from linux to iphone?","response":"You can use the iOS app GoodReader, or install the VLC app from the app store and use its wifi transfer feature."},{"question":"high sierra 10.13 : keychain access menubar item missing?","response":"Lock Screen is now available via the Apple menu, providing a way to secure your screen. \nYou can also set up a Hot Corner as a solution by navigating to System Preferences, then to Desktop & Screen Saver, Screen Saver, and finally Hot Corners. \nAnother approach involves adding an Automator app to the Scripts menu with a script that launches the Keychain Access app. \nFor quick access, you can use Siri by clicking the Siri button and saying \"Open Keychain,\" which directs you to the Keychain Access. \nFurthermore, you can find the Keychain Access option under the Apple menu, and there's a keyboard shortcut available to lock your screen. \nAdditionally, you can copy the Keychain Menulette from an older version of the Keychain Access bundle as an alternative method."},{"question":"how do you exit full screen mode in yosemite?","response":"To exit full-screen mode in Yosemite, click the minimize\/maximize button a second time or press Control-Command-F simultaneously. \nAnother approach is to move the mouse cursor to the upper-left corner of the screen and wait a second; the 'traffic light' buttons will reappear, allowing you to leave the full screen."},{"question":"the operation can\u2019t be completed because the original item for \u201cfoo\u201d can\u2019t be found","response":"There are several possible fixes for this issue: for instance, some simple fixes like re-launching the Finder or clicking on \"log in as...\" and re-entering your login credentials can refresh the shared devices list and solve connectivity problems, while restarting a Mac into Recovery Mode to complete disk repairs and permission repairs may also help. \nChanging the Volume's to \"admin\" on a Mac might also resolve certain access issues. \nFor problems involving connectivity, checking the permissions on your remote share might work: for example, adding permissions explicitly for a \"Guest\" user to a Windows directory can rectify issues that arise from a Mac attempting to connect to it. \nEnsuring that relevant daemons like Samba and AFP are granted appropriate access is also important. \nFinally, using both chmod and chgrp commands can be effective."},{"question":"how to run grep with multiple and patterns?","response":"\"Git grep\" is a command that can be used for combining multiple patterns using Boolean expressions: \"git grep --no-index -e pattern1 --and -e pattern2 --and -e pattern3\" will print lines that match all the given patterns simultaneously."},{"question":"how to change default alarm tone galaxy s6?","response":"While android doesn't provide a way to change the default alarm tone, there is a way. \nVia the ES File Explorer, navigate to \/system\/media\/audio\/alarms, then click on the file you want, and in the \"Open with\" prompt, select \"ES Media Player\". \nNow, open the menu in the top right, and pick \"Set ringtone\".\nFinally, in the dialog that appears, choose \"Set alarm\" and you're done. \nYou can also do this using Zedge, which allows default alarm tones to be set to one of your choice."},{"question":"can airpods connect to iphone and mac?","response":"When your other devices are signed in with the same Apple ID as your iPhone, AirPods connect automatically with all your Apple devices, automatically switching between your iPhone, iPad, iPod touch, and Mac. \n\nSeamless switching appears to work from iOS 14, iPadOS 14, and macOS Big Sur; your devices need to have Bluetooth 4 in order for the AirPods to work seamlessly. \n\nHowever, the developer of an App called ToothFairy claims that AirPods have to be manually switched from iOS to Mac, which you can do from the Bluetooth menu on the Mac, and the App makes this easier."},{"question":"what does the 1000m on a network switch mean?","response":"Those two ports only are capable of operating at Gigabit speed."},{"question":"this javascript code is injected on my hotel wi-fi: should i be worried?","response":"Concern about internet security in such an event is warranted. \nImmediate action should include contacting the hotel staff and refraining from further use of the compromised network. \nUtilizing a secured tunnel, like OpenVPN or SSH, is the best approach for network security when using other people's networks."},{"question":"where can i find stock or custom roms for my android device?","response":"Stock ROMs for specific devices are typically posted in the General sub-forum of device-specific sections on XDA Developers' forums, while the Android Development sub-forum typically hosts custom ROMs for those devices. \nRootzWiki is another resource that supports a lot of devices and provides tools for top developers. \nFor a variety of custom, stock, and leaked ROMs alongside kernels and how-to guides, you can refer to various online forums and websites. \nA Vietnamese forum called Tinhte contains ROMs for Korean versions of devices from manufacturers such as LG, Samsung, and HTC. \nBBS Gfan, a Chinese forum, has a vast collection of ROMs suitable for a wide selection of devices. \nAdditionally, NeedROM offers original and custom ROMs for over 65 brands, mainly Chinese, along with up-to-date tools. \nMTK Firmware and Android MTK are also websites that focus on providing ROMs, tools, and drivers for MTK-based brands, again mostly Chinese."},{"question":"is it safe to include an api key in a requests url?","response":"It depends on how that API is meant to be used and what type of data it is accessing: something that accesses google maps (for example) is much lower risk than something accessing banking data. \n\nIt is not a good idea to pass secrets as GET parameters in general, and while this is secure in modern websites, it\u2019s not suitable for all applications and requires significant care to use, with the most common concern with using capability URLs on the server side being that both HTTP server and reverse proxies keep logs, and the URL is very often included."},{"question":"how secure is blacking out sensitive information using ms paint?","response":"When using MS Paint to black out sensitive information, the original pixels are effectively destroyed, making it a safe option for ensuring privacy. \nThe method has been acknowledged as secure for removing sensitive data, suggesting confidence in its safety from multiple sources."},{"question":"what do you do when code review is just too hard?","response":"One should tackle the more significant underlying issues to address the difficulties associated with code review. \nThis involves handling the absence of a unit test suite, intricate code merges, and a basic lack of architecture that may be causing code reviews to be challenging. \nMoreover, dividing the changelist into various smaller changelists for separate reviews can significantly streamline the process. \nIf a particular changelist does not seem satisfactory upon review, it should be rejected."},{"question":"how to copy text from vim to an external program?","response":"Hold down the shift key and select text using the mouse cursor to copy it to the clipboard, a function that also supports pasting from the clipboard into vim when running in a terminal like xterm."},{"question":"how can i create a symbolic link in terminal?","response":"To create a symlink to replace a system directory (e.g. if you want to have \/Users pointing to another disk drive), you need to disable System Integrity Protection. \nif you're in GUI Land and don't want to enter Terminal Land, you can use SymbolicLinker. \nThe command is called ln; if used with the option -s it will create a symbolic link in the current directory: in -s \/any\/file\/on\/the\/disk linked-file. \nln -s \/some\/dir\/ ~\/Desktop\/dir: you can also create a symlink for directory using the same command ln -s \"$(pwd)\" ~\/Desktop\/dir to create symlink to the current directory."},{"question":"xcode failed to download. use the purchases page to try again","response":"To resolve a failed App Store download issue, the steps taken included opening the Activity Monitor to investigate the AppStore process files and ports, which led to the discovery of a specific folder starting with \"\/private\/var\/folders\/\". \nErasing this folder and restarting the App Store allowed the download to start successfully. \nAnother successful method was unmounting the mirrored external drive that appeared to be linked with App Store operations, enabling a debug menu for the App Store, and then resetting the App Store. \nEnabling the App Store's Debug menu and resetting the application proved effective for another user. \nFurthermore, you can download Xcode directly from the Developer Center if the App Store is problematic. \nIt was also mentioned that simply clearing up space on a full hard drive can solve the installation issue. \nMoreover, ensuring a good network connection, enough free space, and managing firewall settings were also helpful. \nLastly, in one particular case, disabling the company's VPN was necessary to install a software update successfully."},{"question":"how to backup an android device?","response":"You are required to be ROOTED in order to use Titanium Backup for phone backups. \nNANDROID backup is a safe image to fall back on. \nThere are various apps available, but many devices come with ES File Manager already installed. \nIf your device isn't rooted, you can use adb from the Android SDK to back up app data. \nA custom recovery can be used to create a \"nandroid\" backup, which is essentially a 1-to-1 backup of your device."},{"question":"is a rand from \/dev\/urandom secure for a login key?","response":"The answer is definitively yes when considering whether \/dev\/urandom generates data indistinguishable from true random data, making it reliable for cryptographic purposes. \nAdditionally, it's been highlighted as a great way without needing to worry about duplicate occurrences, as such an event is exceedingly unlikely, akin to being struck by lightning multiple times in a day. \nThe recommendation to use \/dev\/urandom is consistent across various platforms, despite some nuances in Linux and NetBSD related to entropy gathering after booting."},{"question":"how to permanently set environmental variables","response":"Use `\/etc\/environment` or `\/etc\/profile` depending on your distribution. \nConsider creating a new file in `\/etc\/profile.d` if it's available for a less conflict-prone approach, especially with updates. \nWhen setting variables in `\/etc\/environment`, the syntax is typically `name=value`; in `\/etc\/profile`, you would use the `export` command since it's a script. \nIf you choose to use `\/etc\/profile.d`, note that there may be naming conventions to follow, such as requiring a `.sh` extension on Debian. \nReviewing your distribution's documentation or the `\/etc\/profile` script to understand how these files are incorporated is important."},{"question":"does xquartz work on mojave?","response":"Yes, the latest version of XQuartz works just fine on macOS Mojave machines with absolutely zero issues, but does not support Retina displays."},{"question":"how do i clear the terminal history?","response":"To clear your current session's history, use the \"history -c\" command. \nIf you want to delete your long-term history, the command \"rm ~\/.bash_history\" will accomplish that. \nExecuting both \"history -c\" and \"rm ~\/.bash_history\" one after the other will ensure that both your current session and long-term history are cleared."},{"question":"combine the output of two commands in bash","response":"You can combine two commands by grouping them with { }, for example: { command1 & command2; }. \n\nTry: paste $(node ~\/projects\/trunk\/index.js) $(python ~\/projects\/trunk\/run.py run) > outputfile. \n\nYou can use either a subshell or command grouping, and redirect the output of the whole group at once, thus: Code: ( command1 ; command2 ; command3 ) | cat { command1 ; command2 ; command3 ; } > outfile.txt. \n\nConsider these programs: cmd1() { perl -e 'while(1) { print \"a\"x3000_000,\"\\n\"}' } export -f cmd1 cmd2() { perl -e 'while(1) { print \"b\"x3000_000,\"\\n\"}' } export -f cmd2; when running those in parallel you want the output to have full lines of as followed by full lines of bs, not as and bs mixing on the same line, which is better achieved using GNU Parallel instead. \n\nHere's a recipe to run each command in turn, removing any newlines between their outputs: (echo 'ab' && echo 'cd' && echo 'ef') | tr -d '\\n' >>> abcdef. \n\nAlternatively, cat <(command1) <(command2) <(command3) > output.txt; a real life example: cat \\ <(curl https:\/\/stackoverflow.com\/humans.txt) \\ <(echo -e \"\\n\\nDownloaded from https:\/\/stackoverflow.com\") \\ > output.md."},{"question":"how long does the new testflight beta review process usually take?","response":"A beta app must adhere to the full App Store Review Guidelines to be accepted for TestFlight Beta Testing, so the review timeframe should be similar to that of standard App Store submissions. \nPersonal experiences with the Testflight Beta review processes range widely, from less than an hour up to three days, while the average appears to be one day to a day and a half. \nWhile some report this average time, others have reported being approved within an hour, or even 50 minutes, and that any subsequent beta releases were approved instantly without any additional review time."},{"question":"how to prevent command-i\/command-shift-i from opening mac mail when in browser?","response":"One approach offers that you can change the shortcuts from System Preferences. \nThe shortcut Cmnd+Shift+I in Chrome can be used to \"Email the current page,\" but it may be frustrating due to its proximity to the developer tools shortcut. \nOne method to prevent this behavior in Safari is using FastScripts to map Command+I to an empty AppleScript. \nAlternatively, in Chrome, you can disable Command+Shift+I by installing the Shortkeys extension and then opening the Shortkeys's preference panel, adding a command+shift+i shortcut and then Restart Chrome. \nIf you're using Better Touch Tool, it can also be used to override shortcuts. \nAssigning a keyboard shortcut to activate an extension via chrome:\/\/extensions\/shortcuts is another simple method. \nLastly, reassigning the problematic shortcut, (Cmd-Shift-I), to a different action, such as launching Developer Tools in Chrome or making a copy of the screen to the clipboard, can stop the Mail app from launching."},{"question":"can uid and gid be the same?","response":"As a general rule, the UID and GID are equal for ordinary users, but this is not always the case. \nIn fact, the UID is only equal to the GID by default if no separate ordinary groups are added and if no groups are explicitly specified during the creation of a user. \nSo, in short, they are not always the same, but can be."},{"question":"why isnt itunes shuffle random?","response":"To reshuffle the play order in music software like iTunes, you need to deactivate and then reactivate the random play feature."},{"question":"can you put a kindle book on 2 devices?","response":"You can register multiple Kindle applications or devices to a single Amazon account, so you can read the same book on multiple devices. \nIn fact, you may simultaneously access most Kindle store purchases on up to six Kindles or Kindle-supporting devices that are registered with your Amazon account. \nMoreover, some Kindle books have a feature that lets you lend them to another Kindle user for a period of up to two weeks."},{"question":"how can i achieve page-up and page-down in os x?","response":"The key combinations for page scrolling can vary by keyboard layout and customization: on most standard keyboards, the shortcut is \u2325 + Up\/Down arrow keys. \nOn a Danish keyboard layout, the combination is fn + shift + \u2191\/\u2193. \nIf you're using the KeyRemap4Macbook application, look under the \"Change Arrow Up\/Down\/Left\/Right\" keys setting to configure shortcuts for page scrolling in certain contexts, for example to make Shift + Page Up or Page Down a shortcut for page scrolling."},{"question":"how to move files to trash from command line?","response":"You can do so by using the terminal command osascript: osascript -e \"tell application \\\"Finder\\\" to delete POSIX file \\\"${PWD}\/${InputFile}\\\"\"."},{"question":"how can i stop an intruder plugging into an ethernet wall socket getting access to the network?","response":"Have physical access restricted, then have 802.1x using EAP-TLS to have authentication to the port. \nAfter that you can still have a firewall on the access\/distribution layer. \nYou can include a port disable for a given time period if violations are detected, or implement a policy that requires any switch ports that are not currently used to be disabled. \nAnother option is to use a VPN internally and treat the section of the network outside secure areas the same way you would treat the internet. \nIf your only requirement is to just block users (intruders), you can simply write a couple of lines of EEM script. \nUse a very strict access control, bring in pen tester, find things that are misconfigured, understand perfectly your network, and train people."},{"question":"computer name keeps changing osx 10.10 (14a389)","response":"You can address the issue by entering System Preferences, typing 'Computer name' into the search bar, and selecting it to modify the name by deleting any additional numbers that may have appended themselves. \nAnother is to navigate to System Preferences, then to Energy Saver, and within the \"Power Adapter\" settings, disable the \"Wake for network access\" option. \nAdditionally, PlistBuddy, which is an application for editing plist files, can be used to alter the plist file responsible for the computer name, preventing it from changing. \nIf you prefer a different approach, delete specific preference files from the SystemConfiguration directory and restart your Mac to address the renaming issue. \nA software upgrade to 10.10.1 - build 14B25 or later can also resolve this bug if you're running the initial release version of 10.10. \nFor those with an AirPort Base Station, the solution may involve opening the AirPort Utility and removing old Apple ID entries associated with Back to My Mac, a step that might correct the renaming problem caused by outdated settings. \nAnother technical fix is to open the com.apple.discoveryd.plist file with Xcode and include a line that prevents the name change, but this requires saving the changes and restarting your system. \nSometimes, simply reverting the name to its original in System Preferences can be an immediate albeit potentially temporary remedy. \nLastly, if you're looking for a quick, non-invasive fix, run the command \"sudo hostname HOSTNAME.local\" in the terminal to set the hostname."},{"question":"red notification light on nexus 4, wont power on, device unresponsive","response":"When your phone\u2019s battery is completely drained, it will flash a red LED light briefly. \nThis is not necessarily an indicator that your phone has reached the end of its life. \nIn many instances, the red light situation reflects a battery that is simply 100% discharged. \nIt is advised to use a power socket charger rather than a USB charger from your computer for effective charging."},{"question":"do any security experts recommend bcrypt for password storage?","response":"One opinion advises that Thomas Ptacek, a security researcher, advises the use of bcrypt while they are themselves more interested in PBKDF2 as a key derivation function that applies a pseudo-random function to the input password along with a salt. \nHowever, businesses required to comply with U.S. NIST or FIPS standards, bcrypt is not a valid option, as it doesn't meet those specific compliance requirements."},{"question":"why do people hesitate to use python 3?","response":"Firstly, the sentiment \"If it ain't broke, don't fix it\" is a prevailing mindset, particularly when certain libraries, like XYZ library, lack a 3.0 port, and the transition involves complexities due to the elimination of older-style classes in \"Python 3.0\", so porting old code is not so simple. \nAdditionally, there was already a huge number of users dependent on Python 2.0, and features back in the Python 2 days seemed a lot more compelling than those provided by \"Python 3\". \nFor existing businesses, there is often no compelling reason to invest time, money, and effort in migrating to Python 3, especially when the existing feature set remains unaffected. \nThe lack of support for Python 3 in major server frameworks and web frameworks further deters adoption. \nAlso, Python 3 is viewed favorably for new projects if all required libraries are already ported to Py3k; otherwise, Python 2.7 is considered a pragmatic choice, providing compatibility with most existing libraries while allowing gradual adaptation to \"Python 3\". \nThe initial Python 3.0 release faced challenges, including critical issues with poor IO performance, making it impractical for many use cases. \nAnother consideration is that Python 3 doesn't let you play fast and loose with text encodings the way Python 2 does. \nUnless engaged in heavy i18n work, there are perceived to be no compelling reasons to switch to \"Python 3\". \nDistribution challenges, where some distributions don't make Python 3 readily available, also contribute to the hesitation. \nFurthermore, the shift in integer division behavior in Python 3, which may impact existing code, has been identified as a significant concern."},{"question":"what to do when a linux desktop freezes?","response":"To manage unresponsive processes, you could attempt Ctrl+Alt+* or Ctrl+Alt+F1 to open a terminal, launch a command like ps, top, or htop to see running processes and launch kill on not responding process. \nIn some distribution versions, Ctrl+Alt+Backspace will terminate and restart the X11 interface. \nTry the Magic SysRq key sequences, specifically \"Alt+SysRq+?\" in Linux (based on \"Raising Elephants Is So Utterly Boring\"): `Alt+SysRq+R`, followed by `Alt+SysRq+E `, then `Alt+SysRq+I`, Alt+SysRq+S `Alt+SysRq+U`, Alt+SysRq+B`. \nHandling an unresponsive program that was initiated in a terminal can be done with Ctrl+D, Ctrl+C, or a more forceful Ctrl+Z followed by a kill command, specifically by opening the terminal and using killall. \nOn laptops, you might need to press Ctrl+Fn+F1 to access the terminal, and you can initiate a restart from there with 'reboot now' or return to the GUI with Ctrl+Fn+F8 as experienced in HP G56 or control + alt + fn + f7 followed by control + alt + fn+ f2 to get back to the shell, then login and go back to the desktop with chvt 8 on Mint 17.3. \nIf you any of the above suggestions do not work, nor does finding a utility to terminate the program, or switching to another virtual console, try `Alt+SysRq+f`. \nLastly, another potential solution involves pressing CTRL+ALT+RIGHTARROW or LEFTARROW to switch workspaces and outmaneuver the problem."},{"question":"how do i handle disagreement in a code review regarding an unlikely edge case?","response":"When contending with code reviews concerning business strategy, having a conversation with someone knowledgeable in business strategy could be beneficial, especially if a difference in understanding persists. \nTo enhance the business utility of code reviews, one could categorize comments by type, ranging from critical fixes to optional improvements."},{"question":"wi-fi disconnects when i lock the mac","response":"If your WiFi disconnects when your Mac is locked, one solution is to open Terminal and execute specific commands (like \"cd\") that prevent the WiFi from disconnecting when logging out. \nYou can also determine the specific network interface for your WiFi and apply settings using the airport utility for your wireless card to ensure it doesn't shut off. \nAlternatively, you can install an app like \"Lock Me Now\" which provides a \"Just Lock\" option to avoid WiFi disconnection when the screen is locked."},{"question":"where is the apk file downloaded from google play store?","response":".apk files are downloaded and stored somewhere in a subfolder on your device called \/data. \nHowever, in order to access this folder, you will need to root your device."},{"question":"what is the difference between an attribute and a property in c#?","response":"Property implies something possessed by something else, while Attribute suggests something that is an inherent characteristic."},{"question":"how to move internal storage to sd card in samsung duos?","response":"For Android 4.x devices, such as the Duos, you can move apps to the SD card by navigating to Settings\u2192Apps\u2192Manage Apps, then scrolling to the app you want to move, and tapping the \"Move to SDCard\" button. \nHowever, if the button is grayed out, the app in question cannot be moved to the SD card."},{"question":"what is the difference between modify and change in stat command context?","response":"The Modify timestamp refers to the most recent instance when the file content was modified. \nThe Change timestamp indicates the last occasion when the file's metadata, such as permissions was changed."},{"question":"how should i test randomness?","response":"Run tests multiple times and visualize your data. \nAnalyzing the results of these tests will allow you to determine whether the algorithm performs satisfactorily by ensuring all potential outcomes are represented and that their frequency is properly distributed."},{"question":"how do i delete photos from my ipad but not icloud?","response":"If you have iCloud Photo Library turned on, all of your devices' camera rolls are identical so, unfortunately, you cannot delete photos from your iPad, but not iCloud. \n\nYou can turn off iCloud Photo Library on a single device by following these steps: on your iPad, go to Settings > iCloud > Photos and turn off iCloud Photo Library, which will delete your photos from your iPad, but not your iPhone or iCloud account."},{"question":"trying to sort on two fields, second then first","response":"With GNU sort you do it like this: sort -k2,2 -k1 >>\" means here strings, referring to a Bash feature where a string is directly passed to the command's standard input."},{"question":"what alternatives are there when ssh is being actively filtered?","response":"One could employ VNC for their needs, yet it is imperative to note that without the protection of a VPN or SSH, the security of such a method is questionable. \nSecure data transmission can be maintained through methods like https, and the use of tools like Corkscrew and Netcat, both of which aid in using HTTPS proxies to encapsulate SSH traffic. \nIn instances where HTTPS remains unfiltered, leveraging AJAX or HTML5-based terminal emulators running on a secure site could serve as a viable alternative. \nAlternatively, if one seeks to tunnel IP through different protocols while using Corkscrew, options like implementing IP\/DNS with iodine or IP\/ICMP present themselves, along with resources such as http:\/\/www.serfish.com\/console\/. \nFor those who can initiate server access through another route to install daemon, the installation of telnet-ssl\/telnetd-ssl is a relatively straightforward and efficient solution. \nTunneling SSH over DNS via OzymanDNS or iodine is also a practical consideration. \nShould internet connection be subject to filters, turning to alternative connection methods like satellite internet service providers can circumvent such barriers. \nAdjusting the SSH port to 443 to enable connection through it has been advantageous against certain firewalls, although its efficacy can vary. \nDividing the SSH handshake into multiple packets and potentially sending them out of sequence can evade packet filtering technologies that operate on a single packet level. \nLastly, substituting SSH with MOSH, which uses SSH for authentication and then transitions to a UDP-based communication, can yield a faster and more reliable connection."},{"question":"google play services has stopped message continually popping up on my samsung phone","response":"To resolve issues with Google Play Services, updating it to the latest version is recommended. \nClearing the Google Play Services cache is also a useful step in fixing problems. \nIf necessary, uninstalling updates of Google Play Services may help. \nAnother approach is to go to APKMirror, get the latest Google Play Services version, and install it. \nIt's suggested to manage permissions via Privacy Guard, setting them to \"Ask every time\" or according to your needs to prevent battery drainage. \nPermission adjustments in Privacy Guard for \"Wake up\" and \"Keep Awake\" functions could also influence the functionality and error messages from Google Play Services. \nLastly, uninstalling updates from the Google Play Services app might solve issues if recent updates are causing problems."},{"question":"how can i get the current working directory?","response":"For the current working directory, you can use the environment variable $PWD, or write something similar to: dir=`pwd`. \nAnother approach is to use command substitution to store the pwd command's output to a variable by using backticks or dollar characters. \nMoreover, different commands can display varying results if symbolic links are present; therefore, using `\/usr\/bin\/pwd` or `$(pwd -P)` is suggested to obtain the physical directory path when scripting in bash."},{"question":"why is the root directory on a web server put by default in \/var\/www?","response":"The decision is primarily influenced by historical factors. \nThe \/var directory has traditionally been designated for system data that undergoes frequent changes, such as cache files, logs, runtime data like lock files, mail server storage, and printer spooling."},{"question":"does craftsmanship pay off?","response":"In most cases, craftsmanship in software development is acknowledged during the maintenance phase rather than when launching a new product. \nCraftsmanship's value becomes more evident over time as organizations mature and realize the importance of well-constructed software for reducing maintenance expenses; writing well-commented and modular code does pay off. \nHowever, truly appreciating the value of craftsmanship might require starting your own company, as it's often in employed positions where the effort goes unrecognized or is only valued much later. \nIn some unfortunate cases, a commitment to craftsmanship might not align with a team's culture or might even be met with resistance; this can be true in big organizations because corporate culture doesn't really encourage it. \nAdditionally, a focus on \"best practices\" could be misconstrued as over-engineering, leading to neglect of the commercial aspect of development work. \nAnd sometimes, craftsmanship does pay off for those in leadership positions or those directly responsible for the code base, but for those facing tight deadlines, the immediate benefits might not be obvious."},{"question":"is momentary physical access dangerous?","response":"The potential actions of an attacker vary depending on the system, the attacker, and their preparation. \nThey could inject malicious code, use a keylogger, access files or physically damage the computer. \nOther types of malicious actions go beyond hacking, including the use of USB devices that can destroy a computer, causing financial damage and downtime. \nFurthermore, the risk spectrum includes numerous devices that are particularly dangerous within a very short timeframe. \nFor instance, malevolent FireWire devices or other technologies can be harnessed to directly penetrate RAM or utilize similar direct access strategies, pointing to the physical and security risks associated with peripheral ports. \nThis indicates the presence of sophisticated and diverse USB-based exploits, including deceiving devices that could conduct unauthorized actions or serve as pathways for further attacks."},{"question":"difference between pts and tty","response":"A tty is a regular, or native, terminal device, and the backend is either hardware or kernel emulated (the console on your server, for example); a pts is a pseudo terminal slave (an xterm or an ssh connection)."},{"question":"is there a way to block access to or wipe my google data for a lost\/stolen phone","response":"AndroidLost Jupstart is an app that can initiate a service on your lost phone remotely even without pre-installed locating software. \nPrey might be a choice for securing your device, but it does not offer a remote wipe feature. \nLookout Premium provides remote locking or wiping of your device for a monthly fee. \nUsing a Microsoft Exchange account enables you to wipe your phone. \nDroid Locator offers a range of services, including sending location information via SMS upon SIM card change and sharing your location with friends. \nLookout's Plan B app is specifically for locating your phone after it has been lost, especially if you did not have the foresight to install Lookout in advance. \nGoogle's \"Android Device Manager\" allows for remote ringing, wiping, and locking of your device. \nLastly, Carbonite Mobile not only manages backups but also provides phone location, ringer activation, screen locking, remote camera activation for possible theft, and data destruction with factory reset options."},{"question":"how would you know if youve written readable and easily maintainable code?","response":"Essentially, to know if your code is easy to maintain and read, the objects, methods and\/or functions should always do one thing. \nYou'll also want to keep an eye on such things as meaningful names, function sizes, principles like coupling and cohesion, object design, unit testing, and successive refinement, and so on. \nFurthermore, code should be easy to reuse and flexible. \nOne way to judge its readability is by coming back to it after six months and try and understand its purpose, if you can do so quickly then it can be considered readable. \nAs part of this you should turn off IDE to see if you can still read it. \nHowever, you should get a reasonably competent person, capable of maintaining software, to have a look at it in what is known as a peer review. \nAlso, if they correctly understand the design, layout and intent, you've done a good job. \nYou can also ask them to explain what the code does to as a further test. \nAlternatively, to really make sure, you could get a newer team member to have a looks and see if they can understand or even modify it to fix any defects. \nIn terms of maintainability, if your code follows the principles of SOLID and DRY and has a good set of unit tests around it, it is probably maintainable. \nIn short, if you can maintain it, its maintainable, even more so if someone else can do so without asking for your help. \nFinally, you should also consider code complexity, which is closely related to readability and maintainability. \nBasically, you don't want your code to be too complex and there are code complexity scoring algorithms out there, such as McCabe that can help you with this."},{"question":"how can i find broken symlinks","response":"Add the -L flag to your command will allow you do get rid of the grep: $ find -L . -type l. \nAdditionally, the symlinks command can identify various characteristics of symlinks, like whether they are dangling or not. \nHowever, some caution against using find -L because it follows all the symlinks, which can lead to searching through unintended directories such as \/usr\/share, potentially causing significant delays and other issues. \nAlternative approaches include using \"find . -xtype l\", which performs a test on a dereferenced link, and to detect broken symlinks without traversing into other filesystems, the command \"find . -type l ! -exec test -e {} \\; -print\" can be used. \nThis approach is considered safe and portable and even detects cyclic symlinks. \nFor those looking for a quick check, running \"find -L . -type l | xargs symlinks\" will provide information on a per-found-file basis. \nFor specific cases, such as not traversing outside a known directory, one might use \"find -L $path -maxdepth 1 -type l\". \nMeanwhile, for a simple, easy-to-remember method, the use of \"find . | xargs file | grep -i \"broken symbolic link\"\" or \"find . -print0 | xargs -0 file | grep -i \"broken symbolic link\"' to handle NULL terminators might suffice. \nFor zsh (Z Shell) users, a specific command, \"rm -v\" is available to remove broken symlinks."},{"question":"where can i download safari for windows?","response":"Apple has officially ended support for Safari on Windows and discontinued it. \nHence, in your case, it's recommendable to utilize a cross-browser testing tool to test your project. \nHowever, while it is no longer updated, Safari 5.1.7 for Windows can still be found for download from various sources including the official Apple download page and archive websites, such as wordsoftech."},{"question":"how can i change a file or folder icon using the terminal","response":"You'll need the Developer Tools installed, and then you might apply the graphic in icon.png to file.ext using a series of commands that start with making the image its own icon and end with cleaning up unnecessary resource files. \nWhen changing a folder's icon, instead of pointing Rez -append to the folder, you should target a special Icon\\r file. \nIf the Icon\\r file doesn't exist, it's created on the fly and should be hidden to prevent accidental deletion. \nYou can also use 'setfileicon', a utility by Damien Bobillot, to set icons for files or directories, for which the source code is available, and the binary can be made executable after downloading. \nAlternatively, MacRuby can change icons with a single line of code after installing it from its official site. \nInterestingly, Python code appears to be the best solution, offering various benefits over Apple's tools, such as not being limited by output file resolution, input file format, or installation permissions. \nFor newer macOS versions (10.14 and above), an error occurs when using 'sips -i'; hence, a workaround by converting the image to an ICNS format and appending the resource to the desired file is necessary. \nLastly, AppleScript can also customize icons by accessing Objective-C code through the AppKit framework despite the script's challenging readability."},{"question":"how do you unfreeze a htc phone?","response":"As per XDA, you can do a force restart on your phone. \nIf a reboot is not possible, call the phone from another phone and answer the call. \nWhen the call is terminated the phone might go back to normal. \nAnother option, could be to put the phone in a bright light, under a strong bulb, or in direct sunlight, and do a hard reset."},{"question":"why is my email not updating?","response":"It could be because your phone's memory is full."},{"question":"how to be notified when someone uses find my iphone?","response":"No, there is no way for them to know the device is being viewed through Find My iPhone."},{"question":"how long are texts saved on iphone?","response":"As of May 2016, texts on iPhone are stored for up to 30 days."},{"question":"https security - should password be hashed server-side or client-side?","response":"When utilizing an HTTPS tunnel, passwords or hashes should be protected against Ethernet surveillance. \nIt is often recommended that password handling be completed server-side to avoid security risks like leaving a terminal unlocked or exposing password hashing logic. \nAdditionally, if hashing is performed on the client side, the hashed password effectively becomes the password, rendering the hashing process moot, making it no more secure than storing raw passwords. \nClient-side hashing is typically considered only when there is an inherent distrust of the server, with preferential use being for situations where the password is reused on multiple sites. \nNevertheless, hashing server-side is crucial, and while client-side hashing can complement server-side methods, it should not replace them. \nHowever, reliance on client-side hashing necessitates handling scenarios where users have disabled Javascript because hashing the password client-side will require Javascript. \nLastly, hashing at the client side, when supported by the backend, means that the hash effectively becomes the password, which can be compromised in a hack. \nA potential solution is to hash passwords on the client side and then hash them again server side; this adds a layer of security against different attack vectors."},{"question":"is premature optimization really the root of all evil?","response":"The answer is that it depends. \nWhile optimizing is not inherently evil and is, in fact, a necessity, premature optimization is considered \"evil\" (or a \"little\" evil) if it leads to less clear code, significantly more code, less secure code, and wasted programmer time. \nFor some, about 97% of the time, premature optimization is viewed as the root of all evil. \nHowever, some say not all early optimizations are deemed evil, but micro-optimizations are if done at the wrong time in the development life cycle. \nOptimizing early is considered a sound engineering decision. \nBut others say that it's premature non-optimization that is more often considered the root of all evil."},{"question":"is https safe on public wifi?","response":"The security of HTTPS on public wifi depends on various factors. \nIn practice, HTTPS is considered entirely safe or fairly safe. \nHowever, its safety is contingent on trusting the certificates that come with your computer and authorizing only those certificates that you trust. \nOverall, the use of HTTPS can be considered secure in the context of public wifi."},{"question":"is a zip code considered pii?","response":"On one hand, some argue that by itself, a zip code cannot be classified as PII, emphasizing its standalone nature. \nConversely, others assert that a zip code is, indeed, personally identifying information. \nNotably, within the context of regulations such as HIPAA, a zip code is explicitly recognized as a HIPAA\/Safe Harbor identifier, acknowledging its significance in certain privacy frameworks."},{"question":"convert .mov to .mp4","response":"You can use Handbrake to convert .mov to .mp4 files, as well as many other formats. \nVLC can also do the same: Simply open it up, select \"File\" then \"Convert \/ Stream\" and load the video you want to convert, then choose the format you want and \"Save as File\"."},{"question":"can i see my cpu and memory usage meters in the menu bar?","response":"iStat Menus offers the required functionality and is purchasable for USD 14.39 for one license or $17.99 for a pack usable on up to five Macs. \nAnother alternative is MenuMeters, valued for its features and, despite being free, accepting donations. \nFor those preferring customization, Geektool enables the creation of unique geeklets or the use of existing ones from the internet. \nSystemPal, contrasting iStat by being quick, tiny, configurable, and powerful, is obtainable in the Mac App Store. \nAs a free, open-source option, CpuInfo is available on GitHub, though it is limited to displaying CPU information only. \nSimilarly, iGlance is another open-source alternative. \nAnother recommendation is Stats, a Simple macOS system monitor for the menu bar, an excellent open-source project installable via Homebrew. \nMenu Bar Stats 3 is also recommended as a useful tool. \nFor those who might not know, the Activity Monitor dock icon can be swapped with a graph detailing CPU usage, CPU history, network activity, or disk activity. \nLastly, eul, admired for its sleek design and configurability with widgets, can be installed through brew or from the Mac App Store."},{"question":"how should i distribute my public key?","response":"The recommended method for distributing a PGP key is to use one of the available key servers, such as keyserver.ubuntu.com or pgp.mit.edu. \nIn addition, you could consider uploading your key to a keyserver and then providing a link to it on platforms like LinkedIn or Facebook. \nAlternatively, you can publish your key on your own website, which allows for control over the key by enabling you to remove or update it as needed. \nAnother strategy involves publishing your public key and providing a public-key token through a secure channel to further authenticate yourself. \nAdditionally, uploading it to a keyserver or making an entry on a service like Biglumber can facilitate key signing interactions with other individuals. \nYou can also include a link to download your key in a blog post or use it to sign your emails."},{"question":"what is the difference between kali linux and debian?","response":"Kali is built upon Debian; however, it integrates some packages that aren't in Debian packages, alongside combinations from different Debian repositories. \nConsequently, replicating the Kali environment on Debian would require a substantial amount of work, including modifying package repositories, back-porting from other Debian repositories, and sourcing packages from other locations."},{"question":"where did the notion of one return only come from?","response":"The Single Entry, Single Exit (SESE) comes from languages with explicit resource management, like C and assembly. \nIt was a concept that originated with the Structured Programming revolution in the 1970s, influenced by the work of notable computer scientists like Edsger W Dijkstra, Ole Johan-Dahl, and Charles Anthony Richard Hoare."},{"question":"how do i set an environment variable on the command line and have it appear in commands?","response":"Use the command \"TEST=foo && echo $TEST\"."},{"question":"update bash to version 4.0 on osx","response":"Apple does not update to bash 4 due to GPL license restrictions, however, you can install bash 4 via Homebrew and even make it your default shell: after installing the newest version using Homebrew, add the new bash path to the \/etc\/shells file and use chsh to change your default shell."},{"question":"how to stop the find command after first match?","response":"Within GNU or FreeBSD's find utility, you can effectively stop the search after locating the first item by using `-quit predicate: find . ... -print -quit`, and with NetBSD, `find . ... -print -exit `. \nOther options include `find . -name something -print -quit` which terminates find after the first match after printing it, and `find . -name something -print | head -n 5` which terminates find after a specific amount of matches and print results."},{"question":"why does messages on osx always show unread messages?","response":"A simple solution is to create a script that handles messages; a simple one-line can be used, such as: \"tell application 'Messages' to clear unread messages.\"."},{"question":"allow setuid on shell scripts","response":"One solution to the problem is to call the shell script using a program that can use the setuid bit, similar to sudo functionality. \nAn alternative method is to create an alias for running sudo along with the name of the script, which, despite being more complex to configure, can reduce the need to repeatedly enter sudo."},{"question":"leaving intentional bugs in code for testers to find","response":"Leaving intentional bugs in code for testers to find is generally considered a bad idea. \nWhile some express a liking for the concept or believe that it is not necessarily bad, another opinion leans towards considering it difficult to do in any predictable way. \nFurthermore, some find such behavior to be blatantly unethical and impractical."},{"question":"how much can i trust tor?","response":"You cannot say Tor can solve all your problems, as there can be many ways to compromise your identity, so while Tor will be useful as one thread in a safety net, don't let it be the only type of thread in your safety net. \n\nTOR is probably to be recommended as it gives considerably more protection than browsing directly, but be aware that your ISP is in a position to see that your IP address is using Tor, even though it can't tell what you're using Tor for, so in hostile conditions where you could be brought under suspicion simply for appearing to be clandestine, then you should take care to use Tor everywhere, except on an Internet connection which can be strongly associated with you."},{"question":"how can someone go off-web, and anonymise themselves after a life online?","response":"It is not really possible to remove yourself entirely because the web is like a big memory that cannot forget. \nAnything you ever wrote or published on the internet is there forever; trying to remove it is futile. \nMost services, including Facebook and Google, do not permit removal at all and, even if some do, it is just a declaration because they merely hide that data. \nA recent development in this area is that the European Court of Justice backed \"a right to be forgotten\" in a case against Google. \nOne option you have is to make it so confusing (use misinformation) that it becomes difficult for anyone to connect the dots. \nChange your identity, country (to one where records are not systematically processed) and life pattern, and then try not to be discovered. \nEntirely change your name, behavior, appearance, your country, and your friends so there is no correlation between data prior to the change and post-change. \nYou can also deliberately poison the results of any data analysis by making random or deliberately wrong choices on a significant number of your daily activities. \nNaturally, it helps to reduce the signature you leave around to begin with, e.g. use cash, don't leave pictures online. \nAnother option is to become a hermit living near the pole of inaccessibility in Africa for the next 10 years. \nBasically, if you want to stay anonymous on the internet, log off."},{"question":"are ssl certificates port specific?","response":"Certificates are not linked to specific port numbers and do not include the concept of \"port\" as part of their identity."},{"question":"how to disable adobe core sync app on os x from being launched automatically?","response":"To disable the Adobe Core Sync app on OS X from being launched automatically, the best way is to use launchctl directly or an application like LaunchControl. \nAdditionally, you can disable the Finder Sync extension associated with the app by navigating to the System Preferences, then to the Extensions pane (grey puzzle piece icon), and unticking Finder under the app name in question."},{"question":"why is my host name wrong at the terminal prompt when connected to a public wifi network?","response":"When connected to a public WiFi network, your Mac may pick up a hostname from the DHCP server. \nIf you notice that the hostname is incorrect, it might be associated with a workgroup from a previous connection, possibly through a corporate VPN. \nIn such cases, you can use the sudo scutil command to manually set your hostname and resolve the issue."},{"question":"executing chdir before starting systemd service","response":"For systemd versions 227 and higher, use [Service] WorkingDirectory=\/usr\/local in the configuration."},{"question":"what is the website checking about my browser to protect the website from a ddos?","response":"The process for determining if a connection is valid through using filters involves checking various details, such as the origin of the connection, packet type, size, rate, and the user agent. \nTo differentiate between authentic browser requests and automated DOS attack bots, the system assesses if the HTTP client is a genuine browser, possibly by comparing behavior against a set of tests. \nIt has been observed that Cloudflare\u2019s system blocks non-graphical browsers, indicating that these text-based clients cannot properly load or display certain web elements like images, and they do not support JavaScript."},{"question":"is there an easy way to replace duplicate files with hardlinks?","response":"To identify and manage duplicate files on a Unix-based system, you can use 'duff -r target-folder', which allows you to rapidly find duplicates and run a specific command to produce hard links automatically to these files. \nSimilarly, 'SmartDupe' is an option for users on Mac or Unix systems that can replace duplicates with hard links. \nIf you seek a more advanced tool, 'rdfind' could be your choice as it offers functionality like deleting duplicates or replacing them with soft\/hard links and supports different checksum algorithms. \n`Apt show hardlink` can detect and replace multiple copies of the same file with hardlinks. \nLastly, 'jdupes' is a fast-running using the command: `jdupes -rL \/foo\/bar."},{"question":"on os x, what files are excluded by rule from a time machine backup?","response":"On OS X, Time Machine, Applications can instruct Time Machine to ignore particular files. \nAdditionally, there is a predefined list of built-in exclusions stored in \/System\/Library\/CoreServices\/backupd.bundle\/Contents\/Resources\/StdExclusions.plist. \nThe root folders of snapshots maintain a property list that includes folders excluded from the snapshot. \nTo check whether a file or directory is excluded from backup, you can use commands like xattr (xattr path_to_file_name) or mdls (mdls path_to_file_name), but the most effective method is utilizing tmutil, as it comprehensively checks whether the item is on any exclusion list."},{"question":"whats the purpose of the randomart image for user (not host) ssh keys?","response":"The primary function of SSH keygen randomart is to ease the process of validation. \nAdditionally, randomart is a lot easier for humans to differentiate between than long strings of hex code."},{"question":"displaying combined file size of selected files in finder","response":"To display the combined file size of selected files in Finder, you can use \u2318+\u2325+I instead of \u2318+I to see the information. \nAnother method is to select the files, right-click, hold the alt key, notice the menu options change, and then select 'Show Inspector'."},{"question":"how can i capture traffic on cisco ios switches?","response":"If your traffic happened to be passing through a router running Cisco IOS 12.4(20)T or greater, another possibility is to use the Embedded Packet Capture feature."},{"question":"what does it mean when the connectivity icons in the status bar go white\/gray?","response":"When the connectivity icons in the status bar turn white\/gray, it indicates a lack of connection to Google's servers for sync services, as mentioned in the Android 2.3 Users Guide."},{"question":"linux where are acls stored?","response":"In Linux, Access Control Lists (ACLs) are stored as metadata in the file inodes, similar to traditional permissions, dates, and so on. \nThe ACLs can vary in size, and as a result, they are typically stored in separate data blocks on the disk or within the file system. \nSpecifically, each shadow inode is responsible for storing an ACL in its data blocks."},{"question":"reason for both a mac and an ip address","response":"The IP address and MAC address serve different (but crucial) purposes, so even if your computer has an IP address, it still needs a MAC address to find other machines on the same network: the MAC address gets a frame from one Network Interface Card (NIC) to the next; the IP address gets a packet from one Computer to the Server. \n\nA Mac address is the physical or virtual address of your NIC card or network interface (from a computer on a network's standpoint, it is the physical address of that computer's NIC card), and is used to bring information to that computer on Layer 2 of the OSI model, while the IP address is required on layer 3 to communicate with computers on different subnets and devices (the IP address verifies \"where\" the device is located within a network). \n\nIt is easy to group TCP\/IP addresses, but it is necessary to translate the TCP\/IP address to the MAC address."},{"question":"how to open a new tab in iterm in the same folder as the one that is open?","response":"To open a new tab in iTerm in the same folder as the one that is open, you can choose \"Reuse previous session's directory\" in the profile preferences. \nAnother option is to click on \"Advanced Configuration,\" and then \"Edit\" to set the working directory separately. \nAlternatively, if your preference is to start in the home directory and then navigate to the current directory as needed, you can achieve this by using the open . -a iterm command."},{"question":"how to determine what type of encoding\/encryption has been used?","response":"In identifying hash types, leveraging experience to make educated guesses is a common approach. \nOne key aspect is to analyze specific characteristics, such as the hash\u2019s length and the alphabet used. \nGuessing is one approach, but it becomes more accurate with time and experience. \nThe only irrefutable method is if the metadata provides clear information regarding the algorithm used. \nOtherwise, the \"normal\" way is examining the application code or engaging in reverse engineering offers the potential to deduce the hashing algorithm. \nExperience plays a critical role in recognizing certain encoding types, like Base64, on sight. \nUtilizing search engines like Google might also aid in cracking simple password hashes."},{"question":"should the variable be named id or id?","response":"When considering the use of \"ID\" or \"Id\" across different coding practices, it's crucial to apply one approach consistently. \nMicrosoft specifically recommends using \"Id\" in the context of .NET class libraries. \nWhen contrasting programming languages, such as Java\u2019s conventions for naming classes versus those in C#, \"ID\" is recommended for Java, while \"Id\" should be used in C#."},{"question":"how can i combine multiple pdfs using the command line?","response":"You can use a tool called pdfunite, which is a component of the Poppler package, to merge multiple PDF files into a single document."},{"question":"how do i speed up new terminal tab loading time?","response":"To improve your new Terminal tab loading time, consider reducing your history to a range of 4,000 to 10,000 lines, and try exiting and discarding any saved window configurations. \nAlternatively, create a blank file entitled .hushlogin in the home directory within the Terminal.app, which should help decrease the load time of a new Terminal tab by suppressing certain process that happen during loading. \nSimilarly, configuring Terminal to start with a non-standard shell and creating a symlink to your preferred shell can also mitigate delays associated with the ASL system log lookup. \nIf you're using Active Directory, enabling the \"Create mobile account at login\" option in the AD service settings via Directory Utility may resolve issues related to your AD credentials by storing them locally."},{"question":"how to monitor cpu\/memory usage of a single process?","response":"If you know process name you can use top `-p $(pidof )` to monitor CPU\/memory usage."},{"question":"how can i fix cannot find a valid baseurl for repo errors on centos?","response":"You could try adding these entries to: \/etc\/resolv.conf: nameserver 8.8.8.8 nameserver 8.8.4.4. \n\nDelete the contents of \/etc\/yum.repos.d\/remi.repo and then execute # yum update. \n\nThis can be resolved by editing the \/etc\/yum.conf file to add the following line (change the port number if it is not 8080): proxy=http:\/\/xxx.xxx.xx.xx:8080. \n\nYou can edit the network interface, for example, using eth0 in CentOS 6.X, or in CentOS 7, use the \"ensxxx\" interface. \n\nFinally, you can use the Vault repo command where everything has been moved, so in CentOS 6, do: curl https:\/\/www.getpagespeed.com\/files\/centos6-eol.repo --output \/etc\/yum.repos.d\/CentOS-Base.repo."},{"question":"what i can delete from \/private\/var\/vm?","response":"The folder and files within \/private\/var\/vm, including swap files, are actively used by the operating system and generally shouldn't be removed. \nOne exception is the sleep image file: although you're able to delete this, it's not recommended to do so. \nYou can delete it by using the command sudo pmset -a hibernatemode 0, which will switch your Mac to a traditional sleep mode and will stop recreating the file upon sleep. \nDeleting this file is safe, but be aware that it will reappear after the system goes into sleep mode again."},{"question":"what is the benefit of gits two-stage commit process (staging)?","response":"Having full control over the selection and commitment of files or lines to a repository is a clear benefit attributed to git tools. \nThe specific feature that allows committing only portions of changes can streamline the development process, particularly when dealing with multiple or complex changes that may not all be ready for commitment at the same time."},{"question":"what is the difference between the terms data structures and abstract data type?","response":"An ADT (Abstract Data Type) is more of a logical description, while a Data Structure is concrete. \nAdditionally, ADT is to an interface or what it does while a data structure is to a class."},{"question":"are #regions an antipattern or code smell?","response":"The use of #regions in code has generated diverse opinions within the software development community, with some considering it a sign of code smell. \nParticularly, a method with an extensive number of lines or regions is identified as a clear indication of a code smell. \nWhile the term \"anti-pattern\" is commonly associated with program logic or design patterns, it's argued that the use of regions is more aligned with the layout of a text editor, making it less fitting for such classification. \nA rule of thumb is proposed, suggesting that having more than five regions in a file can be considered a code smell. \nThe concept of #region blocks is likened to \"Febreze for code,\" serving to conceal code smells rather than addressing them directly. \nMoreover, software engineering that may be commonly used but is ineffective and\/or counterproductive in practice regions are anti-patterns."},{"question":"how secure is chrome storing a password?","response":"Chrome, under Windows, employs encryption for stored passwords using Data Protection API (DPAPI), which is considered secure as it is tied to the user's login credentials. \nHowever, Chrome has a vulnerability to password dumping, requiring technical expertise or malware for exploitation, indicating that general browser password storage is only safe from non-technical individuals."},{"question":"can zsh run bash scripts?","response":"Scripts that start with the shebang #!\/bin\/bash will execute using bash, irrespective of whether your default shell is zsh. \nNo, if you use zsh, you might encounter syntax differences from bash, and you'll need to be aware of the unique features and limitations of each shell. \nIt's also possible to switch between bash and zsh if needed for compatibility or preference."},{"question":"what really is the business logic?","response":"Business logic in an application refers to the programming that implements the business rules provided. \nIt is the part of the program that dictates how data can be created, stored, and changed, how business objects interact, and the methods by which they are accessed and updated. \nThis logic is also the part of the code that handles input and processes it within the defined parameters of the program, essentially carrying out the business rules. \nBusiness logic, encompassing both data validation and program operations flow, determines what actions can be performed with the data and specifies the allowable transformations. \nIt is distinct from user interface mechanics and involves rules applicable even in non-digital transactions, such as when to apply sales tax."},{"question":"what does the @ mean in ls -l?","response":"It indicates that the file\/directory has extended attributes, other than ACL."},{"question":"where did the wheel group get its name?","response":"Information from Wikipedia indicates that the term is derived from the slang term \"big wheel\" is a slang used referring to a person with great power or influence; the term comes from BSD. \nMoreover, the term \"big wheel\", a popular expression after World War Two, is further associated with the phrase \"rolled a big wheel,\" indicating importance and influence, commonly used by mechanics."},{"question":"how to search for android apps without ads?","response":"You could consider using Yalp or Aurora, a fork of Yalp available on F-droid, which offers multiple search filters to enhance your experience. \nThe Playsearch website also offers you the option to search for apps with specific criteria without the need to install anything. \nAppFilter, a new website currently in beta, offers a platform to search for apps applying filters for numerous features and is free to use."},{"question":"copy text from one tmux pane to another (using vim)","response":"In the context of copying and pasting text, it's possible to use the system clipboard with \"*y and \"*p rather than the normal (y) and (p) commands. \nWhen working directly in Vim, `vim copy paste` is usually preferable to avoid issues like copying irrelevant text such as line numbers or marks in the gutter. \nAnother approach is `Enter Copy Mode: +[ Start copy: Copy text: Paste text: +]` is an effective method. \nIn Tmux, using keyboard shortcuts like Ctrl+Alt+C and Ctrl+Alt+V will also work."},{"question":"how does an event listener work?","response":"An event listener akin to an e-mail newsletter subscription. \nA succinct answer is the application receives a signal, or event, and the routine is only called at that point. \nAn event listener does not check if the button is pushed at all, instead, it gets called when the button is pushed. \nThe event listener looks out for event firings. \nThere are two main strategies to check if an event happened: the pull and push. \nThe pull approach, also called polling, is simpler and can be implemented it without any special feature, while the push approach is generally more efficient since your code only runs when it has something to do. \nMost event loops are built above some polling multiplexing primitive provided by the operating system. \nIn a purely polling based system, subsystem that might want to know when some particular action happens will need to run some code any time that action might happen."},{"question":"isnt inactive memory a waste of resources?","response":"In Mac OS X memory management, \"wired\" memory is essential for system operations and is always retained in RAM, while \"active\" memory is currently being used by programs; \"inactive\" memory contains data that has been read from slower storage and which may be needed again soon by programs, and can improve performance for repeated tasks. \nIf a Mac has a fast solid-state drive (SSD), it can operate effectively with a smaller proportion of \"free\" and \"inactive\" memory before experiencing slowness, compared to a Mac with a slower hard drive. \nHowever, in some cases, like with the latest version of Mountain Lion, users have reported issues where \"inactive\" memory is not being reclaimed efficiently when \"free\" memory is low, signaling a potential application issue or a bug within the system."},{"question":"my school wants to keep the details of our door authentication system a secret. is that a good idea?","response":"Obscurity isn't a bad security measure to have in place. \n\nHowever, some dispute that it is definitely a good thing, and say security by obscurity is bad on the grounds it may lead to complacency, but when obscurity is added as a layer on top of other controls, it can be absolutely legitimate."},{"question":"is there some ssh server for android?","response":"For those who need an SSH server on their phones, there are several options such as SSHDroid, QuickSSHD, and Dropbear available, with some requiring no root access like SSHDroid and QuickSSHD. \nAnother method to utilize an SSH server is by initiating it via a command or configuration file instead of a frontend app. \nAlthough some options like Dropbear in CyanogenMod releases may assume the server runs by root, adjustments can be made to allow operation without root access."},{"question":"can adblock plus be trusted?","response":"It is generally accepted that Adblock is safe and especially useful for inexperienced users. \nHowever, some people recommend against installing any such software that can access your data. \nOn the other hand, it's widely accepted that Adblock Plus in particular is not malicious and has a proven track record of preventing malware from being installed on users' computers. \nFurthermore, the Plus version is well understood and was developed by a team that has a history of protecting the interests of its users. \nAlso, it's open-source, so the source code is available for you to examine yourself for any security issues."},{"question":"remember window sizes and placement when unplugging and replugging second monitor","response":"In Windows 7, setting all DMMEnableDDCPolling values in the registry to 0 resolves the issue. \nFor Mac users, saving a small AppleScript in a permanent location on your computer can assist in managing window positions across monitors."},{"question":"is there a mac os x terminal version of the free command in linux systems?","response":"On Mac OS X, to view memory usage, you can utilize a terminal command akin to 'free', called 'top'. \nWhile no exact equivalent of 'free' comes with Mac OS X, alternative methods such as using 'system_profiler' or 'sysctl' commands can provide similar information."},{"question":"sort and count number of occurrence of lines","response":"To sort and count the number of line occurrences, you can use an associative array on \"awk\" and then optionally sort as follows: `$ awk ' { tot++ } END { for (i in tot) print tot,i } ' access.log, then sort output: 1 c.php 1 d.php 2 b.php 3 a.php."},{"question":"tool to quickly hide\/blur\/redact text in screenshot?","response":"Skitch is capable of performing the task quickly. \nSelect the blur tool in the sidebar to blur text or images in Skitch and apply it to your desired area. \nfacepixelizer.com is recommended for its \"intelligent\" text blurring feature, which adjusts blurring based on the text's font size and is available as a free online web app. \nMoreover, Sketch 3 is highlighted as a brilliant application that allows you to save styles for frequently used settings, like a certain level of opacity and background blur. \nFor more complex or versatile editing tasks, GIMP is recommended due to its flexibility, and it provides various ways to achieve a blur effect."},{"question":"iterm - going one word backwards and forwards","response":"Ctrl-[ b jumps back a word or you can use Esc instead or Ctrl-[, and f to go forward. \nUse Alt-f for forward and Alt-b for backward. \nAfter editing preferences to select natural text editing, you can move a word backwards using Option \u2325 + \u2190 and a word forwards using Option \u2325 + \u2192. \nIn vi mode, hit Esc, then b to move one word backward (w for forward)."},{"question":"sort based on the third column","response":"For scripting purposes with awk, one can use the Velour library with the syntax, #!\/usr\/local\/bin\/velour -f { q = $3 z = $0 } END { a_sort_by(q, z) io_puts(q) }. \nWhen working with delimited data, such as with a colon delimiter, you can use the sort command, sort -t : -k 3 filename, to organize the data by the third field."},{"question":"is adblock (plus) a security risk?","response":"The campaign by GMX against ad blockers is not justified, as they falsely claimed there was a security risk when there was none. \nAdBlock is more inclined to preserve user privacy rather than compromise it. \nThe real danger is malicious ads that trick users into installing harmful software. \nCurrently, the AdBlock extension is safe, and the potential risk of its update, including malicious code is minuscule. \nWhile all software bears some risk, AdBlock (Plus) could be considered a potential security threat. \nThere is an inherent risk in modifying web page contents, which ad blockers like AdBlock do, and ad blockers can decrease anonymity as well, potentially leading to security breaches. \nAny remote updatable software inherently contains a 'backdoor' for updates, even if it is locked down to specific \"trustworthy\" update URLs, yet AdBlock Plus is not malicious; security is ultimately in the hands of the user."},{"question":"do alarms play through headphones?","response":"There's no native setting that will do this, but you could download a third party app to implement it."},{"question":"is multicast on the public internet possible? and if yes: how?","response":"You cannot multicast on the public Internet, but you can multicast across the public Internet to another site by using a tunnel that supports multicast."},{"question":"is it acceptable that a skilled professional pentester deletes or modifies sensitive data in production unintentionally during a pentest?","response":"There's no way that a pentester can 100% assure that data will not be modified or deleted, in the same way as they can't assure that system availability won't be affected, and there are no absolute guarantees something will not accidentally be deleted when you are trying to break things. \n\nYes, it is acceptable for data to be modified and this should be on page 1 of the contract, as the client company needs to prepare for things to go wrong, making backups and recovery plans; if the site is really, really critical, create a complete clone on a different server, then test that clone first."},{"question":"are ipods still supported by itunes?","response":"According to Apple Support, the iPod Classic is no longer compatible with current software versions and is not supported by them. \nHowever, iPod Classic devices can still function if older versions of iTunes software are installed on a Windows PC, as some users have successfully done. \nIt's been noted that depending on the system configuration, the iPod Classic may still work with certain versions of iTunes and Windows. \nTo manage music on an iPod Classic, a third-party application may be required, as support for the device has been discontinued in recent versions of iTunes."},{"question":"battery life and first time charging on li-ion batteries. myth?","response":"Lithium-ion batteries do not require full charging, unlike lead-acid batteries, and it is better for the battery's longevity if they are not fully charged, as high voltages can stress the battery. \nThe advice from sellers regarding old batteries doesn\u2019t apply to modern lithium-ion or lithium-polymer batteries; these are designed to be charged frequently and perform best when charged often. \nRegarding the initial charge, it is important to fully charge the battery to ensure the proper formation of the SEI layer, which can influence the battery's long-term performance, a practice supported by research and not considered a myth."},{"question":"locate vs find: usage, pros and cons of each other","response":"Locate uses a prebuilt database, which should be regularly updated, while find iterates over a filesystem to locate files; locate has one big advantage over find: speed, but it can be inaccurate if the database has not been updated. \n\nLocate typically lists all files matching your pattern, leaving it to grep filtering and similar to cut this down to size, while find can do things to files it finds, one such operator being -exec. \n\nFind is not intuitive for a novice or occasional user of Unix, and, historically, some versions didn't have the -print option as the default; locate is less flexible, but far more intuitive to use in the common case."},{"question":"change location of macos notification center alerts?","response":"It is not currently possible to adjust the screen location of the Notification Center Alerts and Banners."},{"question":"disable iphoto auto launch when connecting an iphone or ipad","response":"To disable iPhoto auto launch, Open application \"Image capture\", select your iPhone, press the triangle in square symbol in the lower left corner, then choose \"No application\" in the droplist under \"Connecting this iPhone opens:\"."},{"question":"attacking an office printer?","response":"It is rare for a business need to keep a printer accessible outside the firewall AND the VPN, and it seems odd that you might have a case for it; it is an attack point and increases the attack surface of your network. \n\nSince printers have a full-blown micro-controller in them, it is theoretically possible that just about any attack that could be done with a computer or open network jack on your network could also be done from the printer, but the risks can be managed by keeping them updated, turning off options that are insecure like http, and changing the admin passwords. \n\nA better solution is to allow external support staff to only connect to a bastion host, and connect to the copier\/device from there."},{"question":"what is the difference between libreoffice and libreoffice vanilla?","response":"LibreOffice Vanilla and LibreOffice Fresh are nearly identical, with the key distinction being that the Fresh version prompts for a donation during download. \nMoreover, LibreOffice Vanilla for Mac lacks certain Java-based features, which leads to the omission of the HSQLDB engine in Base, as well as some reporting features, and Java-based extensions are also unsupported. \nAdditionally, at the time this was documented, LibreOffice Base did not have full support for M1 Silicon Macs, whereas Vanilla did support these newer Mac models."},{"question":"is it possible to find out the hosts in the known_hosts file?","response":"Each \"known_hosts\" line starts with the host string or IP before \"ssh-dss\" or \"ssh-rsa\". \nIf your ssh_config file has HashKnownHosts set to \"yes,\" causing hostnames to not appear in plaintext, there's a command you can use: 'ssh-keygen -H -F hostname' to search for a specific hostname, or if SSH runs on a port other than 22, the command would be ssh-keygen -h -f '[hostname]:2222'. \nWhen dealing with hashed IPs and hostnames in a known_hosts file, you can employ a Perl script: 'nmap -sL -Pn -n 192.168.0.0\/16 172.16.0.0\/12 10.0.0.0\/8 |\\ grep '^Nmap scan report for' | cut -d\\ -f5 >ips.list' for brute-forcing or leverage John the Ripper's support for known_hosts cracking, which is more efficient for complex cases. \nAdditionally, the -F option in ssh-keygen can locate a hostname in your known_hosts file."},{"question":"how do i display log messages from previous boots under centos 7?","response":"Using the command `systemctl restart systemd-journald` will restart the systemd-journald service, but you may lose your logs. \nTo prevent issues with log file permissions, it's crucial to ensure that the `systemd-journald` group owns the journal directory. \nAfter creating the directory with `mkdir \/var\/log\/journal`, you should run `systemd-tmpfiles --create --prefix \/var\/log\/journal` to correctly set the group and setgid bit on the journal directory, as this is not automatically adjusted by `systemd-journald` after version 208."},{"question":"why zsh ends a line with a highlighted percent symbol?","response":"This happens because it is a \"partial line,\" and by default, ZSH goes to the next line to avoid covering it with the prompt. \nAlso, It's a specific feature of ZSH (and now fish as well) designed to make unterminated lines in a command's output visible."},{"question":"is putty linux or unix?","response":"PuTTY, which has been ported to Unix and Unix-like systems, is known as pterm on these platforms."},{"question":"what is the difference between ethernet wan and lan?","response":"The differences between LANs and WANs tend to be at the physical and data-link layers.\nA LAN is typically something completely within your own premises. \nIn contrast, a WAN is something that connects between geographically separated locations. \nBecause of the shorter distances involved, LANs tend to be built on Ethernet and other 802.3-family physical layers and data links. \nDue to the technical hurdles associated with moving lots of data long distances reliably, WAN links tend to be lower bandwidth and higher latency than LAN links."},{"question":"how to move phone contacts to google?","response":"To transfer contacts on a HTC Hero 2.1, you should press the menu button, select \"Import\/Export,\" and then choose \"Import from SIM card\". \nOn any Android device, you can use vCardIO to import-export any vCard 2.1 formats, whether they contain single or multiple contacts. \nFor Samsung Galaxy S phones, you can export contacts to the SD card and then, through a browser, import them to Gmail, which synchronizes them back to the phone as Google contacts. \nContact Remover Plus on the other hand is an option that allows moving contacts between different accounts, including social media, and provides a solution for duplicate contacts. \nWith Galaxy devices, you can also go to your contacts list, choose Merge Accounts, and then merge with your Google Account for a cloud backup. \nAnother way could be to email the contacts to yourself and then import them to the desired account on your new phone. \nAlternatively, you can merge contacts directly with your Google account through the contacts menu, which will then sync these contacts to Gmail if sync is enabled."},{"question":"strategy for keeping secret info such as api keys out of source control?","response":"Your secret information should not be stored in your code. \nInstead, it should be placed into a configuration file that your code reads at startup. \nTo maintain secrecy, the configuration file itself should not be under version control unless they are \"factory defaults,\" which should be devoid of any private information. \nA local branch can be used where 'TEMPLATE' is replaced with 'DATA,' or smudge\/clean filters can serve for bidirectional replacement of these terms. \nAnother approach is to set private or protected keys as system environment variables, which keeps them out of the code and correlates with the usage of different property files for distinct environments. \nEncryption is also recommended, with a master key as a password provided at the console, and configuration should be separated from code for continuous delivery. \nEnvironment variables are particularly useful for secrets that differ across servers. \nWhen it comes to public repositories, your source code may be stored there, but not the KEY, which should be placed in the configuration file by the developers using your code. \nA strategy using .gitignore helps protect sensitive configuration files by not making them public, and this is enhanced with the use of a private git server or submodules for configuration management. \nEncrypted files can be committed, with a passphrase required upon system launch, or stored in a non-committed file. \nDuring version control check-ins, strategies like searching for strings with high entropy or monitoring for constant assignments to variables named 'password' can help keep secrets safe. \nIt's important to store files containing secrets outside of the source tree or use environmental variables as an alternative method to safeguard valuable information from developers."},{"question":"how to grep standard error stream (stderr)?","response":"The rc shell is the preferred tool for managing stdout and stderr, where you can discard stdout and pipe only stderr to grep, with a simple syntax."},{"question":"virtualbox 5.1.28 fails to install on macos 10.13 due to kext security","response":"If you're experiencing issues with the \"allow\" button, reboot into safe mode and use the command line `sudo spctl --master-disable` to bypass the problems you are encountering."},{"question":"what is the difference between a function and a feature?","response":"\"Function\" is the purpose, and \"Feature\" is a product behavior that a user can interact with."},{"question":"what is the difference between inner join and join?","response":"Join and Inner Join are the same. \nThe inner keyword is optional as all joins are considered to be inner joins unless otherwise specified."},{"question":"is android showing app ads in share menu now?","response":"Microsoft was reported to be misusing Android's share sheet by including advertisements to its applications with Reddit and Android Police links. \nThis activity is a breach of the policies regarding monetization and advertisements."},{"question":"does https prevent man in the middle attacks by proxy server?","response":"A proxy cannot decrypt data when HTTPS is used, provided that users do not bypass certificate warnings and are running an unmodified client. \nIn the context of HTTPS, a proxy may be able to obtain a certificate, but without the corresponding private key, it cannot decrypt the data being exchanged between the client and the web server. \nWhile a proxy can block HTTPS and only allow HTTP, most browsers won't detect this unless they employ HSTS, which isn't widespread."},{"question":"copy specific file type keeping the folder structure","response":"To duplicate .csv files while maintaining their directory structure, you can utilize the combination of find and cpio in pass-through mode: '-name '*.csv' | cpio -pdm \/target '. \nAnother approach for this task is using rsync: `$ rsync -a --prune-empty-dirs --include '*\/' --include '*.csv' --exclude '*' source\/ target\/` or `$ rsync -a --include '*\/' --include '*.csv' --exclude '*' source\/ target\/` which keeps empty directories from the source tree. \nThe rsync manpage suggests using the -R or --relative option to replicate the entire directory path of the files. \nFind command options include: `find . -name '*.csv' -exec cp --parents \\{\\} \/target \\;` and `find -name \"*.csv\" | xargs cp --parents -t \/target`."},{"question":"why doesnt my bash script recognize aliases?","response":"Shell scripts cannot utilize aliases that are not defined within them. \nPrimarily because aliases defined in a location like ~\/.bashrc are not automatically transferred to scripts like your_script.sh, except when ~\/.bashrc is sourced in the script itself, which is generally not recommended despite there being proper methods to do so."},{"question":"secure way to log in to a website on someone elses computer","response":"Some people don't think there is a secure way to log into a website on a computer under someone else's control (which may have a key\/click-logger installed), but others have suggestions, including: using a \u201chave\u201d factor of authentication, such as TOTP or a mobile app to approve logins; booting from a live USB stick using a linux distribution such as Tails live, Ubuntu, puppy linux or Kali linux; or logging on a device that is under your control, and transfer the session cookie you receive from that device to the untrusted computer, so your password is never entered on the untrusted computer, and cannot be recorded\/captured, and the session cookie will be invalidated when you log out using the trusted device once you're done. \n\nIt is also suggested to use a different keyboard, if possible, to avoid devices that take the sounds of individual keys being pressed to decipher which key it was (and also to unplug any microphones connected to the computer, just in case)."},{"question":"how can i find the implementations of linux kernel system calls?","response":"Not all system calls involve the VFS, which means their call chains in the kernel do not necessarily begin in fs\/namei.c. mmap(2), as is the case with mmap(2) which starts in mm\/mmap.c. \nSystem calls are often encapsulated within the SYSCALL_DEFINEx() macro, resulting in their names not being easily searchable via simple grep due to macro expansion; for example, SYSCALL_DEFINE2(mkdir) ultimately becomes sys_mkdir. \nTo locate the true kernel implementation of a system call like mkdir, searching both the kernel sources and the system calls is necessary. \nA useful resource for exploring Linux kernel sources is the Linux cross-reference (LXR), which provides more in-depth search results than grep and is notably faster."},{"question":"torvalds quote about good programmer","response":"According to Torvalds, a good programmer places significant emphasis on the overall high-level design, prioritizing data structures and their relationships over implementation details. \nUnderstanding the intricacies of how data flows within a system is considered crucial by Torvalds, highlighting the importance of grasping these concepts for effective problem-solving. \nIn his perspective, a programmer's ability to comprehend the things that will solve the problems they are facing is crucial. \nTorvalds contends that it is the mastery of data structures that truly sets apart a skilled programmer."},{"question":"should you keep a copy of all the code you write?","response":"Yes, you can retain the code you write, as well as entire projects."},{"question":"how do i combine two or more images to get a single pdf file?","response":"To merge images into a single PDF file using Preview on a Mac, make sure the Drawer is open, and drag the image into the Page Thumbnail section. \nFor multiple images, select all images you wish to include, right-click, open with Preview, and then arrange them in the desired order in Preview's Sidebar. \nFor incorporating separate PDFs into one file, select the thumbnails view and drag the second PDF from your Desktop into the thumbnails pane. \nAnother method is to use imagemagick, which you can install via homebrew. \nYou can also use Automator to create a PDF from multiple images. \nTo do so: Create a new Workflow, then Under Actions, Library, Files & Folders add the Get Specified Finder Items as a step. \nThen, on the bottom of that step click on Add and select the images, next, under Actions, Library, PDFs add the New PDF from Images and you will find your new PDF in the Results tab."},{"question":"is it ok to split long functions and methods into smaller ones even though they wont be called by anything else?","response":"Splitting long functions into shorter ones is a common practice and is recommended as a better way to write code. \nThis approach is endorsed by authors like Robert C. Martin, who suggests using descriptive function names to make the code self-explanatory. \nAdditionally, maintaining Locality of Reference, which refers to the organization of related code in proximity to each other, can greatly enhance the readability and understanding of the code. \nBalancing these aspects is crucial, and avoiding absolute rules such as 'always' or 'never' is typically advised."},{"question":"what are ctrl m characters?","response":"It is known as carriage return."},{"question":"how can i use my pcs keyboard on the android emulator?","response":"To enable the keyboard in your Android emulator, you should modify the config.ini file located in your .android directory. \nIf you're building the emulator from source, modify the property in the \"external\/qemu\/android\/avd\/hardware-properties.ini\" file by changing the default value from \"no\" to \"yes\" in the \"hw.keyboard\" section, and subsequently rebuild using the \"make\" command."},{"question":"vtdecoderxpcservice taking cpu","response":"Quit your applications one by one and monitor the process. \nCommon culprits include Safari or iTunes, and it's possible to pinpoint the specific application by observing the CPU usage. \nSome users have identified Photos as the trigger of this service. \nIn some instances, quitting iMessage (Messages) or FaceTime has resolved the issue by ending the process. \nAn alternative approach involves conducting a spindump via the activity monitor, leading to the discovery that Firefox, specifically when playing HTML5 videos, is responsible. \nWhen dealing with Photos, use the \"pause for one day\" button within the app's iCloud tab preferences to halt the face recognition process and normalize the system's behavior. \nLastly, using the Energy tab of the Activity Monitor to spot the highest energy-consuming app is another simpler solution compared to spindumping."},{"question":"what is negative code?","response":"Code optimization often involves reducing the amount of code, achieved by eliminating unnecessary parts or using more concise programming constructs. \nAchieving the same functionality with less code is an objective shared among programmers."},{"question":"how can i delete all lines in a file using vi?","response":"Navigate to the first line using \"1G\" and then delete all lines up to the last one with \"dG\". \nAlternatively, in the vi editor, you can use \":1,$d\" to delete from the first to the last line. \nIf preferred, the shorthand \":%d\" can be employed in vi, which means to delete all lines. \nAnother method is to issue \"gg\" to go to the top of the file before performing \"dG\" to delete every line until the file's end. \nA similar approach that selects everything in the file is to use \"ggVG\" and then press \"d\" or \"x\" to delete everything. \nFor a simple route, \"ggdG\" is a five-key command in vi that accomplishes the same result. \nOne could also utilize \" :!:>%\" in vi to execute a shell command to truncate the current file. \nA non-vi command to achieve file truncation is \"truncate -s 0 file\". \nLastly, typing \"and %d\" within vi also clears the file's content."},{"question":"what linux distribution is android based on?","response":"Android has very little in common with typical Linux distributions and functions as an entirely new system despite using the Linux kernel. \nUnlike conventional GNU\/Linux distributions such as Debian, Arch Linux, or Gentoo, Android is not derived from any of them and does not follow the typical GNU\/Linux format."},{"question":"zip the contents of a folder without including the folder itself","response":"The command `zip -r ..\/zipped_dir.zip` can be used to quickly and easily create a zipped directory from the current folder. \nIf you prefer not to include the 'root_folder' in the zipped file, use the `-j` option like this: `zip -r -j zipped_dir.zip folder\/*`. \nTo avoid creating directories inside the zip file, you can use the `-D` flag as follows: `zip -r -D zipped.zip *`. \nAlternatively, for creating a zip archive that includes the root directory along with all files and directories inside it, including hidden ones, the `7z` command would be `7z a zipped.zip .\/rootDir\/*` followed by `7z a zipped.zip .\/rootDir\/.*` or `7z a zipped.zip .\/rootDir\/{*,.*}` to explicitly add the hidden paths."},{"question":"at what point does something count as security through obscurity?","response":"Security by obscurity is where you rely upon some fact which you hope is not known to an attacker, and is sometimes seen as an alternative to fixing the particular weakness at the code \/ source level, finding a workaround instead; a major problem with this is that once the fact is disclosed, the security scheme is rendered useless."},{"question":"my iphone keeps switching on and off charge whilst charging, how do i fix it?","response":"There may be several contributing factors for charging issues, such as software processes; force quitting the 'usbd' process in Activity Monitor or via terminal commands has been found effective in some cases. \nAlternatively, besides software issues, it could be a buildup of lint or debris in the phone's charger port, which can be carefully cleaned using a plastic or wood toothpick to gently remove the obstruction. \nIt's also worth mentioning that problems might arise from a damaged cable, software needing updates, or due to incompatible device communication that could be resolved by connecting through a USB hub or booting a Mac into Windows."},{"question":"can you connect airpods to apple watch series 3?","response":"The Airpods should automagically connect to the Watch once you set them up on your phone using iCloud, but if you need to pair them to the watch manually, you can do it like you would with any bluetooth headset."},{"question":"why use openid connect instead of plain oauth2?","response":"OpenID Connect is considered more robust than OAuth. \nIt will provide both an access token and an ID token, which standardizes aspects that OAuth2 leaves to choice. \nOAuth strictly provides authorization, while OpenID Connect, built on OAuth 2, supplies authentication information but does not offer a more robust implementation than OAuth. \nOpenID Connect allows applications to retrieve information about authenticated users and assures the information's validity. \nOpenID Connect makes it significantly harder to steal access tokens compared to using OAuth alone. \nOpenID Connect affords a secure, centralized authentication solution, particularly for mobile software, which includes new security features recommended by Google."},{"question":"how do i get sublime texts open-file gui to show hidden files?","response":"To get Sublime Text's open-file GUI to show hidden files, you can press \u2318 cmd + \u21e7 shift +. while the dialog is open, which will toggle show\/hide hidden files."},{"question":"how to calculate date in linux?","response":"For those in need of a set of portable tools to work with dates, \"dateutils\" is an excellent choice, offering functionalities that simplify operations like the difference between dates and addition of time periods to a specific date. \nOn the other hand, if a graphical interface is preferred, \"qalculate\" is a highly recommended calculator that specializes in unit conversions and includes functionalities to calculate the number of days between dates, as well as the difference between times."},{"question":"git auto-complete for *branches* at the command line?","response":"You should try to update the git version to the latest, and then it should work. \nYou will need specific autocomplete scripts for zsh. \nInstall oh-my-zsh and set zsh as your default shell."},{"question":"what technical reasons are there to have low maximum password lengths?","response":"Some systems impose restrictions due to incompatibilities with legacy systems that are outdated and cannot support long passwords. \nThere is also a general consensus that password length should not be unnecessarily limited from a security standpoint, or if they are, that the limit still allows for strong passphrases. \nIn terms of database storage, if passwords are stored insecurely in plaintext, then the maximum length is likely dictated by the database storage field size. \nAdditionally, a hashing system like bcrypt may influence the imposed limit since it only processes the first 72 characters. \nCustomer service considerations also play a role, with some companies aiming to minimize password recovery issues, potentially contributing to a ceiling on allowable password lengths. . \nSimilarly, concerns for user experience and preventing frustrations with input fields inform the decision to limit password lengths. \nOther motivations might include ensuring compatibility with various interfaces, such as numerical keypads on ATMs or telephones with limited inputs, and compliance with regulations set by individuals who may lack a strong understanding of IT security. \nIt is also mentioned that lengthy passwords aren't necessarily a foolproof security measure, as they can still be stolen, and other security mechanisms like tracking login locations may be more effective. \nUser experience considerations, like keeping passwords memorable and manageable, also suggest an optimal length. \nLastly, some sites feel that brute-force protections, like limiting login attempts, render the need for longer passwords negligible, suggesting the use of random characters to increase security instead of length."},{"question":"do access ports tag frames?","response":"Tags are used for forwarding purposes and serve no value within a VLAN."},{"question":"how to chmod without \/usr\/bin\/chmod?","response":"Run the loader directly, and pass it the command you want to run: `\/lib\/ld-linux.so \/bin\/chmod +x \/bin\/chmod`. \nThe exact path might change, especially on a 64-bit system, so version is named something like `\/lib64\/ld-linux-x86-64.so.2.` \nAlternatively, if busybox is installed, you can execute `busybox chmod +x \/bin\/chmod`. \nAnother hack is the command: `mv \/bin\/chmod \/bin\/chmod.orig cp -a \/bin\/chown \/bin\/chmod`. \nYou can also prepare another executable file, copy chmod over it to maintain executable permissions, `$ cp \/bin\/ls chmod $ cp \/bin\/chmod`, or use the install utility to do this with permission settings in one step; the command for this would be: `$ install -m a+x \/bin\/chmod . $ .\/chmod # executes'`. \nPiping contents into an already executable file is another option (`cp \/usr\/bin\/executable_file ~\/executable_file cat \/usr\/bin\/chmod > ~\/executable_file ~\/executable_file +x file_to_be_executed.sh`), as is utilizing setfacl for setting executable permissions (`# setfacl -m u::rx \/bin\/chmod `). \nAdditionally, using rsync to modify file permissions is a viable method."},{"question":"if my password was able to be printed on a form sent home from my childs school, does it imply insecure password storage policies?","response":"The retrieval of passwords from databases indicates a serious disregard for password storage best practices. \nSuch practices create massive security vulnerabilities that must be addressed without delay."},{"question":"why was the mtu size for ethernet frames calculated as 1500 bytes?","response":"Since 1500 byte is the standard that all Ethernet implementations must support, this is what is normally set as default on all interfaces; the 1500 limit was a compromise that meant a station could not capitalize the wire too long by talking too much, and was selected as a safe approximation to the maximum data size that would not trigger the safety device."},{"question":"bash - how to run a command after the previous finished?","response":"You can either join commands with ; or have them on separate lines: command1; command2 or command1 command2. \n\nYou could us a for loop: for P in {1..3} ; do wget -q http:\/\/exemple.com\/page${P}.php ; done."},{"question":"why are people making tables with divs?","response":"One compelling factor is that older versions of IE pose challenges when attempting to override default table styles and using divs provides a smoother experience in cross-browser development. \nAdditionally, table elements come with rendering limitations that do not apply to div elements. \nThe flexibility offered by CSS makes divs a preferred choice for modern JavaScript grids, allowing for more adaptable and controlled rendering of results."},{"question":"is it safe to upgrade bash via homebrew?","response":"Brew would install its instance of bash since it works under \/usr\/local\/bin while the system defaults works under \/bin and \/usr\/bin."},{"question":"temporarily suspend bash_history on a given shell?","response":"To stop saving commands in bash history, you can `unset HISTFILE`, will prevent the history from being saved you may want to toggle it off and then back on again: `Turn Off set +o history` `Turn on set -o history`. \nYou may also use `HISTCONTROL=\"ignorespace\"`, which stops commands that start with a space from being recorded. \nThe bash history can also be managed by using HISTCONTROL, i.e., `$ bash # open a new session`, to ignore commands starting with space, and by unsetting HISTFILE to avoid saving them entirely. \nAnother method is to start a new bash session that won't save its history or simply put whitespace or tab before a command. \nLastly, exporting HISTFILE to \/dev\/null ensures no history is saved."},{"question":"is it bad practice to use Developer Options without the need for rooting your device. \nLastly, for rooted devices running Android 7 or older, you may use a third-party client like busybox udhcpc to communicate the desired hostname to your router."},{"question":"what is the difference between network address and host address?","response":"The span of host addresses is defined by the range extending from one address past the network address to one address before the broadcast address, specifically within the limits of 172.18.230.121 to 172.18.230.126. \nIn an IP address subnet, 178.18.230.120 is identified as the network address, while 178.18.230.127 serves as the broadcast address."},{"question":"how to change computer name so terminal displays it in mac os x mountain lion?","response":"You can run sudo hostname Name-Of-My-Computer in Terminal to change the name. \nAfter, flush the DNS cache by typing: dscacheutil -flushcache and restart your Mac. \nYou can also change it under System Preferences -> Sharing -> Computer Name."},{"question":"where are disks in linux?","response":"Disks and partitions are listed in \/proc\/partitions, but this is highly platform-dependent."},{"question":"can a cvv code be 000?","response":"000 is a valid CVV code, but not one that banks use very often."},{"question":"why do dynamic languages make it more difficult to maintain large codebases?","response":"Maintaining large codebases becomes more challenging in dynamic languages due to the deliberate abandonment of some of the tools that programming languages offer. \nThe absence of explicit static types, which serve as universally understood and guaranteed correct documentation, further complicates the readability and understanding of dynamic code. \nThere is also a strong correlation between a language being dynamically typed and a language also lacking all the other facilities, that make lowering the cost of maintaining a large codebase easier, and this is the key reason why it is more difficult to maintain a large codebase in a dynamic language."},{"question":"difference between a socket and a port","response":"A socket is simply one way of sending and receiving data on a specific port. \nIn a more illustrative way, if we think of a machine as an apartment building, a port is analogous to the apartment number, while a socket resembles the door to an apartment. \nMoreover, a port is for routing to the correct socket on the host."},{"question":"how do i grep for multiple patterns with pattern having a pipe character?","response":"One approach is to use egrep or grep -E, such as egrep 'foo|bar' *.txt or grep -E \"foo|bar\" *.txt. \nAnother method involves using the egrep separate command , like grep -E -- 'foo|bar' *.txt. \nIf you prefer a different approach, you can use grep -F with multiple -e parameters, such as fgrep -efoo -ebar *.txt or grep -F 'foo\\|bar' *.txt. \nA usable option is: $> cat text some text foo another text bar end of file $> patterns=\"foo bar\" $> grep -F \"${patterns}\" text foo bar. \nYou can try the below command to get the result: egrep 'rose.*lotus|lotus.*rose' some_file. \nAnother option is to utilize ripgrep, like rg \"foo|bar\" *.txt, or git grep, such as git grep --no-index -e foo --or -e bar. \nFor specific cases, like searching for patterns in a file, you can use grep -H -f ewq *.txt. \nIf you want to match patterns with specific characters or whitespace, you can use commands like grep 'foo\\|bar' *.txt or grep -E \"foo[[:blank:]]|bar[[:blank:]]\". \nKeep in mind that with grep -E, you don't need to escape parentheses or the pipe character, as in grep -E '(int|String) [a-zA-Z_]*date[a-zA-Z_]* ='."},{"question":"can msdn licenses be transferred?","response":"It should be transferable to another person: when a team member leaves the team, the MSDN subscription is reclaimed and can be assigned to someone else; however, MSDN subscription licenses can only be reassigned at most once every 90 days in Microsoft Volume Licensing programs."},{"question":"whats the difference between an api and an sdk?","response":"All SDKs are considered APIs, but the reverse does not hold, as not all APIs are SDKs. \nAn SDK typically represents a more complete set of APIs that provides a broad range of functionalities required for application development, and it may also contain additional tools specific to the platform it targets. \nWhile an SDK could simply be an API with additional interface files, it usually encompasses more, such as debugging tools and components for integrated development environments. \nAn API is simply an interface to a service, but an SDK is a comprehensive set of tools, components, and classes designed for a particular end. \nSpecifically, a software development kit should provide nearly all the necessary resources for the development process, with an API serving essentially as a point of interaction. \nThe term \"SDK\" is more collective than \"API\", with the former typically covering an entire platform, containing multiple APIs for various functionalities. \nConversely, an API is a specification detailing the necessary information to create components that interact with a service or platform, while an SDK may include libraries that embody the API."},{"question":"how to comment multiple lines at once?","response":"You can highlight them in Visual Block Mode, using \/ to jump to the endpoint, if necessary. \n\nYou can do it with the following commands: for commenting, :66,70s\/^\/#; for uncommenting, :66,70s\/^#\/ (for commenting lines from 66 to 70 (inclusive)). \n\nThere is a plugin, which offers an efficient way of commenting out, based on the file system being used. \n\nEnter visual mode by pressing v, select the lines you like to comment (up\/down arrow or j\/k), enter :s\/^\/# \/ which translates to: in selection (:) replace beginning of line (^) with `# '. \n\nYou can use either NERDCommenter or use visual modes."},{"question":"precedence of the shell logical operators &&, ||","response":"In most programming languages, operators of equal precedence are left-associative, which means operations are performed from left to right. \nSpecifically, in Bash, the operators '&&' and '||' are treated with the same precedence. \nTo control multiple conditions in Bash, it's recommended to group conditions together. \nWhile '&&' and '||' operators can be used in place of traditional if-then-else structures, they can produce equivalent outcomes if applied with care."},{"question":"how can i trigger a notification center notification from an applescript or shell script?","response":"You can do this with Growl2, cocoaDialog, AppleScript's display notification (Mavericks or later), or by changing a setting in System Preference. \nOr fork terminal-notifier to build a command line tool to display notification Alerts (with actions) and Reply Type Alerts. \nTo show a notification, provide the display notification command with a string to display. \nOptions are: cmd = %Q|osascript -e 'display notification (ruby script on OS X); or #!\/bin\/bash X=\"$*\" \/usr\/bin\/osascript -e 'display notification system attribute \"X\"'."},{"question":"tracing the location of a mobile ip from an email","response":"For law enforcement to precisely locate a person based on an email sent over a 3G or 4G network, it is not feasible unless the suspect's phone is compromised. \nTo accurately locate an individual, a wireless telecom professional suggests that precise location estimates can be challenging, and generally, law enforcement cannot obtain GPS-level accuracy through traditional means."},{"question":"certificate has been revoked reason superseded?","response":"The reasons that a replacement certificate might be issued to a user include the failure of a smart card, the password for a token being forgotten by the user, or the user changing their legal name. \nIn this case, although the certificate has been superseded, there is no cause to suspect that the private key has been compromised."},{"question":"should we define types for everything?","response":"You shouldn't create types or classes for everything in your code. \nIt's beneficial to consider encapsulating multiple primitive values into a single value or class if you need to validate these values or find yourself using them frequently and widely."},{"question":"why does the ipv6 header not include a checksum?","response":"All the common link-layer protocols, like Ethernet or WiFi, have their own error checking and error correction mechanisms, so physical transmission errors are already unlikely, making this redundant. \nThe benefits of including a checksum in the IPv6 header were minimal."},{"question":"difference between subnet and vlan?","response":"A VLAN is an Ethernet level concept, splitting it into multiple, logically separate Ethernet networks, and a subnet is an IP level concept; they partition different layers of the network model: subnets are Level 3 and VLANs are Level 2."},{"question":"can ipv6 talk to ipv4?","response":"In the context of internet protocols, IPv4-only hosts and IPv6-only hosts cannot directly communicate with each other. \nThis delineation creates significant challenges during the transition phase to IPv6, as the two protocols are inherently unable to operate together directly. \nHowever, a process called dual-stacking can facilitate some interoperability, but this is not cost effective and suffers from several limitations and performance issues."},{"question":"how to list all files ordered by size","response":"To sort files by size, execute the command `ls -lS \/path\/to\/folder\/` with 'Capital S' signifying size sorting. \nFor more information on the `ls` command, particularly sorting by file size, look up `man ls -S`. \nSpecify `ls -ldU -- \/*(.OL)` for a reverse order file list display using `zsh` and `GNU ls`, where `(.OL)` is a zsh glob qualifier that selects regular files only and sorts in descending order by file size. \nIf you want to include hidden files (whose name starts with a dot, except . and ..) and search in hidden directories as well, add the D globbing qualifier: print -rl -- \/*(.DOL). \nThe command `find . -type f -exec ls -lSd {} +` applies to recursively search and list files in size order. \nAlternatively, use `find . -type f -ls | sort -r -n -k7` to sort files with the `-ls` option and numerical sorting. \nOn GNU\/Linux systems, to get a human-readable file size list in descending order, the command `find . -type f -print0 | xargs -0 du -h | sort -rh` is used. \nTo reverse file list display order by size with basic `ls`, one would employ `ls -lSrh`, with `-h` introducing human-readable sizes. \nUse `ls -lSr` when a detailed ascending order list by size is necessary. \nUse this script `#!\/bin\/bash find ${1:-.} -maxdepth 1 -type d -exec du -sm {} \\; | sort -nr | sed -E 's\/^([0-9]+)\/\\1M\/g'` to see cumulative sizes of files in subdirectories."},{"question":"how to install pkg file on mac command line?","response":"The installer command is used to install Mac OS X installer packages to a specified domain or volume. \n\nInstall all .pkg files from the current folder to \/Applications: for f in *.pkg ; do sudo installer -verbose -pkg \"$f\" -target \/ done, or, as an alternative, you can install the packages to your home folder with -target ~."},{"question":"what is the difference between halt and shutdown commands?","response":"In most modern Linux systems, such as Centos, using the halt command will initiate a shutdown unless you are at runlevel 0 or 6. \nHowever, in Solaris 10, the halt command is more brutal as it simply flushes the disk caches and turns off the system without running any scripts or shutting down system facilities. \nFor AWS EC2 users, executing a shutdown will stop an instance, whereas using halt will terminate it."},{"question":"how can i get my external ip address in a shell script?","response":"The command `wget -O - -q http:\/\/whatismyip.org\/` can be used to find your IP address, as can `netcat icanhazip.com 80 <<< $'GET \/ HTTP\/1.1\\nHost: icanhazip.com\\n\\n' | tail -n1` to achieve the same result. \nAnother alternative is to use `ifconfig.me`, which offers additional functionality available on its website. \nIf you prefer using HTTPS, you could use a command pattern like `_result=$(wget -qO- https:\/\/ipcheckit.com\/) _result=\"${_result##*Your IP address is
}\" printf '%s\\n' \"${_result%%<\/b><\/p>*}\"`. \nFurthermore, for those managing dynamic IP addresses, registering at a service like no-ip.com and using their update tool can be beneficial (external_ip=`dig +short xxx.no-ip.org`). \nYou can retrieve the IP with the command `external_ip=`dig +short xxx.no-ip.org``. \nThe website `curlmyip.com` provides a simple and memorable way to find your IP with commands like `curl curlmyip.com`. \nInstead of HTTP requests, you can directly get your IP from a DNS server using commands such as `dig @resolver4.opendns.com myip.opendns.com +short`. \nTo get your IP address through a command line, you could use `wget -q -O - checkip.dyndns.org | sed -e 's\/[^[:digit:]\\|.]\/\/g'`. \nSeveral other commands like `curl ident.me`, `curl ifconfig.me`, and `curl https:\/\/tnx.nl\/ip` are also at your disposal for the same purpose. \nIf you want to display the current IP address in a popup window, you might use `zenity --info --text \"$(curl -s icanhazip.com)\"`. \nAlternatively, for automated queries, `use STUN` with the command `stunclient stun.services.mozilla.com` and specific data parsing for the IP address."},{"question":"why does parameter expansion with spaces without quotes work inside double brackets [[ but not inside single brackets [?","response":"The double bracket ] syntax is much more capable than single brackets . \nIt does not have the \"missing operand\" issue and also allows for more C-like syntax with >, <, >=, <=, !=, ==, &&, || operators. \nAdditionally, double brackets ] are a special syntax introduced in ksh because [ can be troublesome to use correctly, and [[ allows some new nice additions that use shell special characters. \nThe [ command, on the other hand, is an ordinary command and although most shells provide it as a built-in for efficiency, it obeys the shell's normal syntactic rules."},{"question":"why is mother\u2019s maiden name still used as a security question?","response":"There was a widespread lethargy and inertia among institutions, which depended on the secrecy of information over the years. \nOrganizations tend to be slow in adapting to changes. \nPeople being lazy and\/or incompetent contributes to security issues. \nThere are entrenched false assumptions in security practices, with security questions and \"complex\" passwords that are considered best practices being passed on without adequate scrutiny. \nSecurity questions are meant to have long-term validity, and while they can sometimes be easily accessible public information, they can also be part of multi-factor authentication strategies for enhanced security. \nUsability is often prioritized over security in systems such as banks to cater to a more diverse clientele, sometimes sacrificing security for accessibility and convenience. \nIt is ironic that security questions, which are intended to be easy to remember and hence are weak alternate passwords, are still widely used. \nIt is suggested that users should be allowed to select their security level, acknowledging that for less important accounts, 'simple locks' and simple passwords, and ease of recovery might be more fitting than stringent security measures."},{"question":"simple command line http server","response":"To set up a quick web server, you might consider node.js or the nweb tool, which can be compiled using GCC. \nYou could also use SimpleHTTPServer in Python by setting up a public_html directory and running a command to serve files from this directory on port 8080. \nSince version 5.4.0, PHP comes with a built-in web server and allows you to specify the documents directory with the -t flag. \nFor a more continuous server, a simple netcat loop could be implemented to serve a static file on port 80. \nNode also offers a simple and lightweight HTTP server module, installable via npm, which serves the current directory by default. \nAlternatively, an Oldschool Ruby WEBrick HTTP server can be used for a simple setup\u2013just be sure to configure the DocumentRoot according to your requirements. \nInstalling lighttpd on Ubuntu can also set up a basic web server 9`apt-get update apt-get upgrade --show-upgraded apt-get install lighttpd ifconfig http:\/\/[your-ip-address]:80 \/etc\/lighttpd\/lighttpd.conf (Edit to add server.port) server.port = \"8080\"`) with more extensive configuration options available, including setting the port and DocumentRoot. \nRuby provides a one-liner to serve a directory on port 8080 (`ruby -run -e httpd . -p 8080`) and devd is another utility to serve files from the current directory with options for opening URLs in a browser and user authentication 9`.\/devd -o -a -P devd:devd . -o opens url in browser -a for all interfaces -P auth user\/pass .`). \nXinetd can be configured to redirect traffic for web-serving purposes. \nCaddy is another web server that can serve content from a specified directory, with the added ability to find the server at a predetermined local URL. \nDocker can be used to run Ruby's HTTP server without needing to install Ruby itself by using a docker container and mapping the current working directory: `docker run --rm -i -p 8000:8000 -v $(pwd):\/app -w \/app ruby:alpine ruby -run -ehttpd . -p8000`."},{"question":"what is mobile sync - backup and why is it taking so much space?","response":"Mobile Sync - Backup refers to the folder where iTunes stores backups of your iOS devices. \nThe space consumption issue arises because each time you sync a device, previous backups are not automatically deleted."},{"question":"are vlans and subnets the same?","response":"They are very much different. \nA subnet specifically refers to an IP network like 192.0.2.0\/28, while a VLAN pertains to the 802.1Q standard, allowing for distinct MAC address tables for each port, effectively separating them from each other. \nVLANs and subnets are not interchangeable as they function at different layers of the network, with VLANs operating at the Ethernet level and subnets at the IP level. \nMoreover, a VLAN is associated with Layer 2 (L2) and can contain one or more Layer 3 (L3) prefix or subnet. \nDespite this, in practice, subnets and VLANs often have a correlated 1:1 mapping because both represent a single broadcast domain, which is why they tend to be overlaid in most implementations."},{"question":"what tiny thing in ios 5 makes you smile, or has caught you off guard?","response":"Here are some features people like in iOS 5: swipe Camera to view Photo Roll when Camera.app is open; tap on the screen in Weather.app to view 6-day, 12-hour and hour-by-hour forecast; 6-day forecast in Weather Widget for Notification Center; Ringtones serve as Notification Tones; Maps.app now features alternate routes; Usage shows how much space each app is using; Emoji is now a keyboard that can be used by anybody; \"Clear Skies at Night\" Icons in Weather.app; send and receive iPhone FaceTime calls via email addresses; third-party audio apps can publish song data to Lock Screen \/ Multitasking bar; Bluetooth Volume Control and Text Display (volume on headphones controls volume on iPod Touch); you can rename your iPod or other iOS device without a computer; Siri can be activated at the lock screen without a passcode; the pause button for timers in Clocks.app; retractable Keyboard in Messages.app; swiping right when reading e-mail displays message list in portrait mode on iPad; more convenient \"Find On Page\" searching; ability to edit the colors of Exchange calendars; just pull the keyboard apart with your thumbs on the iPad and use the button on the bottom right to reposition the split keyboard on screen; multi-touch gestures on iPad (pinch to close app, swipe up with four fingers to show the app switcher, swipe left\/right with four fingers to switch between running apps); dictionary word definitions from text selections; Keyboard shortcuts; MobileSafari; custom vibration patterns; LED flash on Alerts; tap and hold the button to display a list of recently closed tabs; the ability to remove the app or remove 'friends' can be restricted; mass mark as Read\/Unread\/Flag; alternative Shutter Button; more dash types (tap and hold the dash on the keyboard gives an en\u2013dash); additional data in Calendar when rotated; drag and drop recipients between To, Cc and Bcc in Mail app; tap and hold on a song\/podcast title to get a pop-up of the entire description and read long titles\/artist\/album names; double tapping the home button on the lock screen shows you both media controls, and a camera icon to the right of the unlock swiping track; Speak to me; Current Volume Reminder (switching the phone from Silent mode back to normal now displays the current ringer volume); Private Browsing Mode for MobileSafari; Lock Camera Exposure+Focus; easily view a location in a calendar event; Swipe Individual Notifications; Notifications allows control over badge counts; iForgot My Password; unified Single Caller Log; in-app Download Progress indicators (podcasts that are downloading are shown in the Music app with a circular completion icon); the Immortal Newsstand; in the Photos app, you can rotate by any degree, not just at specific intervals; you can lock the orientation into Landscape; view third-party app art at Lock Screen exclusively; Ghost Buttons on the iPad's Split Keyboard; hold the compose button to bring up the most recent draft email; swipe up on the camera icon in the lock screen to take a photo and swipe down to re-lock the phone once done with the camera; and backspace on the numbers you enter in Calculator."},{"question":"prevent itunes from opening when connecting bluetooth headset","response":"To address issues with iTunes automatically starting, you can create a \"Do Nothing App\" using Automator and replace iTunes with it, while renaming the actual iTunes app. \nAnother method involves removing the iTunesHelper from your user's Login Items through the System Preferences. \nUsing a script called iTunesPatch can also help by altering the Remote Control Daemon to prevent iTunes from starting. \nTerminal commands to stop and unload the rcd launchd job have also been cited as an effective solution. \nPerforming a binary patch on certain system processes can inhibit unwanted activation of iTunes, if keeping rcd active for other applications is desired. \nFor Mojave users, ToothFairy is recommended to manage Bluetooth connections and set commands for when devices are connected or disconnected. \nFinally, altering the audio output selection within iTunes to regular speakers instead of a headset may stop the auto-start."},{"question":"can grep output only specified groupings that match?","response":"Standard versions of grep lack the capability, but updated versions of GNU grep can perform the desired function. \nGNU grep includes options such as -P for Perl-style regular expressions and -o for printing only matched patterns. \nAdditionally, pcregrep offers an advanced -o option that allows the selection of specific capturing groups to output. \nHowever, grep may not be universally compatible across different platforms because the -P\/--perl-regexp option is exclusive to GNU grep and not BSD grep."},{"question":"what is the difference between link local and unique local?","response":"Well-formed answer\n-------------------\n\nIPv6 link-local addresses are obligatory and non-routable, restricted to a single link which has a uniform link-local network. These addresses function for single-link operations such as automatic configuration and neighbor discovery, and routers are prohibited from forwarding packets with these addresses across different links. On the contrary, unique local addresses (ULAs), while similar to IPv4's private addresses, are routable within certain local scopes but not on the global internet. Initially, a part of the ULA space was reserved for centralized allocation to ensure uniqueness, but this has not transpired, resulting in their reservation status. The other half of the ULA block is left to probabilistic uniqueness, where sites pick \/48 prefixes from within this space in a pseudo-random manner. \n\nUnfaithful answer with Insertions\n---------------------------------\n\nIPv6 link-local addresses are a required and non-routable subset of IP addresses that are only valid on a single link, thus they cannot be forwarded beyond their designated link. Unique local addresses (ULAs) are analogous to IPv4's RFC1918 addresses and can be routed within a private network or between a collective of sites, but like link-local addresses, ULAs are not for internet advertising. The reservation of a portion of the ULA space due to a lack of centralized allocation means some ULAs are reserved, while others are intended for local use and picked pseudo-randomly to avoid address collisions, a system designed to mitigate issues encountered with IPv4 private addressing when interconnecting separate private networks. \n\nUnfaithful answer with Substitution\n-----------------------------------\n\nIPv6 link-local addresses have to exist on all devices and are confined to the scope of a single link\u2014they do not traverse across multiple links. ULAs are designed for intra-site or certain inter-site routing and bear resemblance to IPv4's RFC1918, providing a solution for local communications without the possibility of global internet routing. With one segment of the ULA range being officially reserved and unused due to an absence of central allocation, and another allocated for pseudo-random, likely unique local usage, ULAs serve to circumvent the address conflicts often observed with IPv4's private network interconnections."},{"question":"how to transfer data from samsung duos to sd card?","response":"For Android 4.x devices, such as the Duos, you can move apps to the SD card by navigating to Settings\u2192Apps\u2192Manage Apps, then scrolling to the app you want to move, and tapping the \"Move to SDCard\" button. \nHowever, if the button is grayed out, the app in question cannot be moved to the SD card."},{"question":"zip all files in directory?","response":"Use the command \"zip -r myfiles.zip mydir\" in Unix, where \"mydir\" is the directory to be zipped. \nAlternatively, you can use \"find\" and \"xargs\" to locate files and then compress them into a zip archive."},{"question":"is xfce still being developed?","response":"The Xfce project continues to be actively maintained and developed. \nInternal projects within Xfce have had updates, with Thunar updated in October 2018 and Ristretto in August 2018."},{"question":"dd vs cat -- is dd still relevant these days?","response":"The dd command is incredibly useful and includes LOTS of options that cat is not able to accommodate, for example, only dd can open a file without truncating or appending, or seek from the shell; cat can be a workable substitute, but it is not a dd replacement. \n\ndd is very useful for backing up the boot sector of a hard drive or other storage device, and is similarly useful for backing up the headers of encrypted volumes, and while cat might be able to be twisted into doing this, it may not perform the rewriting part reliably. \n\ndd is particularly useful if you need to write with sudo."},{"question":"how to switch between different chrome windows with keyboard shortcuts?","response":"For quick switching between Chrome windows on a Mac, \u2318 Cmd+` can be used for some OS X versions, although in certain cases other combinations like \u2318 Cmd-F1 might be necessary. \nTo specifically alternate between distinct Chrome users, \u2318 Cmd-Shift-M is the designated shortcut. \nFor a visual display of all Chrome windows, Control-\u2193 is an option, after which you can navigate through them using the arrow keys. \nAdditionally, Alt+PageUp and Alt+PageDown will be introduced for navigating between Chrome windows in the upcoming 15.01 version of TabIt - NewTab extension. \nAnd if dealing with previously maximized Chrome windows, Control key + left or right arrow keys can switch between the two."},{"question":"how to disable auto suspend when i close laptop lid?","response":"To temporarily disable lid-switch events use: systemd-inhibit --what=handle-lid-switch sleep 1d."},{"question":"why would i tar a single file?","response":"Tarring a single file offers advantages, as .tar.gz stores more meta-data, including UNIX permissions, compared to .gz. \nThis setup facilitates easy expansion for storing multiple files. \nAdditionally, tarring a single file is useful for copying while preserving the timestamp, a detail often overlooked in downloads. \nThis practice aligns with the standard approach of compressing files to enhance download speed."},{"question":"restricting command+tab options to only apps that are in the current space","response":"To switch between applications within the same virtual desktop space, you can use the keyboard shortcut control+F4, or \u2303F4 on a Mac."},{"question":"how to make google chrome helper not use as much cpu","response":"It's advisable to disable extensions temporarily to see if one of them is potentially causing the issue with CPU usage. \nLimiting Chrome's resources might help, and tools like cputhrottle can assist in limiting system-level usage. \nIf uninstalling system-wide Flash and the one that is embedded within Chrome are not an option, you should at least prohibit it from autoplay, as well as controlling plugins and extensions, which could be misbehaving. \n It can also help to use different browsers or different profiles for one browser. \nTry opening Chrome Menu \u2192 Window \u2192 Task Manager to see what exactly consumes CPU, and also watch for ad content and ad blockers. \nDisabling each extension one by one might reveal a problematic one, such as an Adblocker. \nSite-specific issues can cause CPUs to spike, as one user experienced with a website like Okta. \nFinally, another user found that an ad blocker was consuming up to 40% of CPU."},{"question":"how to debug a bash script?","response":"To debug scripts effectively in bash, one can directly write `set -x` at the top of the script which will increase verbosity to better understand command executions and argument evaluations. \nAdditionally, the Eclipse IDE can be combined with the Shelled plugin and `_DEBUG.sh` script to enable a feature-rich debugging environment, including features like breakpoint toggling and step-by-step operations. \nAnother quick method for debugging is to start the script with either `#!\/bin\/bash -x`or `#!\/bin\/sh -x`, which automatically activates the debugging mode. \nFor a more GDB-like experience, the \"bashdb\" debugger can be used, which allows inspection and manipulation of script execution and variables. \nOnline resources such as \"http:\/\/shellcheck.net\" offer assistance with common scripting errors like unclosed quotes or brackets. \nFor those working with Visual Studio Code, the Bash Debug extension available at \"https:\/\/marketplace.visualstudio.com\/items?itemName=rogalmic.bash-debug\" offers step in\/out\/over functionality and variable inspection."},{"question":"why do programmers write closed source applications and then make them free?","response":"Sharing software for free can provide a great sense of fulfillment due to the challenge, sense of accomplishment, expression of creativity and the joy it brings. \nThe realization that a tool or creation does not truly \"live\" until it is used and appreciated can be an inspiration as well. \nGiving back to and participating in the community is another top reason, prioritizing the software's reach over monetary gains. \nOthers find that fulfilling psychological needs, such as gaining respect and self-actualization through project leadership and personal coding style, can be more satisfying than financial rewards. \nSome developers find their contribution more valuable than the effort required to monetize their work through marketing, selling and collecting payments, managing technical support, handling refunds or managing taxes. \nFactors like the ease of digital duplication, the abundance of free alternatives, and the public's reluctance to pay for virtual products can also deter charging for software. \nThere are instances when developers avoid setting up payment systems for smaller applications, because they expect minimal user acquisition. \nAnother reason is that applications that are clients for free services are less likely to be monetized due to existing free alternatives. \nAnd some programmers choose to release an application for free as a way to \"stick it to the man\" or to prove a point against overpriced inferior products. \nFor some, offering initial versions of the software for free can lead to user engagement, feedback, and potential paid upgrades. \nOthers use free software as self-advertising, to help potential customers to see how it works, or to create a portfolio, to establish a reputation or in pursuit of career benefits. \nDevelopers often benefit from community contributions, which can include bug fixes and features added to open-source projects, generally raising the bar for everyone. \nOpen-source initiatives also allow developers to focus on solving novel problems rather than reinventing the wheel. \nSome believe that information wants to be free, which dovetails with the free software movement's tenet that innovation benefits from a competitive and open environment."},{"question":"does using == in javascript ever make sense?","response":"Yes, using `==` in JavaScript can make sense and is convenient in certain situations including when comparing a key with a numerical value. \nAdditionally, if you need to compare padded numbers, such as comparing \"01\" to normal integers, the `==` operator works just fine."},{"question":"should ssl be terminated at a load balancer?","response":"Yes, it is suggested terminating SSL at the load balancer to offload CPU intensive jobs away from web servers, not least because the department that manages that device often also manages the networking and infrastructure."},{"question":"how do i change the extension of multiple files?","response":"The rename command from util-linux can be used for renaming files, specifically changing \"txt\" to \"text\" in file names that match \"*.txt\". \nAnother method pertinent to Debian involves using the Perl rename command syntax 'rename \"s\/oldExtension$\/newExtension\/\" *.txt'. \nAdditionally, the command 'find . -name '*.txt' -exec rename 's\/\\.txt$\/.text\/' {} ;' is effective for this task."},{"question":"any nice, stable ways to keep a window always on top on the mac?","response":"To watch videos while simultaneously browsing other tabs or applications, the Picture-in-Picture Extension (by Google) for Chrome can be utilized."},{"question":"what does @ signify in unix file permissions?","response":"The symbol \"@\" in permissions indicates the presence of extended attributes, which can add additional metadata to a file. \nIf both extended attributes and Access Control Lists (ACLs) are applied to a file, the \"@\" symbol will be displayed. \nWhen you see a \"+\" alongside permissions, it signifies that ACLs, which provide extended security information, are set on the file or directory. \nInstructions for managing these attributes on macOS include using the 'ls -le' command to check for ACLs, the 'xattr' command for manipulating extended attributes, and 'chmod' for altering file permissions."},{"question":"how to connect usb headphones to iphone?","response":"To connect the output to your USB headset, if it has separate USB power and auxiliary input, you should use the provided dongle with your iPhone 7."},{"question":"is android a 32-bit or 64-bit os?","response":"The core of the Android operating system, including its kernel and runtime library, operates in a 32-bit environment based on the Linux kernel, with applications in the Google Play Store targeted at the Dalvik Virtual Machine, which makes actual bit structure not relevant for them. \nAndroid executes all its code within a 32-bit environment, regardless of the capabilities of the ARM chips it runs on, as 64-bit processors are set to be launched in 2014. \nContrary to being strictly a 32- or 64-bit OS, Android is built on a Dalvik VM-based structure, with the most prevalent architecture being 32-bit ARM. \nAndroid, while originally conceived for 32-bit ARM processors, now also supports 64-bit processors as introduced with Lollipop, offering compatibility with a wider range of hardware and the potential for apps to utilize more than 4 GB of RAM."},{"question":"what is the difference between waterfall model and v model?","response":"The main difference between the waterfall model and the V model is that in the waterfall model, the testing activities are carried out after the development activities are over. \nOn the other hand in the V model, testing activities start with the first stage itself. \nIn other words, the waterfall model is a continuous process, while the V model is a simultaneous process."},{"question":"why is math.random() not designed to be cryptographically secure?","response":"A major reason is that an alternative to Math.random() exists which can be used by those requiring strong cryptography, allowing others to save both time and power. \nThe alternative to Math.random(), is window.crypto.getRandomValues(typedArray), which gives developers the choice to use the best tool for their specific needs. \nMath.random() is not cryptographically secure as it's not typically necessary, and embedding a cryptographically secure algorithm into a spec without good reason can add unwanted complexity."},{"question":"where are twrp file stored?","response":"The backup for TWRP on an LG G2 device is usually located in the directory `.\/TWRP\/BACKUPS\/` on the root of the SD card. \nFor a Verizon model of the LG G2, the backup can be found at `root\/data\/media\/0\/TWRP\/BACKUPS\/`; however, accessing this requires a root explorer file manager. \nSimilarly, the backup may be found in the path `\/data\/media\/0\/TWRP\/(backups folder)` and can be accessed using software like Droid Explorer, which also allows system files and folders to be transferred."},{"question":"can i create a shortcut to open a specific application on os x?","response":"While Mac OS X does have a built-in method for setting keyboard shortcuts, it doesn't work for Firefox. \nKarabiner-Elements allows for customization of keyboard shortcuts on Mac versions 10.12 and later, including executing shell commands. \nAlfred, particularly in its Power Pack version, offers the ability to map shortcuts to applications, among its various features. \nUsing Automator Services in combination with built-in keyboard shortcuts is another method to create shortcuts without third party apps. \nSpark 3 is a free Shortcuts manager which enables you to create Hot Keys to launch applications and documents, execute AppleScript, control iTunes, etc. \nSome users have found Apptivate to be the easiest to use for assigning global shortcuts to apps. \nTo open Terminal with a shortcut on Mac without third-party software, one can utilize a custom Quick Action created in Automator and assign it a unique hotkey, like \u2318 + \u2325 + F12. \nFor iTerm2 users with Oh My Zsh, one can replace AppleScript with the 'Launch Application' action in Automator. \nFurthermore, Terminal app already has built-in shortcut keys for opening new terminals or tabs at a folder location: New Terminal at Folder ^+\u21e7+T New Terminal at Tab Folder \u2325+^+\u21e7+T."},{"question":"how do i unset a variable at the command line?","response":"To remove an environment variable, run unset ALL_PROXY, but if you've added export ALL_PROXY=\u2026 to an initialization file, remove it from there. \n\nYou can also set the value of a variable to empty by VARIABLE= or VARIABLE=\"\"."},{"question":"cant click with trackpad or mouse (os x 10.9, macbook pro)","response":"In order to prevent unwanted input from a remote device, turning off Bluetooth will ensure that no remote button is being involuntarily pressed. \nIf you're experiencing issues with your mouse or trackpad, enabling Mouse keys within \"System Preferences -> Accessibility -> Mouse & Trackpad\" can help, and you can press the \"i\" key to simulate a single click, which might resolve the problem. \nAdditional hardware-related issues, such as something applying pressure from beneath the trackpad, can cause it to register as if it's being constantly pressed. \nIf you notice that there's no physical \"click\" when you press down on the trackpad, it may need to be repaired or the underlying pressure issue resolved."},{"question":"where are apache file access logs stored?","response":"The location of Apache's access log files depends on your Apache configuration. \nA common location for these log files is within the \/var\/log directory and its subdirectories, or in \/var\/log\/httpd directory. \nOn Debian or Ubuntu Linux systems, the \/etc\/apache2\/apache2.conf leads to ${APACHE_LOG_DIR} environment variable instead of the log directory itself, so use $ sudo tail -f \/var\/log\/apache2\/access.log."},{"question":"what is the safest way to deal with loads of incoming pdf files, some of which could potentially be malicious?","response":"Using a burner device, such as a cheap laptop with a mobile internet dongle, is recommended for downloading documents to protect against malware. \nQubes OS offers notable security features with its built-in DisposableVMs functionality and \"Convert to Trusted PDF\" tool. \nConverting PDFs to more \"passive\" formats like TIFF or postscript using a restricted account can prevent malware from causing harm. \nIf there's a concern about a PDF trying to phone home, it is advised to disconnect the device from the network before opening the file. \nAlso, tools like Ghostscript can be used to disarm suspicious PDFs. \nFor a comprehensive security setup, Subgraph OS could be considered once it reaches a more stable release, as it uses kernel hardening and application sandboxes to limit exploit risks."},{"question":"is there a gui ssh client for os x?","response":"Terminal.app is a built-in option that straightforwardly handles SSH. \nIf you're looking for something beyond the default, iTerm 2 is considered one of the best GUI applications for SSH and other command-line tasks. \nZOC6 and SecureCRT with SecureFX are additional choices for those seeking versatile and secure solutions. \nFugu is specifically designed for SSH and provides a user-friendly interface. \nRoyal TSX is another option that supports SSH, RDP, VNC, and web-based interfaces, featuring built-in credential management and team-sharing features. \nFor a PuTTY-like tool with extra features, Core-Shell fits the bill, and Termius, available as a mobile app as well, is recommended for users seeking a robust SSH client."},{"question":"with the linux cat command, how do i show only certain lines by number","response":"You can use awk straight up. \nThe command would be: awk 'NR==1' file.txt, in which '1' would be replaced with the desired line number."},{"question":"what is yum equivalent of apt-get update?","response":"The equivalent command for updating your local cache with YUM is: yum makecache."},{"question":"does `sl` ever show the current directory?","response":"Yes, the command 'sl' can function equivalently to 'ls' if you establish the proper alias in your shell environment."},{"question":"how can i pass a command line argument into a shell script?","response":"In shell scripting, when you run a command like `.\/myscript myargument`, \"myargument\" is represented within the script as `$1`. \nFor scripts that can handle multiple arguments, you could start them with commands like `$\/shellscriptname.sh argument1 argument2 argument3` and then, within the script, access each argument by its order, such as `$1` for the first, `$2` for the second, and so on. \nIf a script is designed to pass all its arguments to another script or command, using the form `.\/script.sh \"$@\"` is very convenient, as `$@` stands for all the arguments originally passed to the script."},{"question":"does it make sense to deploy ospf across metro ethernet?","response":"You could very well run OSPF (or other IGP) on a multi-point metro-Ethernet service, and it should work very nicely. \nOSPF over metroE works fine but you will need to make sure it fits your needs and you architect accordingly."},{"question":"is there a keyboard shortcut to bring up finder?","response":"By default, Finder doesn't have a built-in keyboard shortcut. \nHowever, tools like Keyboard Maestro can be utilized to create one. \nYou can add a Launch Application action and select Finder from \/System\/Library\/CoreServices\/. \nAdditionally, the sliding in or out animation can be linked to a hotkey combination. \nOn Yosemite, you can press option \u2325+command \u2318+spacebar to open a new Smart Finder window. \nAnother shortcut, alt + command + , allows you to search for files directly in Finder mode. \nIf you want to open Finder with specific files or folders, Spotlight can be used; simply press \u2318+Space to activate Spotlight, then type the name of the file or folder you want to open. \nThere are also native keyboard shortcuts to open specific Finder windows: shift+\u2318+C for the Computer folder, shift+\u2318+D for the Desktop folder, shift+\u2318+H for the Home folder, shift+\u2318+O for the Documents folder, shift+\u2318+A for Applications folder, and shift+alt+L for Downloads folder. \nAlternatively, you can cycle through the apps using \u2318+TAB, highlight Finder, and then hold option \u2325 before releasing \u2318 to open a new Finder window."},{"question":"what can someone do with my mac address?","response":"The disclosure can be linked to your real identity and may enable tracking through data collected from WiFi networks, or it can be used to falsify a device's MAC address to gain access to some service. \nMoreover, malicious actors could exploit the information to associate the tracked device with an actual person, facilitating targeted attacks against security vulnerabilities in network drivers. \nThe MAC address, in the wrong hands, could also be manipulated to disguise one's network card as yours when interacting with a gateway, introducing the possibility of unauthorized access or activities. \nUniquely identifying your computer across multiple sessions is another potential misuse of the MAC address."},{"question":"how to connect two monitors to macbook pro 2011?","response":"You can do so using a USB Displaylink adapter, like one manufactured by OWC, or any USB to DVI display adapter. \nIt's also possible to daisy-chain 2 Thunderbolt displays, or connect one mini DisplayPort monitor to the end of a Thunderbolt chain and connect your Mac to your Thunderbolt Display. \nAlternatively, you could try the Matrox DualHead2Go Digital ME, with the Mini DisplayPort version a good recommendation."},{"question":"enter a filename in the file open dialog","response":"When using the Finder dialog box on a Mac, you can simply press \u21e7\u2318G to access the \"Go to the folder\" dialog, where you can insert the path of the desired file. \nThis dialog accepts Unix-style path expressions such as '~' for your home directory. \nMoreover, the \"Go to folder\" dialog supports auto-completion by allowing you to type the first few characters of the name and then press TAB to complete the entry, which can significantly speed up the navigation process. \nIf you're trying to locate hidden files, pressing command+shift+. will reveal them."},{"question":"how can i open a terminal window directly from my current finder location?","response":"DTerm offers a unique solution by providing a floating command prompt, located at the top of the window, that can be used across various applications, not just the Finder. \nYou can also do so via the Service feature, which you can read more about online."},{"question":"how can i find the hardware model in linux?","response":"One way is by using the dmidecode | grep -A3 '^System Information' command. \nAlternatively, if the manufacturer supports it, dmidecode -t baseboard will provide you with the computer's DMI in a readable format. \nYou can also try, sudo dmidecode -s baseboard-product-name. \nMeanwhile, dmidecode -t 1 would also provide you with the relevant system information. \nAway from dmiecodes, sudo lshw -short and lshw -short | grep system also work. \nFinally, the system information tool inxi shows the information cleanly, without needing root access as with dmidecode."},{"question":"how does the sticky bit work?","response":"The sticky bit used to apply to executable programs flagging the system to keep an image of the program in memory after the program finished running, but that is not obsolete and that in Linux, the application of the sticky bit is now confined to directories, not files. \nIt is a permission bit set in a directory intended to stop deletion of critical folders and their content by preventing unprivileged users (those who are not owners within that directory or root users) from deleting or renaming files in a directory."},{"question":"why nginx is called reverse proxy?","response":"The term \"nginx reverse proxy\" specifically describes an nginx server that is set to function as a reverse proxy, meaning that it allows incoming external client requests will be forwarded to an internal server. \nThis role of \"reverse proxy\" is one of the specific jobs that a particular instance of the Nginx webserver can perform."},{"question":"can i use gpl software in a commercial application","response":"You may copy, distribute, and modify the software as long as you track changes\/dates of in-source files and keep modifications under GPL. \nAdditionally, you can distribute your application using a GPL library commercially, but you must also provide the source code."},{"question":"how to merge all (text) files in a directory into one?","response":"This is what cat (\"concatenate\") is supposed to do, even though most people just use it for outputting files to stdout: if you give it multiple filenames it will output them all sequentially. \n\nYou can try the command $ cat * > ..\/merged-file. \n\nIf your files aren't in the same directory, you can use the find command before the concatenation: find \/path\/to\/directory\/ -name *.csv -print0 | xargs -0 -I file cat file > merged.file."},{"question":"windowserver high cpu on yosemite","response":"To address high CPU usage in WindowServer, disabling the \"Display have separate Spaces\" and logging off and on again may resolve the issue. \nMoreover, changing \"Displays have separate Spaces\" to off and disabling the Dashboard in Mission Control might be helpful. \nRemoving Google Chrome from the system has also been found to lead to performance improvements. \nEliminating menu bar items that frequently update graphics can further reduce CPU strain. \nDisabling tray animations or performing a full reboot can provide temporary relief from sluggish performance. \nSwitching the system's appearance from dark mode to bright mode has significantly reduced WindowServer load for some. \nDisconnecting a second screen, rebooting, then reconnecting, along with closing Google Chrome, may help. \nUpgrading the operating system to OS X 10.10.2 has resolved issues for others, allowing for smoother functions and reducing the need for frequent reboots. \nRemoving specific menu bar items such as iStat Menus and Little Snitch has also led to improvements. \nLastly, using an eGPU can address performance problems for MacBook Pro 16'' (2019) models when dealing with external monitors."},{"question":"how do we specify multiple ignore patterns for `tree` command?","response":"You simply provide all the patterns to the -I command, separated by |."},{"question":"how critical is it to keep your password length secret?","response":"Telling someone the length of your password isn't the worst thing you can do, as you're in essence giving someone a hint about how hard it might be to guess\u2014if your password is very long (17 characters in your example) it's largely useless information\u2014and some recommend against it, while others suggest you actually enhance security by deliberately leaking that information. \n\nHowever, revealing the length of the password would influence an attacker\u2019s strategy: if your password is weak (short password), an attacker may focus on cracking it, while if the password is strong (long password), an attacker might explore other vectors of attack."},{"question":"how do i backup and restore sms messages?","response":"SMS backup+ comes highly recommended for backing up your SMS to a separate Gmail Label, including the capability to automatically backup SMS, MMS, and call log entries. \nAdditionally, you can use SMS Backup & Restore to create backups manually or on a schedule, which can be in the form of an XML file on your SD card."},{"question":"where are xfce notes stored?","response":"The notes are typically stored within the directory $XDG_DATA_HOME\/notes\/, which defaults to the path ~\/.local\/share\/notes\/."},{"question":"can ssl traffic be monitored?","response":"If Websense is configured to log it, monitoring becomes possible, allowing visibility into the specific URLs visited and tracking the user's online activity. \nWhile the possibility of monitoring SSL traffic exists, it necessitates certain setup procedures, indicating that it is not a straightforward task. \nParticularly in a corporate context, companies can monitor SSL traffic."},{"question":"is java slower than c++?","response":"You can't measure the speed of a language, only the speed of some particular implementation. \nThat said, on average, code written in Java will run slower than (roughly) equivalent code written in C++. \nWhile Java may be up to three times slower, it is often almost as fast as C++. \nSo, the runtime is similar in C++ and Java code."},{"question":"broken screen while debug mode was disabled. how can i re-enable adb?","response":"To access data and create a backup on a device with a non-functional screen and digitizer, you can use the adb console after booting a recovery system with adb enabled. \nIf the device supports USB host mode, an alternative method is to connect a USB mouse or a keyboard with the help of a USB-OTG cable to bypass the broken touchscreen."},{"question":"how to change my device location on the play store","response":"You must have a valid payment method with a billing address inside a specific country to access that country's Play Store. \nAlternatively, removing your Google account from the Accounts section in settings, adding it back, and then clearing the data for Play Store apps may resolve issues. \nIf unsuccessful, making an actual purchase using a new card with the correct billing address as the default could work. \nIt may also be effective to change your billing address to the new location via Gmail on your PC and then remove and re-add your Google account on your mobile device."},{"question":"how to extract specific file(s) from tar.gz","response":"When extracting a specific file from a tarball, you can specify the path if the file is in a subfolder by using the command `$ tar --extract --file=test.tar.gz subfolder\/extract11`. \nBe sure to write the file name exactly as it appears when listed by the command `tar ztf test.tar.gz`. \nIf you need to extract multiple files from a large tarball, you can use the command `gunzip < thousands.tar.gz | tar -x -v --files-from hundreds.list -f -`."},{"question":"count total number of occurrences using grep","response":"When counting the occurrences of 'needle' in a file, you can use the command `grep -o 'needle' file | wc -l`; however, this might also count other variations such as 'needles' or 'multineedle'. \nA better way to precisely match single occurrences of the word 'needle' is to use one of the following commands: grep -ow 'needle' file | wc -l grep -o '\\bneedle\\b' file | wc -l grep -o '\\' file | wc -l. \nAn alternative command for counting instances of 'needle' with GNU grep is `grep -o needle | wc -l`. \nIn the scenario where one needs to find each occurrence of \"thing1\" or \"thing2\" exactly once, the command `grep -E \"thing1|thing2\" -c` would be appropriate."},{"question":"how to compare two dates in a shell?","response":"For chronologically comparing dates in the year-month-day format, using a standard string comparison suffices. \nIt's also possible to convert the dates into Unix timestamps for comparison, as timestamps can be easily compared once converted."},{"question":"do i need to use an interface when only one class will ever implement it?","response":"Strictly speaking, according to the YAGNI principle, it will not be necessary to implement an interface in such cases unless when you need it for something like planning to write tests for other classes using this interface. \nIn theory, having an interface might not be deemed essential, but there are instances where creating interfaces serves as a beneficial practice, particularly as the front-end to encapsulated subsystems, regardless of the number of implementing classes. \nWhen developing an API, using an interface is recommended. \nCreating an interface not only provides a structure for future implementations but also aids in scenarios where additional classes may be created to implement it. \nWhile in most cases, implementing a different interface might not be necessary, it is acknowledged that defining interfaces for higher-level classes, where abstraction from the implementation is desired, can be advantageous. \nThe key is to avoid unnecessary duplication of interfaces that already exist under the name of the class."},{"question":"is there a way to completely disable dock?","response":"Completely disabling the Dock in macOS proves challenging, as turning it off entirely could potentially disrupt the operating system. \nOne suggestion to minimize its impact involves adjusting the Dock autohide delay to an extended duration, such as 1000 seconds, effectively reducing its visibility. \nAdditionally, you can modify the icon size to 1px, making the Dock practically invisible while still running in the background."},{"question":"how to transfer files from mac with broken screen?","response":"The simplest thing to do is boot the Mac in target mode (hold the T key down) and connect it via Thunderbolt or Firewire to another Mac, so you can have visibility without repairing your Mac's screen; alternatively, you could just remove the drive from the Mac and use a cheap $5 USB to SATA connector to mount the volume on a Mac to enter the Filevault passphrase to decrypt the volume."},{"question":"what are the advantages and disadvantages of cryptographically signing commits and tags in git?","response":"A git repository is susceptible to various forms of compromise, which is considered a normal risk and not a reason to avoid git. \nThere seems to be a majority consensus that signing commits is unnecessary, but signing tags is beneficial. \nThe key to the \"sign every commit\" debate probably has to do with the workflow being used. \nMost people make a multitude of commits in their local repository, and then push that set and it should be sufficient to tag the final collection, assuming that all the changes are correct. \nIf you are working in an environment where lots of single commits are moving around, the distinction between a tag and a commit becomes less distinct and signing commits may become more useful."},{"question":"how would a router with \/32 wan subnet mask communicate with the rest of the internet?","response":"DSL tends to use PPPoE, which means the link is point-to-point. \nA \/32 is perfectly valid here. \nIn addition, your router will have the ISP router listed as default gateway."},{"question":"fix terminal after displaying a binary file","response":"To address terminal malfunctions when files meant not to be viewed are opened, various resetting commands can be utilized. \nDifferent users have had success with the following commands: hitting \"Control + C\" a couple of times and then typing \"reset\" and then hitting \"return\", trying `alias fix='echo -e \"\\033c\"'`, using `alias fix='reset; stty sane; tput rs1; clear; echo -e \"\\033c\"'` in .bashrc and then typing in ` (ctl-c, ctl-c, ctl-c) fix `. \nFor tmux users experiencing issues that persist within tmux panes, commands like `ctrl-B XXX tmux send-key -R -t PPP` might be required to reset the pane. \nFor some, merely running \"reset\" or exiting and re-entering tmux resolves the problem. \nLastly, another user used \"echo Ctrl+V\" followed by \"Ctrl+O\" when other approaches failed."},{"question":"can i delete files or folders from \/private\/var\/folders\/?","response":"In general, you can safely delete anything in \/private\/var\/folders\/ but not the folder itself. \nRumor has it that one should not delete \/private\/var\/folders\/zz, but if you want to be on the safe side, use cd \/private\/var\/folders for i in *; do if [ \"$i\" != \"zz\". \nFrom a general safety for the system integrity viewpoint, anything withinin the hierarchy of \/private\/var\/folders\/* can be deleted, zz directory included, and system integrity should remain intact as temporary files will be repopulated after a reboot. \nHowever, there could be some side-effects from wiping all data in these directories, including potential issues with applications that use files in these areas. \nQuitting and restarting an actively cluttering app might often be enough to gain some space there. \nOn macOS Catalina (10.15), attempting to delete these files can be dangerous and lead to situations where the system may not restart, and recovering from a Time Machine backup can be problematic. \nA safer alternative to deleting files could be to start the system in safe mode, which can clean up to 44GB of space."},{"question":"when should you call yourself a senior developer?","response":"It varies among different companies, allowing individuals to adopt the title Senior Dev X or Y anytime between 5-8 years, although seniority is not solely determined by technical ability but also by the initiative and responsibilities an individual takes on. \nIn some perspectives, 'senior' isn't something given to anyone with less than 15 years of experience, as it extends beyond technical knowledge. \nAccording to certain criteria, you should consider yourself a senior developer when you start to mentor junior developers. \nAdditionally, being able to handle the entire software development life cycle, leading others or being looked upon for guidance, and self-managing projects are indicators of reaching a senior level. \nSome suggest that a person becomes a senior developer under 5-7 years of practice is quite unlikely, that you'd need to be generally closer to 30 years old, or at least 27 years old with a minimum of 7 years of practice. \nOthers argue that being called a senior developer by peers is a significant factor. \nSome propose a minimum of 10 years of experience, including college or other education, as a baseline for considering oneself a senior developer. \nThere's also the perspective that achieving seniority involves mastering programming and accumulating at least 5 years of experience, with a level-3 senior categorized as one who has spent the last 10,000 hours programming or 7 to 10+ years. \nIn contrast, another view suggests that working for three years is sufficient to attain the status of a senior developer."},{"question":"why do i hear about so many java insecurities? are other languages more secure?","response":"Java is fine and no less secure than other languages, and more secure than C or C++ because of no buffer overflows etc., but there are problems with old-school Java-Applets running within web browsers; the vulnerabilities reported are in the Java Sandbox, which attempts to enforce a privilege model that permits safe execution of untrusted code, but Java applets imply a huge attack surface whose security is very hard to ensure."},{"question":"how to clean log file?","response":"There are several methods to empty a logfile, such as using commands like `> logfile or cat \/dev\/null > logfile` or `true | tee logfile`, which will truncate the logfile to zero size. \nAdditionally, one can use the `truncate --size 0 logfile` or `truncate -s0 logfile` or use `rm logfile`, where it's assumed that the application will recreate it if it doesn't exist. \nIn cases where many files need to be emptied, the `find` command can be used to match and execute a zeroing command on the matched files or to delete them."},{"question":"how can i monitor disk io?","response":"For disk I\/O monitoring, several tools are mentioned across the passages, such as iotop, which displays disk read and write operations in real-time. \nThe sar command from sysstat can provide output that includes time spent waiting on I\/O\u2014the %iowait. \nDstat is another tool preferred for its ability to show statistics per disk and is noted for using colors to provide a clear overview. \nDirect querying of system files like \/sys\/block\/sda\/stat or \/proc\/diskstats can be used for a quick status check on disk I\/O without additional tools. \nCentreon, a tool built on Nagios, is recommended for long-term performance monitoring with graphing capabilities for resource performances. \nFor more comprehensive monitoring and understanding, one might prefer tools such as iostat, Iozone, SAR, and vmstat. \nThe sudo iotop command with specific flags such as -aoP is recommended for viewing accumulated output and process-specific I\/O data. \nNmon, which works for both disk and network with processes, is also available and has a history of use on AIX before being ported to Linux. \nLastly, diskgraph is a command-line tool that plots disk I\/O in a terminal, providing visual bandwidth and in-flight I\/O operations in different colors."},{"question":"how to distinguish nexus 7 (2012) and nexus 7 (2013)","response":"The most noticeable physical differences between the 2013 and 2012 models are the different orientations of the \"Nexus\" logo and the presence of a camera on the back and a notification LED on the front for the 2013 model, which the 2012 model does not have."},{"question":"can ipad camera be hacked?","response":"Yes, it\u2018s possible, as any app you install can (if you allow it) access the camera."},{"question":"igmp do i need it?","response":"In the absence of an mrouter within the network, the configuration of one or more IGMP queriers is required. \nThis will keep forwarding information up-to-date, thus preventing traffic from being dropped or flooding."},{"question":"how can i tell if a green text message has been delivered?","response":"If the bubble is blue, the message has been sent as an iMessage, and iMessages have a built in delivery report that will tell you it has been 'delivered' or 'read' when the message gets delivered\/read, but a regular SMS (when it is green) doesn't provide these options; if you have jailbroken your device, there is an SMS Delivery Report repository in Cydia."},{"question":"how to change facebook in game?","response":"You need to change the Facebook login in the app itself, so log out, then link it to your 2nd Facebook account by logging into it - again - within the app itself."},{"question":"where does the upgrade to macos catalina move root \/ directory files?","response":"During the upgrade to macOS Catalina, the root directory files are relocated to \/Users\/Shared\/Relocated Items\/Security\/my-cool-directory."},{"question":"unzipping a .gz file without removing the gzipped file","response":"To unzip a .gz file without requiring a temporary file, use the command: `zcat somefile.gz > somefile`."},{"question":"how to run a command without hitting enter key?","response":"You can create a script (.sh file) for the command you need and simply run it by double-clicking. \nAlternatively, use a non-X terminal like the one accessible with CTRL+ALT+F2, log in there, and run your command. \nAdditionally, using the CTRL+O shortcut in a bash terminal can execute a command and cycle through your command history."},{"question":"are coding certifications worth it?","response":"Certifications generally indicate that an individual was knowledgeable about a technology at a specific time. \nCertified professionals can provide some advantages to their company, potentially making certification a requirement for certain job offers. \nFor those starting their careers, certifications tend to be more important as they can serve as proof of knowledge. \nOne programmer working in Italy states that the true skills and certifications of programmers are overlooked by employers; however, in reputable companies, certifications are a valuable part of your r\u00e9sum\u00e9. \nA certification can also act as a testament to one's interest, showing initiative during periods of unemployment. \nStudying for certifications is seen as valuable, helping to understand core basics and boosting confidence in job interviews, even if the certification itself isn't worth it. \nIt's suggested that if one already has the knowledge, obtaining a certification could demonstrate seriousness about one's career, albeit not necessarily competence. \nAccording to one programmer, there are zero situations in which they'd value time spent obtaining a certification over time spent working on a project. \nSome educational courses that include certification, like those from reputable universities, could significantly strengthen a resume. \nPersonal experiences with certification programs show that they can be interesting and instill strong fundamental knowledge, with additional benefits if undertaken in the spirit of learning. \nThere is a viewpoint that certifications do not directly secure jobs but provide extensive knowledge, which is what ultimately helps in job acquisition. \nSome may pay for certifications as a measure of personal progress, and certain people, such as hiring managers, might value a certificate from a recognized educational source. \nIn particular employment markets, such as Indian IT, certifications are influential in starting careers, and they can provide an edge against equally qualified candidates lacking certification, but note that many of good coders are not computer scientists or are school\/college drop-outs, which conversely tells you that certifications are not that worthy. \nMicrosoft certifications can also open up opportunities for additional income like training roles and lend credibility for authoring books or providing training. \nHowever, outside of certain partner requirements like for Microsoft Certified Partners, certifications might not be particularly beneficial. \nIn some prestigious software companies, certifications might be seen as a negative. \nFrom some individuals' experiences, certification courses may seem like a waste of time and resources, emphasizing that learning itself is valuable, not the certification paper. \nCertification can assist those who are not strong programmers by helping their resumes stand out in less competitive environments. \nPossessing relevant qualifications could be seen as beneficial and can aid in the initial filtering process by recruiters. \nIn consulting or contracting, being certified can help market oneself for projects. \nFinally, certifications are usually optional unless they are specifically required for a particular job."},{"question":"what is the difference between iterm2 and terminal?","response":"iTerm2 is under continuous development, bringing new improvements regularly, as opposed to Terminal which is only updated every few years. \nPractically speaking, Terminal's split panes give you two views of the same window, while iTerm2 gives you unlimited independent terminals in one tab."},{"question":"how can i use gmail as the default mail client app in mac os x?","response":"If you use Firefox 3.5 or later, go to Preferences \u2318 and choose the Application pane, find \"mailto\" in the content type list, and configure your preferences. \nAlternatively, you can use Webmailer to set up any Webmail client as the default email client in OS X. \nIf you're using Chrome, settings can be accessed to search for \"mailto\", and Gmail can be assigned as the handler. \nAdditionally, by clicking on a gray diamond in the Chrome address bar and selecting \"use Gmail\", users can establish Gmail as their default email service."},{"question":"how to keep screen turned off when plugging charger?","response":"You may have enabled an option titled 'Stay Awake,' (Settings > Application > Development > Stay Awake), which ensures that the screen does not sleep while charging. \nAlternatively, SnooZy Charger, an application available in the Play Store, offers customizable behaviors for your device when it connects to or disconnects from a charger, such as screen-off settings that don't require the screen to be locked. \nFor those looking for inbuilt solutions, switching from stock to a custom version of Android like CyanogenMod offers features that can prevent the screen from waking up when the device is plugged in, specifically found in the \"Display & lights\" menu. \nThere are also applications like 'Screen Stay Off' by mitskiP which can keep your screen off when charging, even though the screen may briefly turn on before going off again. \nAdditionally, installing the Xposed framework with a particular module can give you the option to prevent the screen from turning on when you plug in the charger."},{"question":"what is the exact difference between a terminal, a shell, a tty and a console?","response":"A terminal, often a remote piece of hardware, is synonymous with tty, representing a text input\/output environment. \nIt is a session capable of receiving and sending input and output for command-line programs, functioning as an interface with a display for output and a keyboard for input. \nAdditionally, a terminal is physical hardware with a keyboard and output devices connected to a mainframe. \nIn essence, it is the space where a computer and a human interface. \nOn the other hand, the file representing a terminal is traditionally known as a tty file, and tty serves as either a terminal or a kernel subsystem supporting terminals. \nTTY, which stands for teletypewriter, is a terminal specifically used for typing text messages. \nThe shell, defined as a command-line interpreter, is a program responsible for controlling and running other programs. \nIt serves as an application, such as bash or tcsh, helping users interact with the system. \nA console must be a physical piece of hardware connected to or part of the host, typically serving as the primary interface for managing a computer. \nAgain, the console is a special type of terminal directly connected to the mainframe for OS administration, and it can be where status and errors are reported (e.g., \/dev\/console). \nIt encompasses the hardware display and keyboard used for system interaction."},{"question":"what is the format of a .xip file","response":"XIP files serve a similar purpose as a zip file, while allowing for the addition and verification of a digital signature to ensure the content's integrity before being expanded. \nXIP is essentially a variation of XAR archives utilizing gzip compression and includes metadata like checksums and timestamps."},{"question":"what is the meaning of the crc counter on a cisco device?","response":"CRC is a polynomial function on the frame which returns a 4B number in Ethernet. \nThe counter is increasing because your frames are being corrupted. \nIt will catch all single bit errors and a good percentage of double bit errors."},{"question":"is there a benefit in compiling your code as you go along?","response":"Compiling code as you progress can be advantageous in software development processes such as UI design or programming, as it provides a shorter feedback loop. \nThis can help you identify and fix errors promptly, reducing the time and resources required to address issues that could have been quickly resolved when they were first made."},{"question":"using sed to find and replace","response":"To effectively use \"sed\" for search and replace functionalities, it's important to employ both the -i and -e options. \nThe correct sequence involves -i to edit files directly and -e to specify the substitution command. \nAn example of a sed command to replace text would be 'sed -i 's\/fea\/asd\/g' hello.txt', which performs a global substitution in place within the file."},{"question":"how to get keycodes for xmodmap?","response":"The tool 'xev' should normally generate KeyPress and KeyRelease events for keys such as Alt and Super when pressed. \nIf 'xev' is not functioning as expected, it might be due to other processes intercepting the keypress or causing the window to lose focus. \nOne can run 'xev' in an otherwise empty X server to ensure no other applications are interfering."},{"question":"how can i add a shortcut to a particular google drive document to my android homescreen?","response":"For Android 3.0 and below, you can add a shortcut to your document by pressing and holding on a blank area of your launcher, then clicking \"Shortcuts\", and then selecting \"Drive Shortcut\". \nIn Android 4.0 and above, you can locate \"Drive Shortcut\" in the Widgets section of your app drawer, long-press it, and then place it on your desktop. \nAn alternative method involves copying the document's link from Google Drive, pasting it into a web browser, and then adding the page to your homescreen. \nAdditionally, the Drive app allows you to add a document to your homescreen by clicking \"add to homescreen\" via the context menu. \nAs of August 2016, Google Drive has introduced an \"Add homescreen shortcuts to your favorite files\" feature."},{"question":"can i get back snow-leopard-like application hiding (cmd-h) in lion?","response":"To regain Snow Leopard-like application hiding (Cmd-H) in Lion, it appears that the only effective method at the moment is to simulate it by switching to all open apps before executing the hide command."},{"question":"my boss asks me to stop writing small functions and do everything in the same loop","response":"You might have to either adapt to their coding style or consider working under someone with a coding philosophy that aligns better with your own. \nIt's advised not to cluster all code into a single lengthy loop; instead, it is beneficial to modularize the code by extracting significant segments that have a single responsibility and can be reused. \nRefactoring pieces of code into separate, well-named functions as opposed to using comments should be considered to enhance the clarity of your code. \nFunctions should have a clear, well-defined purpose and meet those objectives rather than being too small or too large. \nYour boss is right because, in certain instances, a line of code can be better if it's concise and clear; however, breaking down complex logic into smaller components is generally good practice for maintaining and understanding the code. \nUnit tests play a crucial role by allowing you to assess the accuracy of each function separately, something which is difficult with larger, aggregated code. \nYour boss's unfamiliarity with unit testing practices may lead them to enforce coding styles that might solve short-term problems but could create long-term issues."},{"question":"how to connect wireless keyboard to mac from login screen?","response":"Unplug ALL USB devices, have your wireless keyboard and mouse turned on, and restart."},{"question":"how do i convert an epoch timestamp to a human readable format on the cli?","response":"One approach to convert an epoch timestamp to \"hrf\" is to use the command: `date -d @1190000000` and replace the 1190000000 with your specific epoch. \nFor a custom date format using GNU date, the command is: `date -d @1234567890 +'%Y-%m-%d %H:%M:%S'`. \nAlternatively, you can use GNU awk with the command: `awk 'BEGIN { print strftime(\"%Y-%m-%d %H:%M:%S\", 1234567890); }'`. \nWith the zsh shell, you could use the strftime builtin: `strftime format epochtime` to output the date denoted by epochtime in the specified format."},{"question":"what is the difference between null and zero?","response":"Zero is a numeric value that can be utilized in calculations and operations. \nOn the other hand, null is not a value; it is a unicorn and represents a complete absence or lack thereof. \nIn the realm of measurable quantity, zero embodies a specific numerical value, while null signifies non-existence, nothingness, or a void."},{"question":"why is video tearing such a problem in linux?","response":"Screen tearing is often a result of drivers that aren't there yet and the lack of vertical synchronization (vsync) with certain window managers. \nAdditionally, the X server's architecture, which is outdated and doesn't align well with today's graphics hardware, contributes significantly to the issue. \nExperimenting with different drivers and configurations, including Wayland, may alleviate screen tearing, and modern open-source drivers are expected to improve the situation as they evolve."},{"question":"how to check os and version using a linux command","response":"If it is a Debian-based system, use the command `cat \/etc\/*_version`; for a Red Hat or CentOS-based system, try `cat \/etc\/*-release`. \nThe command `uname(1)` is recommended if you need the kernel version. \nTo check the Red Hat Linux version on RH-based OSs, the command `cat \/etc\/redhat-release` is appropriate. \nAlternatively, the `lsb_release -a` command may work on any Linux distribution. \nIt's also possible to use `cat \/etc\/issue.net` to find out the OS version."},{"question":"what stops google from saving all the information on my computer through google chrome?","response":"There are no processes and systems that stop this. \nSELinux is an operating system-level technology that imposes strict restrictions on the processes that can be accessed, such as your browser. \nTrust is equally essential alongside objective measures in determining the safety of data on your computer when using services like Google Chrome. \nIf one is particularly cautious, outgoing firewalls can be configured to monitor and potentially restrict traffic, although this can be impractical due to the complexity of web traffic. \nTo make your computer data inaccessible, you could unplug it from all networks, which guarantees the data cannot be copied. \nLastly, lawyers and legal documents like the Google Chrome Terms of Service play a role as a sort of agreement on what Google can and cannot do with user data. \nThere are policies in place that rely on the norms of trust within society, yet no direct technical mechanisms ensure complete prevention of unwanted actions."},{"question":"isnt ubuntus system prompt for my password spoofable?","response":"When interacting with dialog prompts on Linux or Ubuntu, users cannot be certain these prompts are actually from the operating system rather than a deceptive application attempting to gain broader access by requesting the user's password. \nMoreover, it is suggested that even legitimate requests for elevated privileges through these prompts should be approached with skepticism, as user consent for application access should not be given lightly."},{"question":"why do ads for s\/w engineers always say they offer a fast-paced environment?","response":"Job ads for software engineers frequently emphasize a fast-paced environment, because most job ads aren't written by software engineers. \nFor some, \"fast-paced\" equates to excitement, suggesting a wealth of interesting responsibilities and opportunities for skill development. \nAlso, the reason could be that good developers get bored easily and when they get bored they leave. \nTo some, a fast-paced environment implies a high workload and the need for employees to stay productive. \nThe phrase \"fast-paced environment\" could be interpreted either as code for \"We change our minds a lot about what we want from the software\", or for wanting someone who can keep up with technology or learn and adapt quickly to new challenges. \nHowever, the phrase also raises concerns about the potential for unpaid overtime, with some interpreting it as a euphemism for extended work hours and a challenging and stressful atmosphere. \nIt might also serve as a subtle warning, possibly aimed at an attempt to scare away the lazy programmers. \nAnother perspective suggests that the term \"fast-paced environment\" is deliberately vague, allowing individuals to interpret it in a way that aligns with their preferences or a way of making the ad sound cool or modern and avoid seeming outdated. \nSome say that most HR departments go to their competitor's website, and find a similar job to the one they need to fill, copy, and paste. \nJob ads, often concise and filled with buzzwords, may not truly capture the complexities of the work environment. \nWhile many focus on the potential negatives of a fast-paced setting, some argue that it is a necessary element to prevent stagnation in software development. \nAdditionally, the phrase might reflect a company's commitment to making business-based decisions driven by customer requirements."},{"question":"how to change notification sound whatsapp android?","response":"To change your WhatsApp notification tone, go to your phone's settings. \nOnce there, select what should be the bottom option, \"Notifications\" and tap \"Notification tone\". \nNow you will be able to select a sound file to replace the default notification tone. \nAlternatively, for WhatsApp Version 2.20.108 on Android 6 with the language set to English (UK), open the WhatsApp Chats Tab and tap the three-dot-menu on the top right, then\n\"Settings\" then \"Notifications\" then \"Messages\". \nNow you can tap on \"Notification tone\" and finally \"Media Storage\" to find any MP3 file on your phone to use as a replacement sound."},{"question":"what is the difference between error and fault?","response":"A fault is the adjudged or hypothesized cause of an error."},{"question":"are there naming conventions for variables in shell scripts?","response":"In terms of coding style when naming variables or constants, one approach is to use both uppercase and lowercase, as demonstrated by examples like MY_CONSTANT and my_variable. \nDigits can be separated to make the number more readable (e.g. 1_000_000_000)."},{"question":"how to fix brew after osx upgrade to yosemite?","response":"To address the Ruby version and location change on the new Mac OS X, it is recommended to edit the file found at \/usr\/local\/Library\/brew.rb by replacing \"1.8\" with \"Current\" on the first line. \nFor users experiencing problems with brew after attempting other solutions, a simpler approach is to completely re-install brew by first running the uninstall command provided on their official website, followed by a fresh install."},{"question":"homebrew: your clt does not support macos 11.0","response":"Brew is currently undergoing incremental updates to ensure compatibility with MacOS Big Sur. \nHowever, you may be able to solve the issue by downloading Command Line Tools for Xcode 12.3 from the Apple website."},{"question":"how do i move a window whose title bar is off-screen?","response":"For managing windows on a computer screen, you might want to try Window > Zoom from the menubar. \nWindows that are resizable could be moved by dragging them horizontally from the bottom edge. \nAlso, on OSX 10.9.1, holding the option (or alt) key while clicking the Window menu should arrange the windows correctly. \nMoreover, pressing the alt\/options key while resizing a window from its bottom side can resize both the side being dragged and its opposite side simultaneously and bring the toolbar back into view. \nIn applications, such as Filezilla, without a window menu, dragging the lower corners while holding option is a viable solution. \nAdditionally, holding the shift key while dragging any edge can also modify the window size. \nAn alternative method is to temporarily increase the screen resolution to reveal the off-screen title bar. \nThis can be done by navigating to System Preferences > Displays > Display and selecting Scaled."},{"question":"when choosing a numeric pin, does it help or hurt to make each digit unique?","response":"Repeating digits is a common human weakness when choosing PIN codes, which means they will be tried first by attackers, so ruling out repeated numbers increases security. \n\nHowever, it depends on the implementation and on how the PIN is created: if the PIN is generated, excluding combinations will reduce the entropy, but for human-generated PINs you should exclude the most common combinations, such as 1234 and 1111."},{"question":"does pressing a car remote many times offer denial of service attack for rolling codes?","response":"It is possible to render a key fob useless by desynchronizing it from the car, which can be done by repeatedly pressing the button out of the car's range, i.e., at least 256 times. \nAn attack aiming to disable the rolling code feature in key fobs, which is used for authentication, would generally not be a successful denial of service attack on a car."},{"question":"how can i execute local script on remote machine and include arguments?","response":"Sample script: $ more ex.bash #!\/bin\/bash echo $1 $2, for example: $ ssh serverA \"bash -s\" < .\/ex.bash \"hi\" \"bye\". \n\nYou can pacify bash by terminating it from taking any of the remaining command line arguments for itself using the -- argument. \n\nYou can also simply hardcode it."},{"question":"do you know .swp file?","response":".swp files serve as a type of lock file created by your text editor, such as vim, to signal that a file is currently being edited. \nThis ensures that anyone else attempting to edit the file, either locally or over a network, is alerted to the fact that it is already open. \nThey also function as state files to store changes made since the last save and to keep other edit-related data such as unsaved macros and the undo history. \nIn the event of a system crash, these swap files can be used to recover unsaved changes."},{"question":"how do i remove a directory and all its contents?","response":"Use the command `rm -rf directoryname` to remove the directory and its contents. \nIf this command does not succeed, alternatives like `rm -R -f directoryname` or `rm --recursive -f directoryname` might work. \nShould these commands still not yield the desired results, it may be necessary to either reinstall the `rm` command or to try a different shell."},{"question":"i found unknown php code on my server. how do i de-obfuscate the code?","response":"To de-obfuscate PHP files safely, you should not attempt the process on your web server. \nPHP.ini includes a disable_functions feature that lets you choose which parts of the functionality to block, providing a way to selectively restrict access to specific functions."},{"question":"how do i reset the scrollback in the terminal via a shell command?","response":"\u2318K is a shortcut for the action \"View > Clear scrollback\" and, in an update, this command can be automated with this command with AppleScript: osascript -e 'tell application \"System Events\" to keystroke \"k\" using command down'."},{"question":"osx is repeatedly asking for login keychain password","response":"One approach is to open the keychain at log-in and keep it open, but this is generally not recommended. \nAlternatively, open the keychain, locate the specific applications, and configure them to have access. \nRepairing the Keychain app could resolve certain issues that arise with it. \nIn cases where the default keychain needs to be reset, one would lose all saved passwords, but it can be a necessary step to fix certain problems. \nAdditionally, keychains typically lock after a period of inactivity or when the computer sleeps; however, these settings can be changed to prevent automatic locking."},{"question":"why inode number starts from 1?","response":"In the ext4 filesystem, Inode 1 serves the specific function of monitoring bad blocks within the storage device. \nIt essentially functions as a concealed file that lists bad sectors identified on the disk, which can be detected using tools such as e2fsck with the \"-c\" option."},{"question":"simple method for reliably detecting code in text?","response":"To identify programming languages in a block of text, you could look for a semicolon followed by a newline, a common sequence in languages such as C, C++, Java, and C#. \nAnother method is to count the occurrence of special characters typically used in programming, like '[]', '()', and ';'. \nRunning a syntax highlighter on the text can also help determine if it contains code, as a high percentage of highlighted text would indicate programming content. \nWriting simple patterns to detect language-specific syntax, as seen in languages influenced by C, can be useful. \nAdditionally, detecting whether the body of a question contains specific language names, like \"Javascript\" or \"Java,\" might signal the presence of related source code. \nFor a more in-depth analysis, implementing multiple Markov chains trained on code samples of various languages can provide a statistical model to predict the likelihood of text being code. \nAlternatively, using an English language-checker to identify non-language symbols could suggest the presence of code, especially on platforms like Stack Overflow, where English is the primary language."},{"question":"can i zip an entire folder using gzip?","response":"Gzip does not inherently zip an entire directory; it serves purely as a compression algorithm. \nIn contrast, using the gzip command with the -r switch will result in each file within a directory being compressed separately, not as a single zip file. \nTo compress a whole folder, you can use `tar -cvf - dir | pigz -9 > \/path\/to\/dir.tar.gz` syntax. \nAlternatively, the zip utility allows the recursive compression of a folder with the syntax `zip -r `."},{"question":"how to change your email name icloud?","response":"Log into iCloud.com, click Mail, and then at the bottom-left of the screen click on the Settings (gear) icon, click Preferences in the pop-up menu, then click Accounts, and change Full Name to how you would like your name to appear."},{"question":"what is the difference between routing and forwarding?","response":"forwarding is used to describe moving any protocol across the network, while deciding which exit interface to use to send the packet to its next hop. \nRouting is the process of forwarding packets at L3 of the OSI model."},{"question":"how can i explain to non-techie friends that cryptography is good?","response":"The concept of \"cryptography\" emphasizes the importance of \"private communications\" for societal well-being, reflecting more of a philosophical than a technical issue. \nYou can relate the concept to the flawed arguments from the RIAA's anti-piracy campaigns of the early 2000s, making analogies with physical security measures like armored cars for money, safes for valuables, and locked front doors for privacy. \nAnother perspective suggests equating \"cryptography\" with household \"locks and keys\" to challenge views on privacy and security. \nA rhetorical tactic invites reflection on privacy by asking if people should all use the bathroom with the door open just because someone defecates publicly. \nYou can also try explaining through film narratives, the movie \"Sneakers\" is drawn to illustrate the potential calamities stemming from nonexistent or compromised cryptography."},{"question":"how can i see what ip address my android phone has?","response":"To easily know the IP address, you can go to the Wi-Fi Settings and navigate to Menu > Advanced. \nAnother method is dialing *#*#4636#*#* on your phone to open the Testing menu, where you can then select Wi-Fi information and Wi-Fi Status. \nAdditionally, OS Monitor is an application that provides network details, including interface names, IPv4 and IPv6 addresses, MAC addresses, and packet statistics. \nFor developers, using adb shell netcfg | grep wlan0 from a desktop with an Android device connected via USB is effective for showing the interface details. \nAnother option involves installing a terminal emulator app like Terminal Emulator from Jack Palevich and entering the netcfg to obtain network information. \nFor both WiFi and Mobile Data, using a terminal emulator app with the command ~$ ip -o a is a viable approach that does not require root access."},{"question":"what is java programmed in?","response":"The very first Java compiler developed by Sun Microsystems was written in C, but now the class libraries are always written in Java."},{"question":"better colors so comments arent dark blue in vim?","response":"In order to manually adjust comment colors in Vim, one approach is to use the command \"hi Comment guifg=#ABCDEF\", substituting ABCDEF with an appropriate color hex code. \nThe command \"set background=dark\" should be used to ensure a dark background in the terminal instead of the default light background setting. \nYou should add the respective commands to your ~\/.vimrc file for a permanent configuration. \nAdditionally, you may need to set t_Co=256 in your vimrc file and adjust your terminal settings to support 256 colors to achieve the desired results. \nIf you want to create your gvim colors, there are online tools such as the one available at hmi-tech.in to help you customize and paste them into your vimrc file."},{"question":"how do i download an ios app (ipa) file to my mac after itunes 12.7 update?","response":"You can utilize the Mac \"Apple Configurator 2\" Update button solution to download an iOS App (IPA) file to your Mac after the iTunes 12.7 update. \nAlternatively, iMazing 2.5 for Mac and PC offers the capability to download apps from the App Store and install .ipa files."},{"question":"how do i make `ls` show file sizes in megabytes?","response":"To make `ls` show file sizes in megabytes, you can use ls -lh, which gives human-readable file sizes in long format and uses k, M, G, and T suffixes. \nAlternatively, you can use --block-size=MB, specifying the block size in megabytes, for example, --block-size=1M."},{"question":"how can i stop applications and services from running?","response":"If an app does something you disapprove of, such as running in the background or at startup, the quickest solution is to uninstall it. \nReaching out to the app's developer can lead to a fix, allowing you to continue using the app normally. \nMany applications close completely if you exit them using the Back button instead of the Home button."},{"question":"can i share my imacs internet to iphone or ipad over usb?","response":"Before the launch of iOS 10, the capability to adjust certain device features was possible only with a jailbroken device. \nHowever, this changed with macOS 10.12 and iOS 10, which support the feature without needing a jailbreak or additional apps. \nEnhancements to this functionality were included in the later macOS 10.13 as a component of asset caching and were integrated into Apple Configurator 2 to assist with the network setup of multiple iOS devices sharing a Mac network. \nThe Bluetooth PAN sharing feature was available to all iDevices at one time but currently seems to have inconsistent functionality, primarily working with iPads while most iPhones report failures. \nUsing Apple's development tool, one can achieve iPhone-Mac-Internet tethering, as detailed in steps between the \"Remote Virtual Interfaces\" and \"Using tcpdump\" sections. \nSharing an iMac's Ethernet connection to an iPad or iPhone is also possible with additional hardware requirements, and Bluetooth tethering remains an option mainly for iPads and Android devices. \nMacOS Sierra allows Internet connection sharing from a Mac to an iPhone via USB following specific instructions to utilize the iPhone USB option. \nMoreover, sharing a Mac's Wi-Fi connection with an iPhone can be achieved by connecting with a USB-Lightning cable and disabling Wi-Fi on the iPhone."},{"question":"nmap do not show filtered ports?","response":"When scanning with Nmap and the status of a port is ambiguous, indicated as either open or filtered, this could be due to a packet filter dropping the scanning probe or any response that might have been elicited. \nAlso note that the Nmap default only scans the most common 1,000 ports, so if yours isn't reported, it may be outside that group; to ensure that Nmap scans certain ports, you can specify which ones to scan using the -p option."},{"question":"are private, unguessable urls equivalent to password-based authentication?","response":"Private or hard-to-guess URLs are not equivalent to password-based authentication and should not be considered equivalent. \nA private URL is recognized as somewhat weaker than authentication with credentials because it can more easily leak in various ways, such as through browser caching, server logging, or appearing in referer headers on other sites. \nPretty much all authentication schemes boil down to proving you know a secret, whether it's a password or a URL. \nA secret URL is just as secure as a secret password but passwords are easier to keep secret than URLs, because it is known that passwords must remain secret. \nSecurity-wise, a secret URL is not bound to a specific user; on the other hand, a password is linked directly to a unique user account, offering more granular control over access. \nFurthermore, most password authentication systems have a limited number of attempts at guessing a password for a user before further authentication attempts are either locked out, or limited, but implementing similar controls for URL schemes might be more difficult and it may be hard to stop someone setting up to work their way through your 'random' URL space."},{"question":"where are systemd service logs?","response":"For most distributions currently in use, the standard method to review the stdout and stderr of a systemd unit is via journalctl; to view them, one would execute a command like sudo journalctl -u followed by the name of the unit. \nOn Fedora systems, such logs are typically found at the \/var\/log\/messages directory."},{"question":"how to update linux locate cache","response":"The command for updating the database is: sudo updatedb. \nFor additional information, refer to the manual pages by using the command man updatedb."},{"question":"my gmail is signed in through the app on ex-boyfriends phone","response":"To safeguard your Google account and prevent unauthorized access, it's recommended to change your password as an initial step of security. \nThis action will result in the automatic logout of other devices where your account might be active. \nAdditionally, for enhanced security, visit your Google account's security permissions page, i.e., https:\/\/security.google.com\/settings\/security\/permissions, revoke access to all items listed there, and keep track of your account activity. \nIf you suspect misuse of your account on an Android device you no longer possess, you can use the Android Device Manager to lock or erase the phone, thus securing your data. \nMoreover, within Gmail, clicking the \u201cDetails\u201d link in the bottom right-hand corner and \"Signing Out\" of all sessions can further ensure that no other sessions remain open."},{"question":"is there a tool to get the lines in one file that are not in another?","response":"The standard grep tool for searching files for text strings can be used to subtract all the lines in one file from another. \n\nIf the files you are comparing are sorted text files, then the GNU tool called comm may perform the filtering you are after. \n\nYou could also consider vimdiff, which highlights the differences between files in a vim editor. \n\nThe grep and comm (with sort) methods take a long time on large files, but there are awk methods for extracting lines unique to one of two files."},{"question":"how can i run a cron command with existing environmental variables?","response":"In the crontab, before you command, add . $HOME\/.profile, for example: 0 5 * * * . $HOME\/.profile; \/path\/to\/command\/to\/run. \n\nThe general practice is to specifically set all required environmental variables in a script that is to be run from a cron job. \n\nYou can use a wrapper script, which is a script launched by cron: in ~\/.cronfile you specify the environment for your cron jobs. \n\nA working solution is: 0 5 * * * SOME_ENV_VAR=some_value some_command some_parameters. \n\nRun the script with cron and have the environment in the script, using in the crontab -e file: SHELL=\/bin\/bash *\/1 * * * * $HOME\/cron_job.sh In cron_job.sh file: #!\/bin\/bash source $HOME\/.bash_profile some_other_cmd. \n\nYou can run the script with cron and tell bash to login. \n\nAdd BASH_ENV=\/home\/user\/.profile to the crontab. \n\nSetting PATH with the path of commands may help, and it is even better if you can later use a template and detemplatize. \n\nYou can put global environment variables in \/etc\/environment, which will be loaded when a program is run by the crontab, for example: env | grep ORACLE_HOME >> \/etc\/environment service crontab restart."},{"question":"how to copy the partition layout of a whole disk using standard tools","response":"For disk operations on both MBR and GPT partitioned disks, you can employ the `sfdisk` tool. \nWhen saving a partition table, the command `sfdisk -d \/dev\/sdX > part_table` is used. \nTo restore a partition table while keeping the same disk and partition IDs, use `sfdisk \/dev\/sdX < part_table`. \nIf you want to restore but create new disk and partition IDs, you should remove references to UUIDs and the disk ID from the partition table dump before using `sfdisk \/dev\/sdY`. \nTo note, starting with util-linux 2.26, `sfdisk` has been revamped and now relies on libfdisk. \nAs a default operation, `sfdisk` will replicate the original disk IDs, creating an exact clone rather than just copying the layout. \nHowever, it's important to realize that Linux's \/dev\/disk\/by-uuid\/ looks at filesystem UUIDs, though, not UUIDs in the partition table. \nLastly, a preferred method involves the command: sfdisk -d \/dev\/nvme0n1 | sfdisk \/dev\/nvme1n1, where \/dev\/nvme0n1 is the source disk, and \/dev\/nvme1n1 is the target disk."},{"question":"how do you move all files (including hidden) from one directory to another?","response":"One method to move files using the shell is the command `#!\/bin\/bash shopt -s dotglob mv Foo\/* Bar\/`, which includes filenames starting with a '.' in the pathname expansion. \nAnother approach is utilizing the find command with the structure `find Foo\/ -type f -exec mv -t Bar\/ {} \\+`, where \"type f\" restricts the find command to finding files. \nIn zsh, you can use the syntax `mv Foo\/*(DN) Bar\/` or `setopt -s glob_dots`. \nA simple solution in bash to include hidden files but exclude directories is the command `mv {Foo\/*,Foo\/.*} Bar\/`, applying a test within a for loop to ensure only files are moved. \nRsync also offers a viable method with the command `rsync -axvP --remove-source-files sourcedirectory\/ targetdirectory`; however, it leaves behind an empty directory structure. \nLastly, for bash, a working command without altering shell options is `mv sourcedir\/{*,.*} destdir\/`, and for more complex file selections, you can expand the expression in the curly braces."},{"question":"what is the key difference between the control plane and data plane?","response":"The data plane encompasses the functions and processes that facilitate the forwarding of packets or frames from one interface to another. \nWhen referring to the control plane, this involves the router functions and components that populate the routing table or forwarding table, in turn enabling data plane functions. \nThis control plane is also responsible for managing system configuration and initiating the exchange of routing table information, as well as processing control plane packets to refresh the routing table. \nRegarding the data plane, routers or firewalls use the information created by the control plane to correctly forward packets or frames to their intended destination."},{"question":"how to automatically login to captive portals on os x?","response":"You can rename the app to a different title, allowing password management via a preferred web browser and compatible extensions such as 1password. \nSpecificaly, one can rename \/System\/Library\/CoreServices\/Captive Network Assistant.app into \/System\/Library\/CoreServices\/No More Captive Network Assistant.app. \nAdditionally, the NetworkAutoLogin project by Tyilo facilitates automated login to Captive Portal Networks by injecting pre-determined credentials through a configuration file."},{"question":"how to check if my hd is case sensitive or not?","response":"To read the File System Personality using a terminal, execute the command 'diskutil info \/'. \nThis command is also handy if you're using Disk Utility, which shows the same information in its info window. \nThe Terminal.app is the quickest way to perform this action by issuing 'diskutil info \/Volumes\/NAME-OF-VOLUME' or adding a grep command to filter for 'User Visible'. \nIf the ls command displays both files, abc1 and ABC2, then your drive is case insensitive. \nA practical test to determine if your drive's file system is case insensitive is by using touch to create two files with names differing only by case and then utilizing ls to check if both appear. \nAdditionally, running 'diskutil info ' will clearly indicate the File System Personality. \nEchoing text to a temporary file in a specific case format and then using cat to read it back is another method to verify if the file system is case-sensitive. \nLastly, using touch to create files with similar names with case variations can help test case sensitivity based on the number of files shown by ls."},{"question":"how to create a text file in a folder","response":"To create a text file in a folder, one option is to navigate to the desired directory in Terminal and execute the command: touch file.txt. \nAnother method is to prepare an empty text file on the desktop to use as a template, then Option\/Alt-drag it to the desired folder to create a copy. \nAlternatively, Mac users can download utilities like NewTextFileHere and NewRTFHere that integrate with Finder and allow the creation of text or RTF files within a currently open folder. \nThe Easy New File Creator app offers a Finder extension for macOS that adds the ability to create new files in the Finder context menu, with customization options for the file name and type. \nMoreover, BetterTouchTool provides a convenient \"Create New File in Current Folder\" action that can streamline this process."},{"question":"paint.net alternative for mac os x","response":"Skitch is recommended for its ability to share ideas with annotations, shapes, and sketches quickly. \nAlternatively, Mac's built-in Preview.app provides tools for adding annotations, arrows, shapes, text, magnifying glass and more, although it is not as lightweight as Skitch. \nFor more complex editing capabilities, Gimp can be utilized, though it comes with a steeper learning curve. \nPinta is another free option, offering a simple and powerful way to draw and manipulate images across different platforms. \nPreview.app is also suitable for its quick startup time and seamless integration with OS X's Mail.app for markup purposes; it provides lightweight snapshot creation that can include menus and the mouse pointer, but for more advanced annotation needs, Skitch might be the better choice. \nIf you use Google Drive instead of Dropbox, Marqueed is a suitable online tool for image annotation. \nTechSmith's Snagit, while not free, provides various annotation features for screenshots on Mac and Windows. \nLastly, Patina, available on the Mac App Store, offers a user-friendly interface with features like continuous object rotation and transparent image saving."},{"question":"how to retrieve the wi-fi password of a connected network on a mac","response":"To retrieve a Wi-Fi password on a Mac, use Spotlight to open Keychain Access, type in the Wi-Fi network's name, then find and select the key to reveal the password upon entering your system password. \nAlternatively, if the Wi-Fi password has been stored, it can be accessed through the Keychain Access application by finding the relevant AirPort network password entry and checking the 'Show password' option. \nLastly, for those comfortable with the Terminal, a command-line solution is available utilizing the `security` command to find generic passwords including Wi-Fi networks. \nThe command would be: security find-generic-password -a \"$1\" -g | tail -0 I."},{"question":"how to disable full screen animation on os x 10.9","response":"Unfortunately, on OS X 10.9, there is a built-in animation delay that takes about a second, and you'll need to live with it. \nHowever, if you want to modify the behavior for specific applications, you can edit the Info.plist file for each application intended to run in full-screen mode. \nFor later macOS versions like Sierra (10.12) and above, you can explore the \"Reduce motion\" option in System Preferences > Accessibility > Display to potentially mitigate the animation effects."},{"question":"can i connect 2 bluetooth headphones to ipad?","response":"No, you can't pair multiple Bluetooth headsets and listen through both simultaneously, though you can use a single earpiece from the same headset, or purchase a Bluetooth splitter."},{"question":"why are the sizes of programs so large?","response":"Graphics have evolved to be displayed at varying screen resolutions, requiring images of significantly larger dimensions and the addition of vector graphics rendering capabilities that were not necessary before. \nModern browsers are complex programs with extensive functionalities, a far cry from the simpler browsers of the past. \nUsers' needs are growing more sophisticated, driving software development that includes new layers of applications, additional security, and sometimes hardware upgrades. \nThe data within applications tends to be of higher resolution and quality today, significantly increasing their size. \nDependencies in software lead to incremental growth as third-party components add functionality\u2014often more than is used but necessary once a single function is incorporated. \nLibraries and sometimes superfluous compiled code also contribute to the increasing size of software. \nIn platforms like Android, more available space leads to larger app sizes, especially as developers utilize higher-resolution images and unnecessarily include third-party libraries. \nBuilt-in libraries within applications contribute to their size, with shared libraries on platforms like Linux often reducing this footprint."},{"question":"how to be a zero-bug programmer?","response":"To achieve the status of a zero-bug programmer, the advice is straightforward: abstain from coding entirely. \nSince bugs are an inevitable aspect of programming due to human error, the focus should instead be on diligent prevention, swift response to issues, learning from past errors, and keeping knowledge current."},{"question":"being told my network isnt pci compliant. i dont even have a server! do i have to comply?","response":"Don't secure your network: you can transfer PCI responsibility away from you to a billion dollar financial company, such as Square or PayPal Here, who will provide a modern card terminal with Point-to-Point Encryption (P2PE)."},{"question":"how umount device is busy?","response":"When faced with difficulties unmounting a volume, it may be due to another volume mounted on top of the one you're attempting to unmount. \nAnother potential problem is if you're logged into it multiple times, with at least one instance being in a directory within the desired unmount point. \nAdditionally, the inability to unmount may be because of processes that have open files on the mount point."},{"question":"what is the difference between distance vector and path vector?","response":"The path vector's information includes the 'path' of ASes that are used to reach the destination. \nOn the other hand, the distance vector gives you the actual number of link hops (RIP) or a metric of hops, and link speed. \nThe deployment of the path vector protocol means that BGP is using the valid and best path selection. \nIn contrast, the distance vector protocol follows the next-hop without considering the entire path from the source to the destination, prioritizing immediate direction over the best complete path."},{"question":"how can i punish a hacker?","response":"You don't punish the hacker, the law does, so report the incident to the most appropriate authorities or law enforcement agency, such as your local computer crime police office, and file a complaint and press charges against unknown individuals; if you hand over the IP address, you might get lucky, but it's very likely that they'll go unpunished. \n\nYou can send an abuse mail to his ISP if you look up the IP in the ripe.net database; ISP take legit abuse mails seriously. \n\nHacking Back is part of the Offensive Countermeasures movement that's gaining traction lately, but don't do it as it is illegal, and in some cases there are strict penalties for even the smallest of actions. \n\nThere's no profit in it for you to punish the attacker; your resources are best spent securing your server and getting on with business."},{"question":"umount: device is busy. why?","response":"The problem was a stale loopback mount, which was resolved by deleting the stale loopback configurations with losetup. \nOther issues include active screen sessions running in the background solved by killing the active shell sessions, a daemon running within a chroot environment (undetected by lsof and fuser) solved by using sudo ls -l \/proc\/*\/root | grep chroot and an open tmux socket. \nThere were instances where bind and overlay mounts impeded the unmounting process, which required checking tab completion for the concerned mount-point. \nCommonly, processes with open files are responsible for such issues, and using lsof or fuser commands can assist in identifying and terminating these processes to resolve the device busy error."},{"question":"what does -- (double-dash) mean?","response":"The phrase marks the end of parameter (option) list. \nIt's a convention to signal the end of command options in Bash, after which only positional arguments are recognized. \nThis is a specification where '--' denotes the completion of the options. \nAccording to utility syntax guidelines, a first non-option argument '--' should be treated as a delimiter to conclude options. \nFor POSIX-complaint utilities and those that parse options using the POSIX getopt() API, '--' signifies the cutoff point for options."},{"question":"is the save button delay in a firefox download dialog a security feature? what does it protect?","response":"Implementing a short delay in Firefox helps prevent the user from accidentally selecting the wrong option when interacting with a file dialog. \nAdditionally, the injected delay is a security feature that serves to deter attacks that hinge on misleading the user into bypassing the dialog box. \nFirefox's tactic of momentarily disabling the \"OK\" button compels users to re-evaluate their actions and scrutinize what they are about to download."},{"question":"how random number generators work?","response":"Random number generators work by generating a number sequence that appears random. \nThese generators are based on a chip with a small radio measuring white noise of deep space radiation, or a small radioactive sample, and measuring periods between its decay."},{"question":"what is the purpose of .bashrc and how does it work?","response":"A .bashrc file has the purpose of providing a place where you can set up variables, functions and aliases, define your PS1 prompt and define other settings used every time you open a new terminal window. \nA .bashrc works by being run each time you open up a new terminal, window or pane."},{"question":"are there keyboard shortcuts for home, end, pagedown, and pageup in os x?","response":"On a Macbook, you can combine the fn key with the arrow keys: fn+\u2191 corresponds to PageUp, fn+\u2193 to PageDown, fn+\u2190 to Home, and fn+\u2192 to End. \nIn applications like Safari and many others, the shortcuts \u2318+\u2192 and \u2318+\u2190 can be used to move the cursor to the end or the beginning of the line, respectively. \nFurthermore, combining CMD + FN with the left or right arrow keys serves for Home and End functions as well, representing yet another way to achieve the same actions."},{"question":"xfce how to switch workspace?","response":"The Xfce 4.12 interface features default shortcuts such as Ctrl+Alt+1, Ctrl+Alt+2, and so on, to move windows to specific numbered workspaces. \nXfce 4.12 also has various shortcuts dedicated to maneuvering windows between different workspaces, although there are no default shortcuts for moving workspaces in directions such as left, right, upper, or bottom."},{"question":"what does the (!) mean after uptime on htop","response":"The exclamation mark in htop indicates that the server has been operational for 100 days or more; while this was a point of pride in the past, a server being up for so long now likely indicates that it isn't up to date with kernels."},{"question":"how can i send stdout to multiple commands?","response":"There are a number of approaches to send stdout to multiple commands, such as capturing the command STDOUT to a variable and re-using it as many times as you like: `commandoutput=\"$(command-to-run)\" echo \"$commandoutput\" | grep -i errors echo \"$commandoutput\" | pbcopy`. \nYou can also use tee and process substitution: `cat file.txt | tee >(pbcopy) | grep errors`, which will send all the output of cat file.txt to pbcopy or create multiple pipes and specify each of them as one output of tee. \nAlternatively, you can play with process substitution, with two binaries which have the same output from `mycommand_exec as their process specific input: mycommand_exec |tee >(grep ook > ook.txt) >(grep eek > eek.txt) grep`. \nFurthermore, you can redirect the output to temporary files, and send those files to commands in loop, which can be useful when the order of executed commands may be of importance."},{"question":"can i connect my airpods to a different case?","response":"Yes, it's possible to use multiple charging cases for AirPods."},{"question":"session authentication vs token authentication","response":"For Session-based Authentication, the server retains full control of the authentication processes. \nAuthenticating in this manner provides the client a session_id after credentials are validated, which is used similarly to a token by being part of each further request. \nThis session_id is just a simple identifier while the server handles state management, user association, permissions, lifespan of the session, and the capability for real-time adjustments. \nPossessing the ability to log the user's actions on the websites, Session-based Authentication, however, may not scale well and can be memory-intensive. \nToken-based Authentication, on the other hand, operates on a stateless architecture with no server-side persistence of sessions. \nFollowing the exchange of credentials for a token, this token is included in every subsequent request and can contain all necessary information within itself, which is verified by the server with each request. \nThis approach can effectively reduce memory requirements, improve scalability, and provides exchangeability of tokens among different clients, a feature beneficial for flexibility."},{"question":"where android apps store data?","response":"In Android, root apps can store or alter files in any location they choose, while non-root apps are restricted to storing or modifying files in specific directories such as \/sdcard\/ and any subfolders that follow. \nTypically, installed applications will self-store in places like \/sdcard\/Android\/data or \/sdcard\/Android\/obb. \nAll applications, whether they require root access or not, are designed with a default data directory located at \/data\/data\/. \nMoreover, all apps are permitted to store data on the SDCard in any location, as they are not subject to any restrictions in this regard. \nThe storage of app files, whether by the system or by the app itself, is meticulously organized into internal and external storage across various categories. \nIn addition to these private directories, apps can store their data in any location on the primary external storage, provided they have the necessary WRITE_EXTERNAL_STORAGE permission."},{"question":"how to increase keyboard key repeat rate on os x?","response":"In the Karabiner app, on the second tab, named Key Repeat, there is an option called Repeat Rate. \nModifying this setting will have an immediate impact on the keyboard repeat rate."},{"question":"how can programming ability be used to help people in poverty?","response":"One can develop software to help doctors and teachers work more effectively with remote villages. \nUsing one's talent to earn money and donating a significant portion of it can also make an impact, as programmers often have the capacity to earn above their personal needs. \nContributing efforts to improve open-source projects, like Ubuntu Linux, directly supports those in poverty by providing free and accessible tools for managing their information needs."},{"question":"how do i update android on my device?","response":"If your device has an official update available, you should use the official method to update it. \nHowever, if no official update exists and you possess programming knowledge and understand Linux device drivers, you might consider attempting to create a custom ROM for your device."},{"question":"is the bbc\u2019s advice on choosing a password sensible?","response":"Some think it's not bad advice, although it depends on how strongly people follow it. \nLike most things in security, it depends on what you're trying to protect, and who you're trying to protect it from. \nIt is more secure than using one dictionary words or easy number sequences, which is what most people do. \nHowever, some people think that focusing on complexity is less important than length. \nAnd others criticize the advice because it is easy to guess with some basic information about you; you should never choose your passwords using a scheme that involves meaningful information to you, especially since hit songs are common (it reduces the search space for attackers). \nBasically, this technique is (a) overly complex, and (b) the resulting password is sub-optimal."},{"question":"refresh changed content of file opened in vi(m)","response":"In Vim, you can refresh your current file using the ':edit' command without specifying a filename. \nTo override unsaved changes and reload the file, use ':edit!'. Abbreviations for these commands include ':e' as a shorthand for edit and ':e!' for forcing a refresh. \nAn alternative to the manual refresh is to set Vim to autoread by adding ':set' autoread in your ~\/.vimrc, which allows automatic reloading of unchanged files. \nAdditionally, check ':checktime' for related commands."},{"question":"quotes problem in mavericks (or textedit)","response":"In Mavericks, you can modify the settings for quotation marks by accessing System Preferences, selecting Keyboard, and then navigating to the 'Text' sub-menu to disable \"Use smart quotes and dashes\". \nAdditionally, in TextEdit, ensure that Smart Quotes is deactivated in the Edit menu under Substitutions, and also check the Preferences within TextEdit to uncheck \"Smart quotes\"."},{"question":"why mtu should match in ospf?","response":"Enforcing matching MTUs is important to maintain performance requirements within routing protocols like OSPF. \nAdditionally, it is recommended to avoid IP fragmentation by designing OSPF protocol packets to be split into smaller packets."},{"question":"what kinds of encryption are _not_ breakable via quantum computers?","response":"In public key cryptography, three schemes are quantum-secure: Lattice based cryptography, like NTRUEncrypt, based on lattices; code-based cryptography, like McEliece cryptosystem, based on information theory; and multivariate cryptography, like Hidden Fields Equations. \n\nQuantum computing will have the most dramatic impact on asymmetric encryption, but symmetric algorithms like AES are considered safe with a large enough key size (256 bits)."},{"question":"is it safe to send clear usernames\/passwords on a https connection to authenticate users?","response":"Yes, as long as you verify the certificate validity, this is perfectly fine and is a standard approach, although it is not necessarily safe, as you also need to ensure that your site is protected against cross-site request forgeries. \n\nYou do not necessarily have to follow it, particularly for a personal site, and could use a federated login from Facebook, Google, or similar, which saves having quite a few forms and fields in your database, and means there is less to go wrong."},{"question":"how do i change the font color on my desktop icons mac?","response":"It is not possible to alter the color of the system font on OSX due to the encryption and license protection enforced by Apple's user agreement. \n\nUnfaithful answer with Insertions\nChanging the system font color is not doable, and this limitation extends to disabling full screen animation among other unique OSX graphical interface characteristics, all because of the stringent protections Apple enforces on its system graphics files. \n\nUnfaithful answer with Substitution\nAltering the system font color on OSX cannot be done; Apple's strict encryption and licensing under their user agreement prevent this, as well as modifications to other specific graphic interface features like full screen animation."},{"question":"is ethernet port blinking really useful?","response":"Yes, the lights can be very helpful when diagnosing problems, especially when dealing with non-managed switches, or remote diagnosis with inexperienced users."},{"question":"are https sites safe on public wifi?","response":"The encryption is fully suitable for insecure lines such as public WiFi because it originates from trusted root SSL certificate authorities like Verisign and Thawte. \nFurthermore, HTTPS is secure when used over public hotspots because during the setup of TLS, only the public key and encrypted messages are transmitted, which are additionally signed by root certificates. \nMoreover, SSL\/TLS is fundamentally secure, preventing attackers from deciphering keys or impersonating a user's encrypted traffic, courtesy of sophisticated key exchange protocols. \nHowever, the security of SSL\/TLS over public WiFi depends on various conditions, such as if users initiate their browsing in an encrypted manner and whether they heed browser warnings about certificate security. \nAdditionally, to ensure safe browsing, extensions like HTTPS Everywhere can ensure the constant use of secure connections."},{"question":"run a command that is shadowed by an alias","response":"Using uppercase when typing a command, like 'LS', may yield successful results, although it's unclear as to the reasons why this is effective."},{"question":"is it possible to install android on a pc?","response":"To experience Android on your PC, it might be more convenient to use an emulator. \nThere's an option like the Acer Aspire netbook which has Windows 7 and comes with Android 2.1 pre-installed. \nHowever, for a more flexible setup, software like Bluestacks or GenyMotion can be utilized. \nAdditionally, there are several methods to run Android on a PC, which include the Official Android Emulator, BlueStacks, YouWave, AppSurfer, the Android-x86 Project, Windroy, and Genymotion."},{"question":"how to set already-paired bluetooth devices again into discovery mode?","response":"Ensure the Bluetooth on the Mac it was previously connected to is turned off. \nIf no previously paired Mac is nearby, the Magic Trackpad will be available for new pairing. \nIf a trackpad or keyboard was paired with Mac A and you wish to pair it with Mac B, you can unpair from A, disable Bluetooth on A, or separate them by some distance before starting the new pairing with Mac B. \nTo pair an original Magic Trackpad or Magic Keyboard, hold the power button down during the entire pairing process until it is successfully connected. \nFor the Magic Keyboard 2, hold Command+W while powering on. \nFor a Magic Mouse, initiate discovery mode by holding the mouse button while turning it on and continue holding until the green light blinks. \nConnect an already-paired Magic Mouse 2 to the Mac using a Lightning-to-USB cable. \nThe Magic Mouse 2 has a discovery mode that involves holding down the click button while turning it on and then connecting to the Mac."},{"question":"how can i run ssh-add automatically, without a password prompt?","response":"To use ssh-keys without the inconvenience of repeatedly typing a password, one can employ ssh-keys that are without password protection."},{"question":"how to connect 2 monitors to macbook pro 2018?","response":"You can connect 3 x 4k-monitors to the 2018 15\" MacBook Pro, using USB-C to DisplayPort cables to connect the monitors. \n\nIf you are using a dock that has multiple display outputs, note that the MacBook Pro 2018 only has two thunderbolt busses, but 4 ports (2 ports per bus), as a result, if you try to connect three external monitors, you will need to use different sides of the device; if you try to connect all three monitors into two ports on one side, it won't work. \n\nOne way to use a single cable solution or a dock station is to connect two screens using a single port each, and the third using a tethered dock, which can even provide power to charge the laptop."},{"question":"is linux a unix?","response":"Linux is not derived from Unix source code; instead, it was created from scratch, thereby differentiating itself from Unix in terms of its origins and the standards it adheres to. \nHowever, Dennis Ritchie, one of Unix's co-creators, viewed Linux as a legitimate Unix derivative."},{"question":"how to disable scroll acceleration in macos sierra?","response":"USB Overdrive could be a potential solution to your problem, as it has been helpful for MacOS Sierra users facing similar issues. \nAnother method is adjusting the acceleration slider to \"null\" or \"max\" for the mouse wheel in the Logitech control center, which might be beneficial. \nDisabling scrolling inertia via System Preferences > Accessibility > Mouse & Trackpad could also address your concern. \nFurthermore, entering a specific command (Terminal: defaults write .GlobalPreferences com.apple.scrollwheel.scaling -1) to alter scroll wheel scaling and relogging is somewhat effective. \nYou can also write a small program to mitigate this behavior, which allows you to scroll in increments of three lines per wheel tick when running in the background. \nmacOS Sierra 10.12.2 public betas have removed the scroll wheel deadzone, and using a Terminal command can prevent scroll wheel acceleration in most applications. \nFinally, use the Smooze app, which can be used free of charge to disable mouse acceleration."},{"question":"is there any way to set a macbook pro to not sleep when you close the lid?","response":"One straightforward solution is to use InsomniaX, a menu bar utility; When activated, it keeps your laptop awake even when the lid is closed. \nAlternatively, without relying on third-party software, Apple suggests connecting an external keyboard, mouse, or trackpad (USB or Bluetooth) to maintain wakefulness. \nAnother option is the macOS-nosleep-extension, providing an alternative to InsomniaX. \nFor users comfortable with the command line, the built-in caffeinate utility, available in Mavericks and Yosemite, serves the same purpose."},{"question":"should websites be allowed to disable autocomplete on forms or fields?","response":"Some security testers always advise disabling auto complete, while others suggest \u201csecure\u201d auto-complete should never be disabled, but \u201cautomatic\u201d auto-complete should be disabled by default. \n\nOthers only object if a form field that asks for sensitive data (e.g., a credit card number), is NOT a password field, and does NOT have autocomplete=off, the rationale being that browsers manage autocomplete for passwords quite sensibly, but for non-password fields the autocomplete behavior is not desirable (for example, someone else might use the computer, go to an e-commerce checkout page and see the credit card details autocompleted). \n\nHowever, note that there is no reason known why a website should try to disable saving of passwords, and Chrome, Safari, IE, and Firefox ignore it."},{"question":"how do i set my dns when resolv.conf is being overwritten?","response":"One method to maintain desired DNS settings is by setting the immutable flag on the resolv.conf file right after editing it with nameserver addresses. \nYou can add $ sudo nano \/etc\/resolv.conf and save nameserver 8.8.8.8. \nAn alternative approach for dnsmasq users involves adding specific server lines to the dnsmasq.conf file. \nAdditionally, for users who receive DNS settings via DHCP and utilize NetworkManager, a solution exists by re-linking the \/etc\/resolv.conf file to the correct DHCP-provided resolv.conf file, allowing edits from the Network Manager interface, you can use # sudo ln -sf \/run\/systemd\/resolve\/resolv.conf \/etc\/resolv.conf."},{"question":"how to make textedit open with a blank file by default?","response":"To make TextEdit open with a blank file by default, follow these steps: Go to System Preferences > iCloud > uncheck \"Documents & Data\" from the sync list. \nAdditionally, navigate to System Preferences > iCloud > iCloud Drive (Options) > uncheck TextEdit."},{"question":"how to monitor only the last n lines of a log file?","response":"You can use watch: $ watch tail -n 15 mylogfile.txt. \n\nYou could stream the logfile running less and pressing SHIFT + F, and it will stream the file using less. \n\nIf you use watch, try the -n option to control the interval between each update, so the following would call tail every 2 seconds: $ watch -n 2 tail -n 15 mylogfile.txt; while this one polls it every 1 second: $ watch -n 1 tail -n 15 mylogfile.txt. \n\nYou can use the -d parameter: watch -d."},{"question":"is esxi linux or unix?","response":"VMware's ESXi is based on the linux kernel."},{"question":"pdf cannot be opened because it is from an unidentified developer?","response":"The document is likely marked as executable, so you need to remove the executable bit from the file. \n\nIt could also be because the file was downloaded from the internet; Safari marks it as quarantined to make it harder for malware to execute, so use the command xattr and check if one of the output lines is com.apple.quarantine, and, if so, use xattr -d com.apple.quarantine ."},{"question":"where is the folder that termux defaults to?","response":"The default directory for Termux is given as \/data\/data\/com.termux\/files\/home. \nTo confirm the current working directory, the `pwd` command is used. \nFurthermore, the `$HOME` variable query can also be utilized to reveal the \"default folder\" in which Termux operates. \nAdditionally, interactions with files such as browsing, creating, and manipulating can be performed within the Termux environment in this directory. \nIt's possible to manipulate the Android directory from Termux as well, but certain permissions must be enabled, specifically storage permissions, which allow for file creation in the local storage of the device."},{"question":"how can i prevent an ssh session from hanging in os x terminal?","response":"For enhanced SSH connectivity experiences, the mosh project can be used to manage network instability, such as network losses or machine sleep, and it will reestablish the connection once the network is available again. \nTo configure system-wide SSH settings, you can add the line 'ServerAliveInterval 10' to your \/etc\/ssh\/ssh_config file, which sends keep-alive packets every 10 seconds. \nAlternatively, setting 'ServerAliveInterval 60' along with 'TCPKeepAlive yes' in the same file can help maintaining the connection. \nFor Mac users, autossh can be installed to automatically reconnect SSH sessions after sleep or Wi-Fi disruptions, and it's possible to set up SSH to automatically connect upon login."},{"question":"how does linux handle multiple consecutive path separators (\/home\/\/\/\/username\/\/\/file)?","response":"There is no difference: multiple slashes are allowed, but are ignored (without effect), so are equivalent to a single slash."},{"question":"is every language written in c?","response":"Languages have existed before C, and many have been developed independently of it. \nIn addition to C, other languages like OCaml, Haskell, and Lisp dialects are used to create new languages."},{"question":"how to hide computer name and user name in terminal command prompt","response":"One way is to change your prompt in the ~\/.bashrc file and save your changes. \nAnother option is to follow a tutorial that guides you on modifying the bash prompt, for instance, by setting it to only display the username without the current path: PS1=\"\\u$ \" Result: myusername$ cat something.log. \nAlternatively, you can use the echo command to export the desired PS1 format into your ~\/.bash_profile: echo \"export PS1='$ '\" >> ~\/.bash_profile . ~\/.bash_profile. \nIn the terminal preferences, under the Shell tab, you can execute the command export PS1=\"\\W \\$\"; clear; and restart the terminal to see the changes. \nIf you prefer, you can directly edit your .bash_profile file or your root: sudo vim ~\/.bash_profile and add this line export PS1=\"\\W$: \". \nFor users of the Zsh shell, setting DEFAULT_USER in the ~\/.zshrc file to your regular username is another effective way to achieve the desired result."},{"question":"how can i get distribution name and version number in a simple shell script?","response":"To figure out your Linux distribution without the LSB release file, you can search for distribution-specific release files. Alternatively, you can use the command: `lsb_release -a` or `cat \/etc\/*-release` in the terminal to get the required information."},{"question":"do contacts get notified when you join whatsapp?","response":"Your contacts are not automatically notified when you join Whatsapp, but they will see your name if they look at their WhatsApp contacts list."},{"question":"what is the difference between computer science and programming?","response":"Computer science is the theoretical foundation of programming, representing the study of what computers can do; in contrast, programming is the practical implementation of computer science concepts, akin to the carpentry aspect, while computer science plays the role of architecture and design. \nIf an activity necessitates a computer to determine its functionality, it falls under the realm of programming."},{"question":"macos windows requiring an explicit click to make active, before ui elements inside can be clicked","response":"Generally speaking, the answer is \"no\"; however, there are some exceptions or workarounds to consider. \nFor instance, you can operate any control in an unfocused window using Cmd-Click, bypassing the need to focus the window first. \nIn specific applications, such as Terminal.app, Cmd-Right Click will paste the last highlighted text in any terminal window into the Terminal, focused or not. \nThere also used to be a hidden focus-follows-mouse option for Terminal.app windows. \nIf you're looking for a tool that enables focus-follows-mouse as a default system behavior, a tool called Yabai, which can be found on GitHub, is recommended."},{"question":"remap home and end to beginning and end of line","response":"The default shortcuts for moving to beginning or end of (wrapped) lines are \u2318\u2190 and \u2318\u2192; \u2325\u2191 and \u2325\u2193 or \u2303A and \u2303E move to the beginning or end of unwrapped lines (or paragraphs). \nYou can accomplish this by updating the rules section of ~\/.config\/karabiner\/karabiner.json with the JSON array. \nDoing so remaps the home and end keys to work the way they work on PC\/Windows."},{"question":"i included emoji in my password and now i cant log in to my account on yosemite","response":"Apple has made changes in macOS 10.11 El Capitan that prevent the use of emoji in the password entry field, so you would need to reset your password. \nAlternatively, adjusting your Keyboard Preferences can help resolve input issues, allowing you to add Unicode Hex Input and utilize a wide range of Unicode and Emoji characters."},{"question":"using terminal, how can i find which directory is my usb drive mounted in?","response":"All drives, whether internal, external, or networked, get mounted in the \/Volumes directory. \nYou can use commands like ls -a \/Volumes, ls -l \/Volumes, or ls -la \/Volumes to explore the mounted volumes and gather information. \nAnother command to try in Terminal is system_profiler SPUSBDataType, which provides more hardware information about your USB devices. \nFor a comprehensive approach, you may want to use a combination of native utilities in Terminal to ensure you get all the details."},{"question":"how do i copy a folder keeping owners and permissions intact?","response":"One can copy files while ensuring that permissions, ownership, and directory structure remain unchanged, using the command `tar cf - my_home | (cd \/media\/backup; sudo tar xf - )`. \nThe `cp` command also supports the preservation of file attributes with the option `-p`, which maintains modification time, access time, file flags, file mode, user ID, and group ID, according to the manual page. \nSimilarly, `sudo cp -rp` can be used to directly copy files from one location to another while preserving mode, ownership, and timestamps. \nAnother method involves using `sudo rsync -a', which nearly preserves everything, though it doesn't include hardlinks. \nThe command `cp -pdRx` is another alternative for preserving links, mode, ownership, and timestamps. \nIt's also noted that `cp` has a `-p` option specifically for preserving permissions. \nIf one prefers to copy directories exactly as they are, the `cp -a' option serves as a suitable method, retaining all file attributes and not dereferencing symlinks. \nLastly, one can use `cp -r --preserve=all` to ensure that all attributes like owner, group, and timestamp are kept intact during the backup process."},{"question":"why are there no put and delete methods on html forms?","response":"There are no PUT and DELETE methods on HTML forms primarily because there is no benefit. \nBrowsers face uncertainty about what to do once they send a PUT or a DELETE request. \nUnlike POST, which usually redirects to an appropriate page, PUT and DELETE typically lack a straightforward redirection mechanism. \nAdditionally, using PUT as a form method doesn't make much sense, as you wouldn't want to PUT a form payload. \nSimilarly, DELETE only makes sense if there is no payload, making it less suitable for integration with forms. \nAnother contributing factor is that only a few web servers supported PUT and DELETE."},{"question":"looping through files with spaces in the names?","response":"When dealing with shell variables that contain spaces, it is advisable to employ double quotes as in `diff \"$file\" \"\/some\/other\/path\/$file\"` to prevent issues with word-splitting. \nA zsh solution for file is (\/*.csv(ND.)) { do-something-with $file }. \n((D) to include hidden files, (N) to avoid the error if there's no match, (.) to restrict to regular files. \nBash 4.3 and above now supports it partially as well: shopt -s globstar nullglob dotglob for file in \/*.csv; do [ -f \"$file\" ] || continue [ -L \"$file\" ] && continue do-something-with \"$file\" done. \nAdditionally, Bash users have the `readarray` command at their disposal, which facilitates the handling of arrays, particularly when used with here-strings for splitting variables containing newlines."},{"question":"is there a way for me to run adb shell as root without typing in su?","response":"One approach for executing scripts as root without typing 'su' on an Android phone is to write the script directly on the device and then use 'adb' to execute it, like in the command: adb shell sh \/sdcard\/myscript.sh. \nAdditionally, if your Android device is rooted, it's possible to run commands using su -c, which runs the specified command with root permissions. \nFor enhancing security, you can install the adbd Insecure."},{"question":"what is certificate pinning?","response":"The concept referred to involves solutions to issues in SSL certificate chain verification. \nCertificate Pinning serves as a means to ignore the standard hierarchy of certificate trust by specifying to trust a certain certificate only, essentially disregarding other root CAs that might otherwise be considered trust anchors. \nAdditionally, it is a way for a server to state that this should not happen under normal conditions, and that the client should raise a metaphorical eyebrow should an unexpected certificate switch occur. \nSSL pinning potentially adds an extra security layer from replay attacks in which the app will bundle the known server certificates with itself. \nFinally, certificate pinning allows you to bypass standard certificate authority chains to mitigate the risk of an valid certificate be issued to a criminal."},{"question":"what is the difference between senior engineer and staff engineer?","response":"The difference between a senior engineer and a staff engineer depends on the company."},{"question":"are ipod classics still compatible with itunes?","response":"The iPod Classic no longer receives software support. \nFor those with older iPod models, using a version of iTunes earlier than 12.9 is advised, and these versions can be found via a Google search. \nIn some cases, an iPod Classic may continue to function with current software, but specific configurations such as matching bit versions for CPU, OS, and iTunes may be necessary to ensure compatibility. \nIf encountering issues with recent versions of iTunes, it may be necessary to use third-party music management applications to manage the iPod Classic."},{"question":"how does ssl\/tls work?","response":"General SSL, and its successor TLS, is a protocol that operates directly on top of TCP, although there are also implementations for datagram based protocols such as UDP. \nSSL's job is to detect alterations and ensure data confidentiality. \nThis enables protocols on higher layers, such as HTTP, to be left unchanged while still providing a secure connection. \nUnderneath the SSL layer, HTTP is identical to HTTPS."},{"question":"does tls use diffie hellman?","response":"Yes, SSL\/TLS uses Diffie-Hellman as \"ephemeral Diffie-Hellman\"."},{"question":"how can i copy files from my mac to pc via microsoft remote desktop?","response":"One approach to sharing data between a Mac and a PC is to utilize a Dropbox, permitting access from both machines. \nAnother method involves pasting to a specific file path on the network, namely \\\\tsclient\\OSX\\Users\\Shared. Alternatively, you could copy and paste the entire folder; simply mark the folder in the macOS Finder and press Cmd+C to copy it. \nThen, in the Windows Explorer, in the remote Desktop, press Ctrl+V to paste it."},{"question":"how can i avoid my macbook pro giving me minor shocks?","response":"One effective approach, as suggested is to use the adapter with a three-pin extension cord. \nThis seems to fix the issue of static shocks when the Apple extension cord is not utilized with the power adapter. \nAnother option is to purchase a cable designed to \"ground\" the appliance, reducing the sensation of shocks. \nSome users have found that dry skin, especially in hot and dry climates, can contribute to the problem. \nAlternatively, an unconventional but mentioned solution involves putting on shoes while working with the MacBook."},{"question":"how do i limit the number of files printed by ls?","response":"You could try: ls -U | head -4. \n\nSimilarly, try: ls -ld -- *() will list the first 4 files."},{"question":"what should you test with unit tests?","response":"Test-Driven Development (TDD) ensures high test coverage, generally over 90%, because no new functionality is added without first writing a failing unit test for it. \nBy following Test Driven Development practices, they will sort of guide you through the process and knowing what to test will come naturally. \nIt is advised to write tests for things you have a bad feeling in your gut or things that are very crucial and\/or elementary. \nStart by testing whether it does what it is designed to do. \nMoreover, equivalence partitioning and boundary value analysis are fundamental techniques that enhance the quantitative aspect of testing by dividing inputs into groups that produce equivalent outcomes and testing edge cases."},{"question":"can i connect my kindle fire to my iphone hotspot?","response":"The chances are more \"off\" than \"on\", as tethering isn't allowed for the iPhone or iPad (although it may be possible with jailbreaking). \n\nAlthough devices such as laptops (e.g., Sony VAIO FWIW) connects well over the WiFi hotspot of the iPhone and can access the internet, anecdotally Kindle won't allow tethered connections to iPhone 4, nor will Kindle WiFi6 connect. \n\nHowever, it is reported that a Kindle Fire (which is WiFi only) can connect to a mobile hotspot created by an iPhone to connect to the Internet; and that after enabling data roaming a kindle keyboard does connect via personal hotspot to an iPhone 4S."},{"question":"clicking on external links opens chrome but not the link","response":"If you encounter this problem, ensure that your Chrome browser is updated. \nIn some cases, Chrome might be waiting for you to relaunch it to apply the update, so a simple restart can often fix the problem. \nAdditionally, it's worth noting that a workaround for this issue has already been incorporated into Chromium."},{"question":"have touchbar show vol up, vol down, brightness up, brightness down buttons by default","response":"Set it to display the expanded control strip permanently. \nAdditionally, the default view for the Touch Bar can be changed via System Preferences to show the Expanded Control Strip. \nBetterTouchTool (BTT) can be used for highly personalized customization to add various controllers, actions, and app icons and make keyboard, trackpad, and mouse customizations. \nIt can also be configured for intuitive adjustments, such as sliding the Touch Bar with different numbers of fingers to control various features like volume and screen brightness, providing a touch-based alternative to traditional function keys. \nMoreover, the Touch Bar can be customized to show specific up and down buttons, and a time-saving shortcut exists where you can tap and drag side-to-side for immediate brightness or volume adjustments."},{"question":"what is the difference between server name and hostname?","response":"The appropriate term for referring to the name of a computer or device within a computer network is \"hostname\", which distinguishes it from the IP address of the machine. \nIn TCP\/IP networking specifically, \"hostname\" is employed, whereas \"server name\" may be more commonly used in other operating systems, such as Windows, albeit both terms may be applied interchangeably."},{"question":"how to do i convert an animated gif to an mp4 or mv4 on the command line?","response":"One solution using ffmpeg directly is effective: $ ffmpeg -f gif -i infile.gif outfile.mp4. \n\nAnother way to convert GIF animation to video: ffmpeg -i your_gif.gif -c:v libvpx -crf 12 -b:v 500K output.mp4 -crf values can go from 4 to 63, with lower values meaning better quality. -b:v is the maximum allowed bitrate. \n\nIt is important to specify -pix_fmt yuv420p lest your video might seem a black rectangle in various tools: $ ffmpeg -i animated.gif -pix_fmt yuv420p output.mp4."},{"question":"how does reverse ssh tunneling work?","response":"SSH tunneling operates by using an existing SSH connection to transmit additional traffic. \nThis is achieved by opening new channels on that connection, which are designated for specific traffic directed to predetermined ports and IP addresses. \nThe process is identical for both forward and reverse tunneling and can be initiated from either the local or remote end of the SSH connection. \nMoreover, you can establish a tunnel to a firewalled machine, which enables an SSH connection through the tunnel, effectively bypassing firewall restrictions."},{"question":"how to retrieve deleted files from unix server?","response":"One effective program for file recovery is ext3grep. \nAnother option is using the 'undelete' function in the 'del' command, which is versatile and works with any file system. \nThe testdisk utility is also a viable choice for file recovery. Command lines recovery tools such as ufs-explorer and photorec have proven successful for data retrieval. \nAdditionally, ext4magic has demonstrated its effectiveness in restoring deleted files."},{"question":"how create a temporary file in shell script?","response":"Use mktemp to create a temporary file `temp_file=$(mktemp)` or, alternatively, to create a temporary directory: `temp_dir=$(mktemp -d)`. \nAt the end of the script you have to delete the temporary file or directory `rm ${temp_file} rm -R ${temp_dir} mktemp`."},{"question":"how can i prevent grep from showing up in ps results?","response":"A command like `$ ps aux | grep \"nord\"` helps search for a particular process while ensuring that grep itself doesn't appear in the result list. \nAlternatively, a similar outcome can be achieved using `$ ps aux | grep fnord | grep -v grep`, which filters out grep from the results. \nThe `pgrep command` is also useful as it directly searches the process without involving regular expressions or the need for escaping. \nAnother concise representation is `pgrep fnord`, but if you prefer another alternative that excludes the lines that match with grep, use: `ps aux | grep -v grep | grep \"fnord\"`. \nIn zsh, the approach would be `grep fnord =(ps aux)`, using the process substitution feature to avoid creating temporary files. \nStoring the command output in a variable, like `PS_OUTPUT=\"$(ps aux)\"; echo \"$PS_OUTPUT\" | grep fnord`, allows for further manipulation and is shell-agnostic, though not as elegant as using zsh-specific syntax. \nFor a more portable solution across various Unix platforms, appending the pattern `` before your search term, as in `$ ps -A -ww | grep foobar`, can simplify script writing. \nFinally, for GNU systems, selecting processes by command name using `ps -C fnord` or excluding grep with `ps -NC grep | grep 'fnord'` offers another level of convenience."},{"question":"how do i type the euro value sign \u20ac on a mac?","response":"The method for typing the euro value symbol on a Mac differs depending on the keyboard layout: for US English, use Option + Shift + 2 or \u2325\u21e72; on a UK keyboard, use Option + 2; on the Czech Mac OSX, use Option + R; for the Austrian layout, use Option + Shift + D; for Belgian, use Option + $; for Latvian, use Shift + Option +Q; for Polish, use Option + 3. \nThe official Euro symbol website provides a comprehensive list of keystroke combinations for numerous national keyboards."},{"question":"what is the difference between echo and printf in unix?","response":"When comparing \"printf\" and \"echo,\" the former offers additional formatting capabilities: specifically, it doesn't automatically append a new line to the output, contrary to \"echo,\" which does."},{"question":"where in the file system are applications installed?","response":"Apps on an Android device are stored in a few locations, with system apps typically housed in \/data\/app\/. \nOn certain devices like the Xperia ray, the applications can be found in specific directories such as \/mnt\/asec\/XXX-1\/pkg.apk, where XXX is replaced by the Google Play ID of the app. \nSystem apps might also be in places like \/custpack\/app's subdirectories, and normal apps are stored in internal memory at \/data\/app. \nApps downloaded from outside sources like Aptoide on a Kindle Fire are located in the downloads folder, while other apps are in the \/system\/app folder."},{"question":"what to do if stuck with website that has poor security?","response":"Educating customer service on privacy issues and reporting the company to third-party watchdogs like Plain Text Offenders can help protect your account. \nIf your personal data has been compromised, updating your information to less accurate but still functional values, such as a nearby zip code, is a practical step. \nPlus, use a distinct and complex password for that website, which is not related to the passwords used for other websites. \nIn serious cases of security breaches, immediately filing a complaint with appropriate authorities like the FTC is recommended. \nReporting to the website administrators and, if unresolved, reaching out to bodies like the ICO can ensure data protection. \nWhen dealing with financial institutions, provide less sensitive information under the care of a more valuable account and inform your bank to issue new account numbers where there has been a breach."},{"question":"whats the rationale behind ctrl-alt-del for login","response":"The Windows (NT) kernel ensures the Ctrl-Alt-Del key combination is directed exclusively to Winlogon, making it impossible for third-party applications to mimic and capture login credentials. \nThis Ctrl-Alt-Del combination is considered a Secure Attention Key in Windows, reinforcing that a user is interacting with the authentic login screen and not a fraudulent one. \nIt is also a defense mechanism against malicious software that tries to intercept passwords by presenting a fake login screen due to its non-interception policy. \nWinlogon is the only trusted process that can interpret the Ctrl+Alt+Del sequence, serving as a secure attention sequence to prevent malicious programs from capturing your login information. \nThe decision to use these particular keys is based on their difficulty to be pressed inadvertently, thus reducing the likelihood of error. \nIn contrast to Windows, the Secure Attention Key function in Linux uses different key combinations and it reboots the machine."},{"question":"mds and mds_stores constantly consuming cpu","response":"Look at CPU usage when checking things on and off in Security and Privacy System Preference. \nIt could be the case that Spotlight is actually indexing Time Machine backups, which can be disabled."},{"question":"how to add newlines into variables in bash script","response":"If you find the need for newlines in your script frequently, a useful approach is to declare a global variable that holds a newline character. \nBy doing this, you can easily incorporate newlines into double-quoted strings using variable expansions."},{"question":"whats a good graphical sftp utility for os x?","response":"Transmit, priced at $34, is an extremely well-built FTP Client with sFTP support, featuring a Mac-like interface to simplify and quickly upload, download and delete files over the internet. \nCyberduck, which is free, offers a robust FTP\/SFTP browser with a user-friendly interface, good functionality and integration of technologies like Spotlight and Keychain. \nRBrowser provides an interface similar to Finder and directory synchronization. \nFileZilla is noted for its side-by-side interface, but is limited because it's not MacOSX-aware. \nExpanDrive acts like a USB drive plugged into your computer, allowing files to be opened, edited and saved remotely. \nFlow is another option that is noted for its nice interface. \nFinally, the newer implementation of Fuse for OSX is highly recommended, especially when used with SSHFS to connect to SSH drives automatically."},{"question":"sql injection is 17 years old. why is it still around?","response":"There is no general fix for SQLi because there is no fix for human stupidity. \nMetaphorically speaking, it is the same reason that car crashes are still around since the very first car in 1895. \nMany developers are simply not aware of security problems, and they don't write secure requirements properly (do not test what you are not prepared to fix). \nIf you use prepared statements correctly, SQL injection is not possible. \nChurn and pressure in the development environment and not enough emphasis from the top on security are also contributing factors. \nDevelopers attempt to add more and more features to technologies, and sometimes deviate from the actual purpose of the technology. \nAlso, such security issues are usually not covered during most 3-year education cycles. \nThe software world still doesn't understand that programmatic generation of tree-structured values should be done by constructing syntax trees as first-class objects, not by concatenating strings that represent fragments of a language. \nIn addition, SQL Injection is less obvious, less publicly visible, and has less severity impact, and is in a completely unregulated industry (if it was a problem for companies it would disappear). \nTake into account that there is a lot of code which is 17 years old that won't magically fix itself. \nAlso there is a more general problem in programming: that IDE's and languages are overly permissive."},{"question":"any reason not to run linux in a vm all the time?","response":"When running Ubuntu in a VirtualBox VM, the pass-through of OpenGL acceleration to the host system is unstable and problematic. \nWithin a virtual machine, if the host computer relies on a wireless network connection, the performance of a VPN on the guest system tends to be highly unreliable. \nInitiating VirtualBox also results in a significant surge in power consumption, with the VBoxHeadless process often being the most power-intensive on the user's system. \nIf a user opts to run Linux as the host system, they might encounter difficulties related to driver compatibility, and achieving proper 3D acceleration might pose challenges."},{"question":"what does the clock symbol mean on messenger?","response":"The Clock icon signifies that the message has not yet been sent."},{"question":"what can i do to manage my phones internal storage?","response":"Utilizing tools like DiskUsage, allows for a visual representation of storage usage on both internal storage and the SD card, aiding in identifying and managing space-consuming elements. \nIn the manage applications area of settings, sort by size, look at large apps to clear out data and reduce their footprint, remove apps you don't use (or uninstall if possible) and move songs, ring tones, pics, etc. to the SD card. \nIn the context of Gmail storage, adjusting the sync duration can be an effective way to control and manage the storage space it occupies on your Android device. \nExploring alternative apps, such as replacing the default Gmail app with K9 or opting for smaller Twitter clients like Tweetdeck or Touiteur, contributes to storage optimization. \nLeveraging apps like APP2SD provides guidance on which apps can be moved to the SD card and identifies cache that can be safely removed, aiding in storage efficiency. \nAdditional options include clearing the dalvik-cache, installing a custom ROM like Cyanogen, or using 'LinkApp2SD' to force apps onto the SD card. \nCombining apps like DiskUsage and Link2SD offers a comprehensive approach to managing storage effectively, ensuring a balance between storage use and available space. \nIf you have superuser permissions, use the terminal emulator to inspect folders. \nWhen facing storage challenges, apps like Memory Map prove helpful in identifying and resolving issues, offering a clear visualization of storage usage."},{"question":"changing creation date of a file","response":"When changing the creation date of a file, the touch -t command typically modifies only the modification and access times, affecting the creation time only if the specified time is earlier than the original creation time. \nFor those looking to batch change the creation date of multiple files, a convenient solution involves using a simple Automator Workflow."},{"question":"how to remove chrome app icons from launchpad?","response":"You can open Finder and navigate to Go\/Go to Folder(\u21e7\u2318G), then paste in: ~\/Applications\/Chrome Apps.localized and delete the apps from there. \nAlternatively, you can use the command sqlite3 \/private\/var\/folders\/your_db\/db\/db \"delete FROM apps WHERE title='Google Drive';\" to delete the icons. \nAnother method involves clicking on Finder from the dock, using the search bar to find each app by name, and dragging the corresponding icons to the trash. \nIf you go to Finder, open your home folder, navigate to \"Applications,\" and find a folder named \"Chrome Apps,\" you can either delete the entire folder or remove the apps one by one and they will be removed from your Dashboard. \nAdditionally, you can delete the apps from Launchpad and the Dock menu by dragging them out and then right-clicking, selecting 'Options,' choosing 'Open in Finder,' and finally moving them to the trash. \nFor a terminal-based approach, open the Terminal and enter the command: rm -r \/Users\/$USER\/Applications\/Chrome\\ Apps.localized\/."},{"question":"can my employer see what i do on the internet when i am connected to the company network?","response":"Yes, everything you do on your workplace's digital media is potentially visible to your employer, including personal matters you'd prefer to keep private. \nIf you're using a device at work, regardless of whether it's a personal one, employers can likely see all your activities. \nUsing HTTPS can encrypt your web browsing, but if the website starts with HTTP or if the device is employer-provided or tampered with, your activities might be visible to them. \nWhen it comes to internet use at work, it's wise to always assume you're being monitored. \nDepending on the company, network monitoring practices may vary, but firms handling sensitive information or intellectual property are more likely to do so. \nAny network owner, including your employer, can monitor the network's traffic, which means they can see the information you send through it. \nUsing personal devices on the company network might still subject you to their monitoring policies."},{"question":"is there a quick way to relink my homebrew kegs?","response":"Execute the command `brew list -1 | while read line; do brew unlink $line; brew link $line; done`. \nThis will unlink and then relink all installed formulae, which is essential because dependent tools may not function if the formulae they rely on aren't properly linked. \nAnother method mentioned involves the directory `\/usr\/local\/Library\/LinkedKegs` and requires listing the contents and unlinking, then forcefully linking each item found, which is performed by the command `ls -1 \/usr\/local\/Library\/LinkedKegs | while read line; do echo $line brew unlink $line brew link --force $line; done`. \nIt's critical to ensure that write permissions to `\/usr\/local\/lib` are set before attempting this process. \nFurthermore, if multiple versions of a formula are installed, one would need to handle these separately. \nFirst, relink all the formulae that can be linked with the `--force` option, after which `brew doctor` can be run to identify any issues. \nFor formulae with multiple versions, use `brew info` to select the desired version and then `brew switch` to activate it. \nIt's also advisable to unlink any keg-only formulae linked incorrectly during the relinking process."},{"question":"turning power chime off","response":"One approach to modify the MacBook's power connection chime is by creating an empty AIFF file to replace the default chime. \nAlternatively, you can adjust the system settings: set ChimeOnNoHardware to true instead of setting ChimeOnAllHardware to false. \nAdditionally, there is a simple tool on all MacBooks after 2015 to quickly switch PowerChime https:\/\/git.io\/nochime, which runs through curl without installation."},{"question":"how to simulate slow internet connections on the mac","response":"To manage network traffic speeds, you may employ techniques like ipfw piping on OS X 10.9 or earlier, as well as dnctl and pfctl on Mac OS X 10.10 or later, to create virtual pipes and enforce bandwidth limitations. \nAdditionally, tools like @sitespeed.io\/throttle can be installed on a Mac to easily throttle network traffic, either using command-line parameters or predefined profiles for various types of network conditions."},{"question":"can crt contain private key?","response":"A .crt file usually contains a single certificate, alone and without any wrapping; no private key, no password protection, just the certificate."},{"question":"can cctv footage be tampered with?","response":"It is possible for anyone with complete physical access to a security system to edit any recorded footage."},{"question":"why is number of open files limited in linux?","response":"The operating system requires memory to manage each file that is opened because memory is finite and particularly constrained in embedded systems. \nThe historical underpinnings of this include the use of a small integer as a file descriptor in Unix, which was an index into a per-process array with structures for each open file, originally limited to about 20 entries in early systems."},{"question":"what makes grep consider a file to be binary?","response":"One user advises that grep will consider it as a binary file if there is a NUL character or non-Ascii characters anywhere in the file. \nA possible workaround is to use: `cat file | tr -d '\\000' | yourgrep` to eliminate all null first, and then to search through the file."},{"question":"getting 256 colors to work in tmux","response":"For ensuring terminal emulator environments support 256 colors, you can try setting 256 colors explicitly in your bashrc or zshrc: `export TERM=xterm-256color or export TERM=screen-256color`. \nIf you have issues with tmux not clearing background colors correctly, try `export TERM=screen-256color-bce`. \nAlternatively, adding a conditional export to your .bashrc file can help, such as if your TERM value isn't set to xterm-256color, then it will export TERM=xterm-256color. \nA tmux user suggesting using ~\/.tmux.conf with `set -g default-terminal \"xterm-256color\" and adding set-option -ga terminal-overrides \",xterm-256color:Tc` as an effective approach."},{"question":"how to comment out multiple lines in shell script?","response":"In shell scripts, the appropriate method to insert comments is by using the \"#\" symbol. \nIt is critical to not misuse other commands, like \":\", for commenting, as it can lead to various unintended consequences, such as expansions and syntax errors."},{"question":"what is the ideal length of a method for you?","response":"One recommendation is that functions should generally be short, between 5 to 15 lines. \nA method should not be overly complex, but there are scenarios where a long method can be easily maintained. \nThe primary purpose of a function is to determine its return value. \nMethods ought to be kept uncomplicated and succinct, tasked with a singular objective to prevent them from growing too large. \nAdhering to the Single Responsibility Principle (SRP) suggests that methods should focus on performing one and only one thing. \nA function extending beyond 50 lines of code should at least raise a red flag during code review, for a second look at its complexity and SRP\/OCP violations. \nFunctions should be comprehensible without having to use the scrollbar; the need to do so may hinder understanding of the function's operation. \nAlthough Lines of Code (LOC) are not an ironclad metric for complexity, functions spanning 100 to 200 lines tend to be difficult for others to read and maintain. \nThe majority of well-designed methods are quite a bit short, on the order of 10-20 lines. \nComplexity can sometimes be better addressed by limiting each method to one control structure, with some leniency for multi-dimensional arrays. \nFinally, it is advised to aim for no more than one control structure per method, with the exception of however many loops it takes to handle a multi-dimensional array."},{"question":"how to print only the duplicate values from a text file?","response":"To identify duplicates in a file, you can use the \"uniq\" command if the file has already been sorted. \nShould the file be unsorted, you can first sort it and then apply \"uniq\" to extract only the duplicate lines. \nAnother approach is to employ both \"uniq\" and \"awk\" commands together by piping the output of \"uniq -c\" into \"awk\" and printing lines that appear more than once."},{"question":"how to export a gpg private key and public key to a file","response":"To export a public key for SOMEKEYID on an output file, the following command should be used: gpg --output public.pgp --export SOMEKEYID; it's recommended to ensure that any file you're exporting a secret key to is encrypted."},{"question":"does cd . have use?","response":"The cd command provides a quick way to clear the $OLDPWD variable."},{"question":"how to keep two versions of an app installed?","response":"Attempting to install multiple versions of an app on Android is not feasible due to package name conflicts. \nAn alternative approach is to repackage the application with a different package name. \nThe process involves using a tool like apktool to modify the package name in the AndroidManifest.xml file and then signing the modified apk. \nAnother method suggests just changing the package name without the need for extensive tools or skills, using software like ApkRename and JAVA on a computer."},{"question":"is cobol good to learn?","response":"Learning COBOL may not be the most practical choice unless you are already in a niche market where COBOL is actively maintained. \nIt might not be worth investing time in it, as there are better and more relevant languages to learn first. \nHowever, if you envision a career as a COBOL programmer, then it could be a suitable option. \nWhile it might not be the best language from a contemporary job market perspective, exploring COBOL can provide insights into historical programming practices. \nIt could be interesting for curiosity's sake, but keep in mind that COBOL is considered a somewhat outdated and less widely used language."},{"question":"what are some undocumented iphone features?","response":"When you're using the iPod app and a new song starts playing, your iPhone's screen will light up briefly to display the track details, assuming the iPhone isn't in your pocket. \nIf you double-click the home button while running iOS4, a customized task bar will appear, showing recent and currently running multi-tasked apps, as well as iPod controls. \nBy pressing both the home button and the power button, your screen's contents will be captured and saved to your Photo Albums. \nShould you wish to quickly scroll back to the top of any app, simply tapping the status bar will do the trick. \nFor efficient typing on the iPhone's keyboard, you can hold the '123' button and slide to any number or punctuation, then lift your finger to return to the alphabetic layout. The iPhone hides a Field Test mode, accessed by dialing *3001#12345#* that provides detailed information about cellular towers, signal strength, and network data, and the IMEI number can be displayed with *#06# without making a call. \nHolding a link in Safari allows you to open it in a new tab. \nHolding down certain keys on the keyboard will give you additional character options like an em dash or accented letters. \nIn the Mail app, you can quote a specific part of a message by selecting it before hitting the reply button. \nThe Maps app offers alternatives to pinching for zooming, such as double tapping to zoom in or tapping with two fingers to zoom out. \nYou can also adjust the scrubbing speed of a song in the iPod app by dragging down from the scrubbing slider, and double pressing the Home button toggles between the apps page and the Search page. \nShaking the iPhone while editing text will give you the option to undo or redo the action. \nAt the top of the contacts list in the Phone app, you'll find your own phone number. \nEnable Caps Lock in the keyboard settings to have the double-tap shift key hold for uppercase letters. Various symbols and characters can be accessed by holding down specific keys on the keyboard. \nAccess iPod controls while the iPhone is locked by double-pressing the Home button. \nSurpassing the 11-screen app limit is possible; apps beyond this will not show but can be launched via search. \nDouble-tapping the shift can also enable caps lock. \nDeleting individual text messages is possible by clicking the Edit button in the Messages app. \nDouble tapping the space bar at the end of a sentence automatically adds a period. \nVideo podcasts' audio can be played even when the phone is locked, by pressing play on the iPod controls accessed with a double Home button press. \nA two-finger tap zooms out on Google Maps. \nAudio streams in Safari can play in the background after navigating away from the app. \nWhile typing, holding the Shift key and another letter key will capitalize the latter. \nThe headphone's remote can be used to start or stop video recording on 3GS iPhones and newer. \nIn Maps, accessing street view cans be done by tapping an orange figure icon after dropping a pin. \nVoiceControl not only places calls but allows specifying the number type like 'home' or 'mobile'. \nMobile Safari lets you scroll through iframes and divs using two fingers whereas one finger will scroll the main page. \nThe headphone remote has controls for playing music, skipping to the next or previous song. \nShake the iPhone while a song is playing and the iPod controls are displayed to skip to the next song. \nTapping, not swiping, is all that's needed to switch a button's state. \nIn the Messages app, hiding the keyboard is as simple as pulling it down. \nAn emoticon-filled keyboard can be added by choosing the 'emoji' keyboard. \nAccessing draft emails quickly is possible by holding the new email button. \nRequesting a desktop version of a mobile website in Safari can be done by holding the reload button."},{"question":"how can i increase the number of volume levels?","response":"For enhancing volume control on Android, one could employ various strategies such as flashing a different ROM, using alternative apps with their own volume control, or modifying the phone's operating system if the device is rooted and one is comfortable with the associated risks. \nThe Fine Volume Control V2 app offers up to 100 volume levels and serves as a temporary fix, while the Xposed module VolumeSteps+, developed by Kuba Kalamarz, allows for the customization of volume steps across different system functions, assuming certain prerequisites like root access are met. \nMoreover, adding the line, ro.config.media_vol_steps=30, to the build.prop file which is located in \/system, via root access or a custom recovery could easily adjust volume steps. \nThe Samsung SoundAssistant app provides another solution with adjustable increments for volume control system-wide and per-application settings. \nFinally, a simpler method involves enabling \"Disable absolute volume\" in the Android developer options for improved volume control granularity."},{"question":"is it better to return null or empty values from functions\/methods where the return value is not present?","response":"The Null Object pattern is advised to keep code clean by avoiding checks for null references in method calls. \nFor example, it is better to return an empty collection or a Null object rather than null, thus removing the need for a user to check if the reference is null. \nAdditionally, if returning null is necessary, providing a method to indicate the presence of an object can simplify the caller's code. \nThis approach to coding helps keep the code less cluttered and easier to read."},{"question":"are null references really a bad thing?","response":"Null references permit code that doesn't make sense, essentially enabling nonsensical operations on objects that are supposed to have concrete values; this situation occurs because null indicates the absence of a value. \nFurthermore, the use of null is criticized as inherently \"evil\" since it can generate errors like NullPointerExceptions (NPEs), leading to time-consuming debugging and fixing. \nIt also disrupts the consistency of static typing by introducing unexpected behavior during runtime, consequently undermining the reliability of type-checking compilers. \nHowever, some defend null pointers as tools that can be beneficial and argue that treating them as an enemy is a misinterpretation; they highlight the ease of fixing null pointer bugs compared to those involving invalid non-null pointers. \nDespite the pitfalls, one must also consider the potential greater evils of not having null values at all, as the absence of data is an intrinsic part of dealing with real-world scenarios."},{"question":"are time machine backups password protected?","response":"Not by default, but you can easily enable encryption for Time Machine backups if they are connected via USB\/Firewire."},{"question":"do you get a notification when someone joined whatsapp?","response":"Contacts are not automatically notified when you add them, they will only know if you send them a message."},{"question":"tar: removing leading `\/ from member names","response":"To avoid \"Removing leading `\/' from member names\" messages in tar operations, one can use the -C option to change the working directory to the root (\/) then specifying the file tree to archive without a leading slash. \nGo go to the parent directory and execute the command there: ``cd \/var\/www\/ tar -czf mysite.gz mysite. \nSimilarly, using `cd \/home\/foo && tar czf ~\/backup.tar.gz` to avoids putting absolute paths into the tar archive. \nMoreover, using the -C option prevents compressing with complete paths with `root@server # tar fcz bkup.tar.gz -C \/home\/ foo\/`. \nWhen specifying the archive's path, one might see informational messages; using the -P option either like `tar -zvcf \/tmp\/mike.tar.gz -P \/tmp\/mike` or `tar -zvcf mike.tar.gz -P \/tmp\/mike` or `tar -zvcf mike.tar.gz \/tmp\/mike` appropriately can resolve this."},{"question":"is using git for deploying a bad practice?","response":"Some would say that there is nothing wrong with using Git for deployment, and it is, in fact very good practice and pretty common, as it's a lot less prone to errors than copying files over ftp or rsync. \n\nHowever, others suggest that while it is fine for small projects, it does not scale very well."},{"question":"quick directory navigation in the bash shell","response":"To streamline your workflow on a bash command line, try using the \"pushd -n\" function. \nSpecifically by add the following entries to your ~\/.bashrc file: pushd -n \/Project\/Warnest\/docs\/ and pushd -n ~\/Dropbox\/Projects\/ds\/test\/."},{"question":"can home and end keys be mapped when using terminal?","response":"In Terminal, to return to the HOME position, use the control+a keys, and to reach the END position, use control+e. \nTo set these functions up in vim, you should go to Terminal's preferences, under Profiles and Keyboard, and add key bindings for Key: \u2196 with Action: \\033OH for HOME, and Key: \u2197 with Action: \\033OF for END."},{"question":"how to know what packages are available with (home)brew?","response":"To explore available packages with Homebrew, firstly, you can use the command `brew search` to list all available formulas or packages. \nAdditionally, you can browse the formulas directly on GitHub to discover the variety of packages Homebrew offers. \nFor those seeking a user-friendly alternative, there is BrewInstall, a cool website that provides the necessary commands for installing packages when their exact names are not known. \nMoreover, Homebrew's website features an online package browser for easy exploration of available formulas."},{"question":"why do i need a tty to run sudo if i can sudo without a password?","response":"By default, SUDO is configured to require a TTY, meaning it should be run from a login shell."},{"question":"is asus pptp vpn secure?","response":"Yes, Asus PPTP VPN is secure. \nPPTP VPN may be considered \"practically secure\"; however, using PPTP for company VPN would be a very bad idea. \nFrom a theoretical point of view, it's broken."},{"question":"linux: how can i view all uuids for all available disks on my system?","response":"A tool known as blkid should be used as root or with sudo for disk identification. \nTo view drive's UUID mappings to their entries in \/dev, one can use the command ls -lha \/dev\/disk\/by-uuid. Similarly, ls -la \/dev\/disk\/by-uuid offers the same functionality for checking UUID listings. \nWhen dealing with multiple devices or identical UUIDs, sudo blkid \/dev\/sd* provides a more tailored approach. \nFor a comprehensive overview of devices and partitions, including mounting and tree structure, the lsblk -f command is recommended. \nFor scripting purposes or when a specific disk device's UUID is required, the command sudo blkid -s UUID -o value \/dev\/sdXY should be employed. \nThe lsblk command along with the -o +uuid,name output shows all device information and additional outputs can be found using lsblk --help, or simply blkid can be utilized."},{"question":"tmux vs. gnu screen","response":"Tmux is relatively new compared to GNU Screen. \nIt is BSD licensed, offering a different licensing option than the GNU GPL of Screen. \nAlso, tmux is ncurses based, while screen does not draw additional elements. \nIf someone use terminal emulator that supports scrolling (s)he will get scrolling with screen but not with tmux (at least in default configuration), in addition to searching and similar features. \nTmux introduces a variety of features which can enhance the user experience if configured properly. \nOne significant drawback of Screen is that it lacks active development, with many unassigned bugs, while tmux has far fewer open issues and receives more active support."},{"question":"bits per second vs. packets per second","response":"In very generic and rough terms, bps measures memory bandwidth, while pps measures lookup performance ('CPU' speed)."},{"question":"what is the meaning \/ origin of the terms north-south and east-west traffic?","response":"These general network traffic descriptors are terms that have come into use from the way network diagrams are typically drawn, with servers or access switches spread out horizontally, and external connections at the top or bottom. \n\nNorth\/South means traffic coming into and out of the cluster, or network into internet space, that is, traffic that flows into and out of the datacenter; East\/West means traffic between cluster hosts, or internal to the network that doesn't leave, that is, which occurs between devices within a datacenter."},{"question":"macbook pro bluetooth audio balance keeps changing by itself","response":"You can use Balance Lock which will keep your audio centered and prevent left\/right drift."},{"question":"how to enable os x screen sharing (vnc) through ssh?","response":"Putty is a recommended SSH client for Windows. \nUtilize this client to establish an SSH connection to your remote OS X machine, providing the administrator's login credentials."},{"question":"can scp create a directory if it doesnt exist?","response":"If you are copying a group of files, scp itself cannot really do that, but if you are copying a directory and all the contents below it, yes, you can."},{"question":"why is global state so evil?","response":"Bugs, poor testability, impure functions, code understanding difficulties, concurrency concerns, and potential performance hits are some of the notable issues associated with mutable global state. \nGlobal state can lead to unpredictable program behavior since it may be altered from unknown locations within the application, affecting the reliability of method outputs and the ability to unit test them effectively. \nGlobal variables are also considered unreliable given that any part of the code could modify their state, which complicates debugging efforts when functions exhibit inconsistent behavior. \nMoreover, if an application utilizes global variables widely, removing or altering them requires extensive changes throughout the code, resulting in significant maintenance challenges. \nGlobals foster complex dependencies and hinder the ability to maintain program invariants, which are crucial for ensuring application integrity. \nThe utilization of global state also diminishes code readability as dependencies are not obvious and need to be traced, further complicating the maintenance process. \nMoreover, managing globals, especially when used excessively, is difficult and prone to issues which escalate with the size of the application. \nConsider that what may start as one global folder path may become one of several or even hundreds in the future which could make restructuring a nightmare especially if, say, two databases are required. \nAlso, the bigger the global state, the more difficult writing automated tests becomes, because all tests must work with the same global configuration value. \nSpecifically, the use of singletons in programming creates challenges for unit testing due to potential contamination of global state and imposes rigid constraints when flexibility is required. \nGlobal state variables also pose problems for the user, because considering more than a few parameters to understand their combined impact on a program's functionality is a typical limitation of human cognitive abilities. \nProgramming languages designed for secure and robust systems often eliminate global mutable state to simplify reasoning about code and verify system properties more effectively."},{"question":"how can i know whether i am a good programmer?","response":"The question itself is subjective, but the fact that you are asking it is a good sign, indicating that you're probably not a bad programmer. \nThat is to say, a good programmer knows that she\/he is not a great programmer. \nYou should, of course, also love to program and be passionate about it. \nAdded to this, the understanding that one must learn and constantly grow, coupled with the desire to improve is what makes a good programmer. \nYou should also be willing to spend the time and money to have the best tools and keep your skills updated, while never thinking you're good enough to stop. \nIndeed, the very need to self-evaluate your own skills sets you apart from the rest. \nAs part of this you should investigate your work by finding out how many bugs it has per metric and how much of your code has to be recorded when new features need to be added. \nAll in all, you should be aiming for code that can complete a given task, on time, with the lowest number of code statements. \nHowever, to actually get the answer to the question of how good a programmer you are, you're going to have to ask other people, credible ones at that. \nTo gain insights in your adequacy as a programmer, you should allow developers that you respect to look at your work and have people use your creations and see what they think about them. \nYour co-workers will also be able to help with this. \nTry submitting code to your peers and asking them for constructive feedback. \nThe maintainability of your code and how easy it is to modify are good metrics here, as is the people you hold in high esteem wanting to work on, or with, your code and whether they have issues modifying it. \nYou could also try competing in the TopCoder algorithm contest to test your skills. \nIn answering your question, you'll also want to consider your employment \/ career situation and history; the best programmers are never looking for work and may also have offers for work from previous employers to return. \nIt's also said that good programmers command a low salary and make little noise! \nAlso consider whether you are bringing new ideas to the company and whether you recognized for what you do at work. \nFurthermore, do you have any influence and are people following your lead, or picking up your practices? \nIf so, it sounds like you are doing well. \nYou need to surround yourself with other good programmers and see if they have any issues with the code you write. \nHowever, being a good programmer isn't just about coding, you need to be flexible and able to work well in groups, yet also work well by yourself. \nYou need to have a sound theoretic and mathematical background, along with the appropriate programming skills and IQ as well as the required aptitude, common sense and people skills. \nGood programmers also have the motivation and creativity to extend their skills beyond what they do at work by having the interest to program in their free-time. \nA good programmer is not afraid to try out new ideas and re-evaluate when progress isn't being made, while having the belief that what they are producing has some real value."},{"question":"how can i mount an smb share from the command line?","response":"In relation to mounting file systems, a useful command is: \"mount -t smbfs\" with your password and username (if required), machine name, share name and destination folder. \nFor automatic mounting at system boot, alterations to \"\/etc\/auto_master\" and the creation of \"\/etc\/auto_smb\" with appropriate mount points and options are recommended. \nThe utility of \"Using AppleScript\" is a good option for its integration with Keychain through the execution of a custom Bash function."},{"question":"whats to stop someone from 3d print cloning a key?","response":"The simple answer is absolutely nothing, other than honor, as sense of morality, knowing the difference between right and wrong, respect for other people, and their property, and when that fails, a .357 Magnum and a bad attitude usually suffices. \n\nPeople without TV\/Youtube may see nothing at all to stop them, but others will be aware of the cost; printing a key is a waste money and effort, when your average basic bump key set is cheaper, re-usable and works for 80% of the locks, or the locks can be picked, or bypassed entirely (go through the window). \n\nIf concerned about 3D printing, have a key\/lock solution with atypical features, such as electronics or some interactivity that can't be replicated with your standard 3D printer."},{"question":"what is the difference between federated login and single sign on?","response":"Federation is a principle, while SSO is just a use case: a Federated Identity (FID) management system is where the user stores their credentials, and this provides single access to multiple systems across different enterprises; and Single Sign-On (SSO) allows users to access multiple services with a single authentication credential\u2014user ID and password, smart card, one-time password token, or a biometric device\u2014to access multiple or different systems within a single organization."},{"question":"how can i keep my mac awake and locked?","response":"To prevent your Mac from entering sleep mode, you might use KeepingYouAwake, a free utility that is compatible with macOS version 10.10 and newer. \nAlternatively, you can use the free app Amphetamine and set it to prevent sleep indefinitely. \nIf you prefer not to use external utilities, Apple's built-in command line utilities such as `pmset` can also achieve this by disabling sleep mode entirely or for a specified duration."},{"question":"will http redirect to https?","response":"No, at the moment, no major browsers would redirect to HTTPS automatically. \nYou have to explicitly redirect the HTTP traffic to HTTPS, which involves configuring your web server with a rule that returns HTTP 301 status code and a location header beginning with https:\/\/."},{"question":"in what order do piped commands run?","response":"Piped commands operate concurrently, which allows for the programs to run simultaneously rather than sequentially. \nThis concurrency enables the second program in the pipe to start processing data immediately as it is produced by the first program, without waiting for the first to finish. \nFor instance, with `grep pattern very-large-file | tr a-z A-Z`, the output in uppercase begins appearing before the grep command has completed its search through the file. \nSimilarly, using `grep pattern very-large-file | head -n 1` may result in the command halting before grep has fully read the file if a matching line is found early."},{"question":"are launchers safe for android?","response":"When using any app, it is crucial to scrutinize the permissions it requests to determine if they are justifiable for its functionality. \nCustom launchers are typically safe to use, but caution is advised if they ask for unnecessary permissions that could indicate hidden malicious features. \nMost launchers are generally harmless and act as a skin for the phone, without affecting your personal data upon uninstallation."},{"question":"change the mouse wheel scrolling acceleration","response":"For enhanced experience and customization with computer mice, it is highly recommended to consider using third-party mouse managers such as SteerMouse, USB Overdrive, or ControllerMate. \nSpecifically, USB Overdrive allows for altering the default behavior and offers various scrolling and tracking options. \nIf using a Logitech mouse, one could download the Logitech Control Center for Macintosh\u00ae OS X to make adjustments to the mouse's functionality. \nAdditionally, a free program called DiscreteScroll can set the mouse wheel to scroll in fixed increments, such as three lines per tick."},{"question":"criticism and disadvantages of dependency injection","response":"Dependency injection (DI) doesn't necessarily make automated testing easier as one might expect. \nDI can also complicate code navigation, making it harder to trace through the code to find the implementations of interfaces. \nWhile DI frameworks can reduce repetitive code for certain tasks, they often require a significant investment in learning to understand and use them effectively."},{"question":"alternatives to anti-virus for keeping oneself safe","response":"There are a host of approaches and tools: Application whitelisting; Checking OS patches; Disable macros; DDE; Regular patching of all applications on your system; Have a feed for each of your applications tied into CVEs Sysmon with a trimmed down configuration; Separate your desktop into trusted and untrusted; Use a Firewall; Don\u2019t connect to the Internet or attach a USB; and use a regularly updated, highly developed internet browser (Chrome or Edge). \n\nYou can use software such as: Windows Defender (the default Microsoft AV); Enhanced Mitigation Experience Toolkit (EMET); SpyBot; AppLocker; and read the security guides provided by Microsoft to allow yourself to further improve the security of your system. \n\nAlso set Restore Points whenever you make a significant change to your system, using a save state VM, or software such as Deepfreeze."},{"question":"bash - replace space with new line","response":"The \"printf\" command is particularly useful in this situation, because when file paths contain spaces, it can present them without being split. \nWhen transforming text in general, the \"tr\" command is recommended. \nThe \"sed\" command is another option to make changes such as substituting spaces with new lines in files."},{"question":"ctrl-s hangs the terminal emulator?","response":"Some users find the ability to control the terminal output using Ctrl-S to freeze and Ctrl-Q to resume helpful, as it allows for managing the flow of terminal information. \nThe terminal scroll lock is enabled by C-s and disabled by C-Q, allowing or preventing the terminal from automatically scrolling during command output."},{"question":"where are epub files stored on android?","response":"By default, the Google Play Books app stores books in the location with the most free space, which could be either the device's internal storage or an SD card. \nFurthermore, the location does not change after upgrading the app. \nIf you are trying to manually add books you've downloaded from your computer, you will find them in: \/data\/data\/com.google.android.apps.books\/files\/accounts\/{your google account}\/volumes."},{"question":"what file comparison tool can i use under os x?","response":"Kaleidoscope is a paid option preferred by some for its well-designed UI. \nIf you're using the command line, then 'diff' is a good alternative. \nDeltaWalker is another option that offers a trial version and full version for $40. \nChanges.app is also an option and comes with a great reputation and lots of features. \nFor a simple and free option, Sourcegear's DiffMerge is also available. \nFileMerge, bundled with the OS, although not considered the best, can be launched from the command line using the 'opendiff' command. \nThen there's folder Sync, a paid application that can be found on the Mac App Store for $8.99. \nThe post on the former SO clone lists several tools including free and paid ones with their current pricing, like \nOther options include Graphical diff for Mac OS X, Joachim Eibl's KDiff3, DiffMerge, Meld and Beyond Compare 4, which now runs on OSX. \nFinally, P4Merge is a versatile and free tool recommended for both Mac and Linux users."},{"question":"how can i check if swap is active from the command line?","response":"Try swapon -s for a list of current swap devices and other relevant information. \n\nIn linux, you can use cat \/proc\/meminfo to see total swap; in Mac OS X, you can use vm_stat to see information about virtual memory (swap), or use ls -lh \/private\/var\/vm\/swapfile* to see how many swap files are being used. \n\nWith Linux you can use the top command to see if the swap is active or not, in which you will see something like kswapd0; the top command provides a dynamic real-time view of a running system, thus you should see the swap there, and if you don't see it there, it's more then likely it isn't working, so to restart it or enable it, you can use this command: sudo swapon --all --verbose (source), and then by running the topcommand again you should see it. \n\nYou can try the command swapon --show, which is bit better than swapon -s as it provides human friendly size units."},{"question":"does an iso27001 audit require users to reveal their passwords?","response":"In direct terms, management of passwords under ISO 27001 does not entail the need to inspect all passwords in clear text to validate their adherence to password policies. \nContrarily, the notion that a sysadmin should be able to view your password is incorrect, as it likely contravenes the very controls it's supposed to enforce. \nMoreover, it is not acceptable to have to provide your password, even if requested by management, and efforts should primarily be directed at persuading the requester to reconsider."},{"question":"why shouldnt i use the repository pattern with entity framework?","response":"Modern frameworks generally manage the encapsulation of database connection logic, making it more readily available for reuse. \nThe Entity Framework can be used with the Repository pattern, which serves as an abstraction layer over various data access methods. \nConversely, utilizing the Repository pattern may lead to losing out on the ability to perform rich queries and maintain semantic relationships. \nEntity Framework itself is seen as a powerful framework that provides coding and functional advantages, making the application of an additional repository pattern potentially redundant and negating some of the benefits of Entity Framework. \nIt's worth noting that Entity Framework already implements a repository pattern. \nAdditionally, combining the repository pattern with Entity Framework is not recommended because it renders the testing useless."},{"question":"how to switch between users on one terminal?","response":"Use the `sudo` command with the `-u` flag to launch a new shell as the specified user. \nAlternatively, the `su` command can be used to log in directly as a different user, requiring the user's password to do so. \nFor tasks where you want to remain in the original user's shell but execute a command as another user, you can use sudo with the `-u` flag followed by the command. \nTo ensure the terminal session cannot revert to the original user upon exit, `exec su - [username]` can be used. \nOn Ubuntu systems, `sudo su - username` allows login without the targeted user's password, assuming you have root privileges. \nWhen running commands as a specific non-root user, such as in a MongoDB setup, launching a new shell as that user can facilitate the process. \nIf you need a simpler approach, `sudo -iu ` might work. \nIn cases where you have to run a command as another user with a password, use `su - UserB -c \"ls -l \/tmp\"` and `su - UserB -c \"ls -l \/tmp\"` if you don't know their password. \nLastly, the `sudo -u username command` comes in handy if you need to run just a single command."},{"question":"is it safe to delete ~\/library\/caches?","response":"It is generally safe to delete caches, although in some instances it may carry a small risk. \nIt is advisable to reboot the system after doing so to ensure stability. \nWhile deleting caches can free up space, it's important to remember that caches are beneficial for performance and should not be removed without a good reason. \nIn summary, it's ok to selectively delete old caches rather than removing them all at once."},{"question":"how to find cause of high kernel_task cpu usage?","response":"This is likely a hardware problem caused by lack of cooling: you might have a broken fan, lots of dust or a high chassis temperature caused by charging. \nRunning spindump and or sample process from the activity monitor may help provide you with more information about what\u2019s going on. \nSometimes the CPU usage drops if you use a different port for charging a laptop. \nOn a MacBook Pro, use the sockets on the right instead of the left."},{"question":"how do i use openssl s_client to test for (absence of) sslv3 support?","response":"If you need to ensure that openssl s_client uses only TLS, you can force it by using the command \"openssl s_client -connect example.com:443 -tls1\". \nHowever, it's significant to mention that the -ssl3 option in OpenSSL needs to be enabled during the compilation process, and it might not be available if you are using pre-compiled binaries."},{"question":"how can i view and examine the android log?","response":"For viewing system logs on Android 4.1 and newer, the recommended approach is to download the SDK and use an adb logcat. \nFor Android 4.0 and older, there are options such as downloading the SDK and using an adb logcat or getting Logcat Extrem from the Google Play Store to view the logs directly on the device. \nOne user found that CatLog displays the Android log more effectively than aLogcat. \nLogs, including those from crashes, might appear in several directories on an Android device. \nSome standard locations include \/data\/anr for traces related to Application Not Responding \/data\/dontpanic for standard crash logs, and \/data\/kernelpanics for kernel panic logs. \nFor newer versions of Android, without root access, one can install the device driver to use adb by downloading the adb executable, enabling developer options and USB debugging on the Android device, and using a computer's command prompt or terminal to operate adb."},{"question":"is there a way to dynamically refresh the less command?","response":"Within the Unix 'less' program, using 'F' or 'Shift+F' initiates a 'follow' function akin to the 'tail -f' command, allowing updates to display as they occur. \nIf you prefer to use 'tail -f' directly, you can pipe your command to it, though this will restrict you from scrolling through your output. \nAlternatively, typing 'G' approaches similar functionality but on a one-time basis, which may be advantageous in particular network environments. \nIf you're accessing 'less' via a command line, you can also use 'less +F' followed by the filename to activate the \"follow\" feature directly. \nFor cases where the file content is being modified, 'R' repaints the screen while dismissing any input still in the buffer. \nHowever, should you need to forcefully reload a file, you can open the Help page with 'hq' and then exit, which prompts a file to reload."},{"question":"are there any famous one-man-army programmers?","response":"Bill Joy is notable for writing vi, among other programs, including csh, rlogin, rsh, and rcp. \nChris Sawyer was instrumental in creating RollerCoaster Tycoon, contributing to the game's programming, which included a physics engine, and writing it in assembly language. \nOren Eini, also known as Ayende Rahien, is the author behind Rhino Mocks and is known for writing elegant code. \nGuido van Rossum created Python. \nRichard M. Stallman, often referred to as RMS, created Emacs and gcc and is recognized for maintaining pace with commercial Lisp machine code. \nThe first version of Lisp can be attributed to John McCarthy. \nJamie Zawinski is associated with one of computer science's most epic stories. \nDerek Smart was known for his involvement with Battlecruiser 3000AD and his penchant for flame wars. \nSteve Wozniak was essentially Apple's early programming staff. \nJohn Carmack created the engines for several iconic games, including the Doom, Wolfenstein and Quake series. \nAda Lovelace is celebrated as a pioneering figure in computing history. \nKhaled Mardam-Bey is the author of the popular IRC client, mIRC. \nThe invention and first implementation of C++ is credited to Bjarne Stroustrup. \nJon Van Caneghem single-handedly wrote, designed, and developed the original Might and Magic game, with some assistance for artwork, Dan Bunten created M.U.L.E., Seven Cities of Gold and a variety of other games, and Bill Budge - Created Pinball Construction Set, alongside many other games, from scratch, by himself. \nShaun Inman is recognized as a solo developer. \nAndrew Braybrook, Archer MacLean, Martin Walker, Jon Hare\/Chris Yates, and Stavros Fasoulas are remembered for their individual contributions to Commodore 64 games, often doing everything themselves, including coding, sound, music, and graphics. \nLarry Wall is known for creating Perl. \nMatthew Smith is credited with writing Manic Miner and Jet Set Willy by himself. \nApple Writer was among Paul Lutus' creations. \nRichard Greenblatt has made significant contributions at the MIT AI Lab, including developing a chess program and Lisp Machine. \nWayne Ratliff, the creator behind the dBASE software, coded it in assembler. \nNick Bradbury is notable for developing HomeSite, TopStyle, and FeedDemon, paying great attention to user feedback. \nHighlights in programming language development include John Backus with Fortran, Stephen Wolfram for the Mathematica package, Tim Berners-Lee - inventor of World Wide Web and Phil Zimmermann - PGP. \nChuck Moore achieved recognition for creating Forth, as well as designing microprocessors and securing hardware patents. \nSimon Tatham wrote the widely used SSH client, PuTTY. \nAnders Hejlsberg is the creator behind Turbo Pascal, Delphi, and C#. \nCleve Moler is known for originating MATLAB. \nBram Cohen's project contributes significantly to internet traffic. \nMarkus Frind is the CEO of Plentyoffish.com, which he created alone, and the site generates significant revenue. \nJonathan Blow single-handedly developed the game Braid, including its sophisticated audio and particle systems. \nD.J. Bernstein is remembered for qmail, djbdns, and his legal challenge enabling the publication of cryptography tools on the internet. \nCharles Babbage conceptualized the idea of a programmable computer. \nPhil Katz developed the important file compression utility PKZip. \nGary Kildall created CP\/M, an early operating system. \nFabrice Bellard is recognized for writing FFmpeg, leading the QEMU project, discovering fast algorithms for calculating pi and FFmpeg and qemu, . \nThe hacker dark_alex falls into the one-man-army category. \nSlava Pestov created the advanced programming language Factor and developed Jedit at a young age. \nJon Tackabury's contributions come from Binary Fortress. \nDoug Cutting initiated the creation of Lucene, Nutch, and later Hadoop. \nContributions by Eugene Roshal include the FAR file manager, RAR file format, and WinRAR file archiver, while Mark Zuckerberg created Facebook. \nRich Hickey authored Clojure. \nScawen Roberts, recognized for his work on the game Live for Speed, has been programming it single-handedly for years. \nOgre3D, an object-oriented graphics rendering engine, was created by Steve Streeting. \nJim Kent's coding efforts were pivotal in the public release of the Human Genome Project's map. \nAmong renowned hackers, Eric Corley and Kevin Mitnick are acknowledged. \nWayne Venables allegedly wrote Fruitshow forum software in 3 hours. \nArthur Whitney developed the \"K\" programming language and implemented a compact SQL engine in it. \nThe creators of the Leisure Suit Larry series, SimCity, and Elite are Al Lowe, Will Wright, and David Braben, respectively. \njQuery, a popular JavaScript framework, was created by John Resig. \nThe original FruityLoops software was developed by Didier Dambrin using Delphi. \nSid Meier Co-founded Microprose and wrote Sid Meier's Alpha Centauri, and Sid Meier's Colonization, Sid Meier's Civilization IV. \nWalter Bright worked solo on Digital Mars' C++ compiler for several years and initiated the D language. \nShawn Fanning is the creator behind Napster. \nThe creation of the Spring framework is attributable to Rod Johnson. \nPeldi Guilizzoni developed Balsamiq, a tool for creating mockups. \nNasir Gebelli stands out for his early Apple II games like Gorgon and Space Eggs. \nThe near entirety of VIM was written by Bram Moolenaar. \nSimon Peyton Jones is known for his research in functional programming and for authoring the Glasgow Haskell Compiler. \nWil Shipley's work includes Delicious Library. \nJoe Hewitt created Firebug and DOM Inspector. \nKernighan, Ritchie, and others like James Clark and Audrey Tang have made notable contributions. \nDonald Knuth and Ken Thompson are mentioned for their influence on programming. \nKen Silverman developed the Build engine for video games. \nJohn Carmack, Dave Cutler, and others like Tim Sweeney are highlighted for major contributions to software and operating systems. \nPaul Lutus is acknowledged as the father of Apple Writer. \nPeter Blum developed a comprehensive collection of ASP.NET controls. \nMatt Mullenweg created influential web development tools like WordPress. \nGus Mueller is recognized for his work. \nAlan Turing, the father of modern computer science, is mentioned for his contributions. \nJordan Mechner programmed the original Prince of Persia games, and the animations were based on his brother's movements. \nD. Richard Hipp is known for SQLite and other TCL\/TK-related work. \nMike Pall wrote LuaJIT, while Julian Seward created bzip2 and Valgrind. \nMarkus Persson, also known as Notch, is known for developing Minecraft. \nBill Atkinson wrote MacPaint for the original Macintosh. \nAgain, Nick Bradbury is acknowledged for creating HomeSite, TopStyle, and FeedDemon. \nAvery Lee developed Virtualdub, and Gabest was involved with Media Player Classic. \nJeff Minter, long-time video game programmer, created Tempest 3000 in assembler. \nAustin Meyer is credited with developing X-Plane. \nJustin Frankel created Winamp and Gnutella. \nMarkus Persson single-handedly worked on the design, programming, and graphics of Minecraft. \nDave Cutler was the father of VMS and NT and significantly contributed to Windows Azure. \nEddie Kohler is recognized for the Click modular router. \nL. Peter Deutsch is recognized for Ghostscript and other works. \nCharles Simonyi (Microsoft Word and Excel), Joe Armstrong (Erlang) and Bertrand Meyer (Eiffel). \nIvan Sutherland's invention of Sketchpad is a significant milestone. \nCave Story, a game created by Daisuke Amaya, also known as Pixel, is celebrated. \nAllan Odgaard is the author of TextMate. \nJeff Atwood is credited with creating the platform used for these discussions. \nDan Bricklin, inventor of the electronic spreadsheet, and Richard Bartle, for inventing MUD, are recognized for their pioneering work. \nAndrew Tridgell developed rsync & samba."},{"question":"secure way of masking out sensitive information in screenshots?","response":"To effectively redact sensitive information from an image, it is recommended to utilize the Fill tool in MS Paint or a similar non-transparent covering method. \nEnsuring that the covering method used doesn't leave any room for data to be visible upon zooming in is also vital, as simply zooming in could reveal the redacted information. \nMoreover, the size of the masked area can lead to the recovery of the text through statistical analysis, especially if there is unmasked text before and after the redaction. \nTo ensure absolute certainty, completely eliminate sensitive data from the original file and save it as a new file. \nIt's also suggested to use an image editor that covers the area non-transparently to prevent recovery."},{"question":"easy way to determine the virtualization technology of a linux machine?","response":"The command 'dmidecode -s system-product-name' can be used across various virtualization platforms to identify the system product name. \nFor VirtualBox, in particular, you could use: lspci | grep -i virtualbox. \nDesirable methods for detecting virtualization include using lshw, which provides details such as the computer product, vendor, and capabilities. \nIn addition to lshw, the virt-what script covers most virtualization detection cases and systemd-detect-virt can determine the type of virtualization technology used. \nFurthermore, virtualization technology can also be identified by running lscpu, which reports the hypervisor vendor and virtualization type."},{"question":"what is ip forward-protocol nd?","response":"The command in question is for the router to forward ND packets specifically for diskless workstations, which is now considered a dated function."},{"question":"what does etc stand for?","response":"According to various opinions offered, the term \"et cetera\" is used to indicate additional unspecified items in a list or directory, as in all the rest that are not further categorized. \nHistorically, the term \"et cetera\" comes from Latin and means \"and the rest,\" but it has also been interpreted in the technology world as \"editable text configurations\"."},{"question":"what are git staged files?","response":"Git staged files act as an unnamed, uncommented local commit, providing an intermediate step between completing work and making a permanent repository commit. \nIt's like a loading dock where you can decide which changes get shipped away."},{"question":"does having a longer ethernet cable slow your connection?","response":"In theory, yes, to a very tiny extent, as the electric signal will be slowed down by a minimal amount (after all, it travels at 2\/3 light speed), but the effect is about one nanosecond per foot of cable, which is unlikely to be noticeable in most cases, especially as a single ethernet cable is limited to 100m. \n\nFor all practical purposes, no, there will be no effect on the speed of your connection. \n\nHowever, a more critical factor is if you were using a gigabit connection, a longer cable could give enough signal deterioration for this to be no longer possible, forcing you to use a slower speed."},{"question":"why does vim indent pasted code incorrectly?","response":"The tabs were inserted because you have autoindent turned on, but you can disable that behavior by turning off autoindent. \n\nTo be able to paste in vim with the setting Auto insert comment Auto indenting, which enables auto-indent, you must change to paste mode by typing: :set paste, otherwise vim thinks you have typed the keys being pasted and does its own auto-indentation."},{"question":"where do whatsapp voice notes saved on android?","response":"Your voice files are also stored in the Whatsapp folder. \nThe specific path for your voice notes is: WhatsApp\/Media\/WhatsAppVoiceNotes\/"},{"question":"how to prevent mac from changing the order of desktops\/spaces","response":"Go to System Prefs > Mission Control and Uncheck Automatically rearrange Spaces based on most recent use."},{"question":"why do i see a rst, ack packet instead of a rst packet?","response":"Once the connection is established, all packets need to have ACK set and match the sequence number of the received packets for reliable transport\/security; RST without ACK will not be accepted."},{"question":"whats the recommended way of copying changes with vimdiff?","response":"Use: do (diff obtain) and dp (diff put). \n\nHowever, do and dp don't work in visual mode, so when selecting lines of text in visual mode, you must use the normal commands: '<,'>diffget and :'<,'>diffput."},{"question":"batch renaming files","response":"In Bash or other POSIX-compatible shells, use the command `for f in *.png; do mv -- \"$f\" \"${f#image}\" done`. \nSimilarly, on Debian and related systems, Perl's `rename` works similarly with `rename -v 's\/image\/\/' *.png`, and there's a variant from util-Linux that functions with `rename image '' *.png`. \nThe `zmv` command in the zsh shell is also a powerful batch rename tool once it's enabled, which involves inserting `autoload zmv` into your `~\/.zshrc` and using it with the syntax `zmv 'image(*.png)' '$1'`. \nIn Perl, try `perl -nlE '$old=$_; s\/image\/\/; qx(mv $old $_)'`, applicable for various tasks beyond renaming, or `$ rnm -l 's\/^image\/\/' '*.png'` for Windows and Linux systems. \nYou can also use the simple command `mmv \"image*.png\" \"#1.png\"` where `#1` corresponds to a match in the original file pattern. \n`https:\/\/github.com\/shenwei356\/brename` is a practical cross-platform command-line tool for safe batch renaming that includes features like file filtering and renaming with regular expressions. \nOr use shell brace expansion with `for N in {0001..1000}; do mv \"{image,}$N.png\"; done`."},{"question":"has not everyone can be a programmer been studied?","response":"Yes, a well-known paper that effectively predicts who is destined to be a programmer references a cognitive study by Prof Richard Bornat and Doctor Ray Adams, which speaks to a consistent trend across programming education known as the 'double hump'. \nThe study suggests two distinct groups: those who can learn to program and those who cannot, each manifesting its own bell curve. \nDespite numerous educational strategies attempted over the decades, this double hump phenomenon persists. \nAstonishingly, a significant percentage of students, ranging from 30% to 60%, fail their first programming course in university computer science departments. \nThis has been a constant since the first programming courses began in the 1960s."},{"question":"how can one manage thousands of if...then...else rules?","response":"To manage the complexity of building applications, especially when handling a multitude of conditional statements, it's recommended to split up the various business logic into separate classes\/modules. \nUtilizing rules engines can centralize numerous conditional statements, allowing users to edit them without knowledge of programming. \nAlso, creating independent rules in a rule engine and potentially developing a domain-specific language to express these rules may improve the handling of complex conditions. \nConsidering logic programming solutions such as Prolog may provide additional benefits. \nIt's useful to separate different problematic areas, particularly those with extensive conditional statements, and refactor them using techniques to create manageable segments (exit early is a big help). \nAnother perspective is to think of rules and constraints as inputs rather than code, which enables flexible program configuration. \nIt's also crucial to select appropriate software or computer languages, like Matlab or R, which are designed to handle complex systems and support advanced modeling techniques such as Monte Carlo Markov Chains or neural networks. \nDecision Learning Trees, like the ID3 Algorithm, are powerful tools that can provide clarity in decision-making processes. \nAdditionally, a rules engine such as Java's jBPM or Oracle's BPM can further simplify application configuration. \nMachine learning techniques can model scenarios based on discrete factors and use mathematical models such as bipartite graphs or cellular automata to simulate behavior. \nFinally, adopting an async or multithreaded approach that uses a dynamic set of rules for decision-making can provide a more efficient and adaptable system."},{"question":"what is the difference between a hash and a checksum?","response":"They are essentially the same thing in that they are both used to verify the integrity of data, with checksums tending to be smaller than hash functions. \nThey are both deterministic and can map a variable sized data to a fixed size. \nThey can both be used to check for sameness of data, for example a downloaded file compared to the source file, although with different guarantees. \nA checksum (such as CRC32) is used to prevent accidental changes, while a hash function is used to map data to other data. \nFinally, If you want to detect random errors then a checksums would be the most appropriate, while hashes are better to compare large data sets."},{"question":"is there any way to execute commands from history?","response":"In bash, use !636 also known as \"history expansion\". \nTo understand this fully, the manual page for bash can be consulted with the command `LESS='+\/^HISTORY EXPANSION'`. \nAdditionally, you have the option to use the shell built-in fc with the command `fc -s 636` for similar functionality."},{"question":"script to monitor folder for new files?","response":"To monitor file system events such as the creation of new files, a built-in Linux kernel feature called inotify can be used. \nWhen using inotify in Ubuntu, you can employ tools such as inotifywait, which allows you to specify the types of events you wish to monitor and perform actions when those events occur, as well as including the filename without the -f option. \nThe -e option of inotifywait is the best way to do event filtering. \nAlternatively, programming languages like Perl can be used in conjunction with Linux::Inotify2 to achieve similar monitoring functionality. \nAlternatively, you could periodically check for new files using a command like `ls -1A isempty | wc -I` to count the files in a directory, and then perform certain actions if new files are found, or use an if\/then test like if [ $(ls -1A isempty | wc -l) -gt 0 ] then do_something. \nIncron, a service that leverages inotify, is another option and is easy to manage\u2013see examples here: http:\/\/www.cyberciti.biz\/faq\/linux-inotify-examples-to-replicate-directories\/. \nWithout external tools, something like `while true do touch .\/lastwatch sleep 10 find \/YOUR\/WATCH\/PATH -cnewer .\/lastwatch -exec SOMECOMMAND {} \\; done` is a possible workaround to check for new files. \nUsing systemd.path based on inotify, a script can be run whenever new files are detected and deleted after processing. \nEntr, using kqueue(2) or inotify(7), can track directory changes and trigger actions without polling and it's available across different platforms."},{"question":"what are the practical differences between bash and zsh?","response":"The main differences are in interactive configuration features. \nWhile bash mainy reads .bashrc in non-login interactive shells, .profile or .bash_profile in login shells, and .inputrc, Zsh reads mainly .zshrc and .zprofile. \nThe key bindings in each program, use completely different syntax. \nBash uses .inputrc and the bind builtin to bind keys to readline commands, while Zsh uses the bindkey builtin to bind keys to zle widgets. \nIn terms of arrays, Bash arrays are indexed from 0 to length-1 and Zsh's arrays are indexed from 1 to length. \nFinally, in terms of commands, both programs handle well, but zsh's may be more precise."},{"question":"how to securely hash passwords?","response":"It is recommended that additional measures apart from mere password hashing should be applied regarding storage and managing users passwords. \nDepending on the algorithm used, it is advised to salt passwords, which basically means appending or prepending some text to the password, and then you should use a strong algorithm. \nEmploying a per user salt value that is stored alongside the hashed password in the database is recommended to further enhance security. \nPasswords should be salted and stretched, which includes hashing several times to increase complexity. \nA good password hashing algorithm must be specifically designed for this purpose and involve salt and making the password calculation computationally expensive, with PBKDF2 cited as a method meeting these criteria. \nAs security concerns evolve, it is advised to add a few more characters to the minimum length of passwords, raise iteration counts, and that we all need to be prepare to move to better algorithms like Argon2. \nIn practice, PBKDF2 is always used with HMAC, which is itself a construction built over an underlying hash function. \nWhile both bcrypt and scrypt are acknowledged as good solutions to passwords, the latter seems more favorable despite being prone to cache-timing attacks."},{"question":"what are the drawbacks of python?","response":"One significant criticism of Python is its speed, which is perceived as very slow, and nested functions that do not allow for modification of variables in the outer scope, which may be fixed in Python 3. \nThe threading model is also considered less performant, especially when compared to languages like Java or C, due to the Global Interpreter Lock. \nUsers point out the issue with Python's object-oriented design, mentioning the awkwardness of 'bolted-on' features and lack of data protection, such as private or public members, as well as it not fitting well with the message-passing paradigm of OOP. \nAdditionally, there are scope issues, a lack of support for multi-line anonymous functions, like lambda and lack of a simple but powerful input reading function\/class. \nThere is a concern about Python's inability to distinguish between variable declaration and usage. \nAccess modifiers in Python are criticized for not being enforceable, posing challenges for writing well-structured and modularized code. \nSome Python features don't align with those in statically typed object-oriented languages, such as the \"self\" parameter to instance methods being explicit rather than implicit. \nPython is also considered abstract from hardware details, which is seen as a weakness when direct interaction with hardware is required. \nDespite its expressiveness, there are complaints about the maturity of Python 3.2, specifically regarding its compatibility with certain packages. \nMoreover, some feel that Python's support for anonymous functions is inadequate, and the explicit use of 'self' in classes could seem tedious. \nLastly, Python's lack of homoiconicity and late introduction of the \"with\" keyword is noted."},{"question":"how do you turn off the try the new safari notification?","response":"Use these three commands `defaults write com.apple.coreservices.uiagent CSUIHasSafariBeenLaunched -bool YES`, `defaults write com.apple.coreservices.uiagent CSUIRecommendSafariNextNotificationDate -date 2050-01-01T00:00:00Z`, and `defaults write com.apple.coreservices.uiagent CSUILastOSVersionWhereSafariRecommendationWasMade -float 10.99`. \nIt's necessary to log out and back in for the commands to take effect, and it's recommended to do so immediately to ensure the settings are retained."},{"question":"how do i find my ip address from the command line?","response":"You can use ipconfig getifaddr en1 for wireless for wireless interfaces, or ipconfig getifaddr en0 for ethernet. \nAlso, ifconfig or ifconfig -a shows you the list of interfaces along with their IP and MAC addresses. \nAnother option is to type curl ifconfig.me in the terminal. \nIf you are using Yosemite 10.8 or 10.10, you can use the command: ifconfig | grep \"inet \" | grep -Fv 127.0.0.1 | awk '{print $2}'. \nOr you cam create an .aliases dotfile for frequent ip lookup: alias ip=\"dig +short myip.opendns.com @resolver1.opendns.com\" alias localip=\"ipconfig getifaddr en0\". \nAlternatively, you can a bash script with the following content: #!\/bin\/bash wget -qO - http:\/\/ipecho.net\/plain; echo. \nFinally, to find the IP address of the current network interface, run: ifconfig -l | xargs -n1 ipconfig getifaddr."},{"question":"where can i find default microsoft fonts calibri, cambria?","response":"If you are using homebrew, consider trying the homebrew-fonts-nonfree tap for additional resources."},{"question":"how to make log-rotate change take effect","response":"logrotate uses crontab to work; it's scheduled work, not a daemon, so there is no need to reload its configuration. \n\nSimply run the script as root: $ sudo \/etc\/cron.daily\/logrotate; running logrotate + the path to its configuration file. \n\nFor global logrotate: sudo logrotate -v -f \/etc\/logrotate.conf. \n\nYou could try: logrotate \/etc\/logrotate.d\/nginx, and then check if logrotate takes care of the new nginx config like this: cat \/var\/lib\/logrotate.status."},{"question":"this copy of the install os x el capitan application cant be verified. it may have been corrupted or tampered with during downloading","response":"If you receive this error, it may not be a problem with the installer but rather an expired certificate. \nOn the other hand, it could be a result of a corrupted installer or a subtle issue of a reset internal clock in your machine. \nTo address this, open the terminal and set the date manually by typing `MMDDHHmmYY`. \nIf the problem persists, try setting the date to today's date. \nIf the install still fails, use `hdiutil` to verify the checksum. \nAlternatively, you can download and install OS X El Capitan in SAFE MODE. \nIf you can't recall the installation date or guess it correctly, delete and reinstall the OS X El Capitan installer into your Applications folder. \nIf you're confident in the integrity of your installation media, you can use the terminal to bypass the error. \nConnect to WiFi and run `ntpdate pool.ntp.org` to ensure the correct time setting. \nAnother solution is to set the time and date to 1 January 2014, and then run the installer. \nFor more information, refer to the article \"Previously Downloaded OS X Installers No Longer Work\"."},{"question":"can you see how many times someone viewed your location?","response":"There is no notification or log of location lookup incidents available when sharing your location with friends on Find My Friends. \nThe location data is sent only upon request, and not at regular intervals, ensuring the privacy of the individual being located. \nHowever, theoretically, it's possible that someone could detect being looked up if they possess the necessary tools and knowledge to interpret such signals."},{"question":"imovie is not recording audio?","response":"To include audio in iMovie with a screen recorded video, a successful method is to screen record the recording itself. \nThis process involves opening up the Photos app, playing the video, and then performing a screen recording of that playback."},{"question":"what is the difference between \/opt and \/usr\/local?","response":"The \/opt directory is useful for quickly testing new applications without formally packaging them; they can easily be removed if the applications do not meet requirements. \nOn the other hand, \/usr\/local is meant for software not managed by the system's package manager but intended to adhere to standard Unix deployment protocols, while opt is for software that does not follow these protocols and is deployed in a monolithic fashion. \nSoftware in \/usr\/local is typically built and installed locally by the system administrator, with all files under \/usr considered shareable across operating system instances, though this is not common practice with most Linux distributions. \nIn contrast, \/opt is designated for unbundled, pre-built packages provided by third-party distributors and often includes commercial software. \nThe prevailing setup for clusters involves default environment variables and uses shared libraries in \/usr\/local, whereas \/opt does not follow this convention, allowing for multiple versions of software to coexist without environment conflicts but at the cost of potentially using more disk space. \nConventions play a significant role in the arrangement of UNIX\/Linux file systems, with \/usr\/local reflecting older traditions and \/opt representing newer practices; ultimately, system administrators decide the setup based on their specific needs."},{"question":"can you pair multiple bluetooth headphones to iphone?","response":"It is possible to do so: you can use an additional device called a Bluetooth (BT) splitter, or you can connect two SkyGenius headphones to one iPhone without any splitter using a function they call \"ShareMe\". \n\nApparently, Apple is rolling this capability out in a feature called Airplay."},{"question":"is apkmirror.com safe?","response":"Apkmirror.com is operated by the same individuals responsible for AndroidPolice.com, a major Android news platform. \nTherefore, if you're considering downloading an app from Apkmirror.com, you can trust that it should be safe."},{"question":"find out current working directory of a running process?","response":"To determine the current working directory (CWD) of a process on systems with \/proc, you can use the command: `readlink -e \/proc\/$$\/cwd`, replacing $$ with the process ID (PID) of the process in question. \nMoreover, there are other methods: `pwdx $ pwdx lsof $ lsof -p | grep cwd \/proc $ readlink -e \/proc\/\/cwd`, `lsof: $ lsof -p 12136 | grep cwd nautilus 12136 saml cwd DIR 253,2 32768 10354689 \/home\/saml ` or `\/proc: $ readlink -e \/proc\/12136\/cwd\/ \/home\/saml`. \nSpecifically for Mac OSX and Linux, use the command: lsof -p PID | awk '$4==\"cwd\" {print $9}' to retrieve the working directory."},{"question":"does vm have different ip?","response":"Virtual machines will receive the same IP address from a DHCP service when they share the same Ethernet MAC address. \nThere are some options to avoid IP conflicts: different virtual machines can have distinct Ethernet hardware addresses, the IP addresses can be explicitly configured through DHCP, or fixed IP addresses can be assigned."},{"question":"tdd who writes the tests?","response":"In Test-Driven Development, the tests must be written by the developer. \nIt can also be done by the person writing the component. Functional testing is a QA process that can and should be done by a QA team. \nHowever, these tests can also be done by the developer, although a non-developer might be better suited for the task, as the developer may not be aware of all the ways a user might use the application."},{"question":"what are the pros and cons of vim and emacs?","response":"While both editors are powerful enough to handle any and all text editing needs\u2013either one can do just about anything you can imagine, they have a similar footprint and they're both so customizable. \nVim gets good user reviews for the following characteristics: faster, good for quick, one-off tasks, more \"Unixy\" and sees itself as part of a greater tool-belt, is available on every unix system, is easier to use after some training, has good documentation and on-line help, works faster on slower machines and some report that almost all programming needs are taken care of from within Vim. \nSome users, however, do not prefer vim because it's \"modal\". \nEmacs is well-liked for the following reasons: it has considerably more extensions to let you do tasks that are only vaguely text-editor related, is easier to learn (\"approachable\") is available for every desktop\/server, \nfeatures stay out of the way when not in use, has good documentation, is a great programming environment and some users see it as a \"live in\" editor that can be used continuously, seemingly built to keep you inside, making things \"nice and comfortable so you don't have to leave\". \nBut some find that Emacs has an odd habit of \"pausing\" for up to minute and becoming unresponsive, even while continuing to accept keyboard input, that starting a remote Emacs is often slower than starting a remote Vim and that it is not available for default installation. \nSome users say that the main difference between Emacs and Vim is ergonomic, for example, in Vim you can edit text only with one finger, whereas in Emacs you can not\u2013it's known to be \"hard on your pinky fingers\"."},{"question":"how do i stop the adobe creative cloud app from auto-launching on login?","response":"To turn off everything Adobe launches at startup on the Mac you need to both disable its launched jobs and the Adobe Core Sync extension. \nIf you run launchctl unload -w \/Library\/LaunchAgents\/com.adobe.AdobeCreativeCloud.plist that will disable it for your user. \nYou can also select \u201cPreferences\u201d and uncheck \u201cLaunch at login\u201d in the menu bar."},{"question":"what should i do about gmail ad asking me for password?","response":"The Google ad domain appears to have been compromised, so take the following steps: make sure that you have antivirus and anti-spyware software installed; change your password as soon as possible with an ad blocker; and contact Google and report this, supplying them with details like your IP, URL, screenshots, date\/time, and as much information as you have. \n\nMost importantly, never log in to a prompt like that; you can test whether the ad was fake by going to a genuine Google site, ensuring that Google owns the TLD and ssl certificate, such as going to gmail.com \u2013 if it logs you in, it was fake."},{"question":"how can i open a text file with textwrangler from the terminal (command line)?","response":"If you have the TextWrangler command line tools installed, you can use the 'edit' command, type edit my_text_file.txt in the terminal, to open files in TextWrangler directly from the command line. \nIf you downloaded from the BareBones Software site, there should be an \"install command line tools\" command in either the Application (TextWrangler) menu or the help menu. \nAnother suggestion is that using 'open' is the correct approach, but you may want to create a shell alias for simplicity and to avoid changing default editors. \nA final method for editing text files is by using the TextWrangler application directly through its full path in the MacOS directory."},{"question":"is visiting https websites on a public hotspot secure?","response":"In practical terms, encryption initiated by root SSL authorities is suitable for insecure lines, and generally, TLS does not have issues with man-in-the-middle attacks. \nHTTPS is considered secure even on public hotspots due to the nature of its key exchange and encryption mechanism, ensuring that the master secret and pseudo-random numbers are transmitted securely. \nHTTPS demonstrates a strong resistance to decryption from packet sniffing, but the server authentication reliability may be compromised due to certain weaknesses in the distribution of CA certificates. \nA session carried out entirely over HTTPS is quite safe, with browser requests and server pages being encrypted; however, many sites after the initial authentication revert to HTTP, leaving session IDs vulnerable. \nUtilizing a VPN can provide an additional layer of security when accessing the internet via an unencrypted wireless connection. \nSSL\/TLS is not inherently more vulnerable on public Wi-Fi than it is on a \"regular\" internet connection and is designed to function in open channels. \nUltimately, SSL\/TLS is secure, partly due to the key exchange protocol which stops malicious users from decrypting traffic or sending messages in another user's name."},{"question":"how to access tmp folder on mac?","response":"One possibility is to use a browser (Chrome, Firefox), and enter in the URL bar: file:\/\/\/tmp. \n\nAlternatively, you can use the menu Go -> Go to folder, and enter the path of the folder you wish to see in the resulting dialog."},{"question":"is it possible to rewrite every line of an open source project in a slightly different way, and use it in a closed source project?","response":"The consensus of opinion is that it is not an advisable action. \nYour work will clearly be derivative, even if you completely rewrite it in another language. \nRewriting something in another language may or may not be considered different from copying, depending on the context and how it's done. \nPorting, which involves taking JavaScript code and rewriting it in a different language, is considered creating a derivative work. \nIn such instances, it's prudent to err on the side of caution and ask a lawyer. \nTaking an application line by line and merely changing it slightly for the sole purpose of circumventing copyright law is blatantly creating a derived work. \nBased on the GPL licensing terms, creating work that is separate from the original license is likely to be a derivative work and thus directly an infringement. \nThere have been cases in the US where copying a program more loosely than what you're talking about has been ruled as infringement. \nOpting to open-source your port may be a strategic choice, as it can invite community engagement, which could potentially lead to a superior product. \nBy not allowing for open sourcing, sooner or later your code will look inferior to in comparison to an open source port. \nSome bottom line advice is to directly ask the original author(s) who wrote the code for permission to use their work, as this is an ethical approach and could prevent professional reputation damage. \nIt is not ethical and is almost certainly illegal to use someone's work in this manner. \nLastly, jacking code is a good way to delegitimize yourself in the eyes of your peers."},{"question":"how can i tell what version of linux im using?","response":"The uname command is a useful tool to consider when managing a diverse array of machines. \nYou can obtain all necessary details by typing \"uname -a\" in the command line. \nFor a more focused approach, the manual page \"man uname\" provides a way to narrow down the information."},{"question":"how to get full path of original file of a soft symbolic link?","response":"\"ls, stat, readlink\" are some of the commands useful for interacting with files and symbolic links on Linux systems. \nStat will give you the information you require, for example: $ stat current File: `current' -> `\/home\/user\/releases\/build\/'. \nYou can also combine the which command with readlink, for example: readlink -f `which command`. \nOr you can combine it with stat: `which command` | grep File. \nFinally, To find the real path of a symbolic link, the \"realpath\" command can be utilized."},{"question":"what is the difference between flash and bootflash?","response":"Bootflash is the generic term generally used to denote the flash of both the route flash and switch flash."},{"question":"where do files go when the rm command is issued?","response":"The file gets unlinked, so the data is still sitting there on disk, but the link to it is removed, meaning the file is effectively nowhere, gone, vanished. \n\nIn Unix-style filesystems (including on Linux), files are not really \"at\" any particular place; if there are still hardlinks, the files are wherever the hardlinks you didn't delete are, but if there are no hardlinks left, the files are gone. \n\nFiles removed with rm are gone, but given that most filesystems only remove the reference to the data and indicate that the blocks as free, but the file's data is never deleted, so you could try to locate your data reading directly from the device, for example by searching for the not-yet-overwritten blocks by certain patterns."},{"question":"whats wrong with circular references?","response":"A circular reference is characterized by high interdependency, as it involves twice the coupling of a non-circular reference and can create bootstrapping problems, especially in long-lasting environments. \nThese references can also lead to issues such as high coupling, the necessity to recompile classes, the prevention of static linking, and the possibility of crashing recursive algorithms. \nThey can hinder dependency injection and increase the complexity of understanding a program's functionality. \nIn data modeling, circular references should be critically evaluated to prevent redundancy and excessive coupling in code, and it is often possible to model relationships differently, such as using graphs for trees. \nRelationship redundancy, particularly in database design, can lead to data corruption or inconsistencies and should be prevented."},{"question":"why have private fields, isnt protected enough?","response":"Private fields are deemed necessary due to their role in providing safeguards, ensuring that the data remains as the original coder expected. \nWhile protected variables might seem like an intermediate option, they do not genuinely protect the class's internal details and still allow complete modification to the implementation. \nProtected gives you very little more than public as they lend themselves to unintentional abuse, whereas private gives you a real improvement. \nAs far as a base class is concerned, protected does not give you any more protection than public, because nothing is stopping a derived class from creating a public getter\/setter that behaves like a backdoor."},{"question":"why does ipv6 specify 128 bit address, when there are only 48 bits in mac addresses?","response":"To allow each of these smaller blocks to contain many MAC addresses you need to have the IP-space much bigger than the MAC address space."},{"question":"can you see when someone is looking at your location?","response":"When using Find My Friends, your friends will not be aware if you check their location; they won't get any notifications or a log of such activities. \nHowever, arguably, someone could, in theory, detect if you have requested their location if they have the right technical tools and expertise."},{"question":"show top five cpu consuming processes with `ps`","response":"Use: ps aux | sort -nrk 3,3 | head -n 5; or if you want something with constant updates, use: watch watch \"ps aux | sort -nrk 3,3 | head -n 5\"; you can use --sort c at the end of a ps command: ps aux --sort c, or ps --sort=-pcpu | head -n 6 . \n\nOther ps options are: $ ps -eo pcpu,args --sort=-%cpu | head; ps aux k-pcpu | head -6; ps auxk-c | head -6; ps -eo pid,comm,%cpu,%mem --sort=-%cpu | head -n 5 (get full command use args, cmd or command %cpu:). \n\nFor bare bones, type ps -e -o pid,cmd,%cpu,%mem --sort=-%cpu | head -n 6. \n\nFor Mac OS X, you can use: ps -Ao user,uid,comm,pid,pcpu,tty -r | head -n 6. \n\nAs an alternative to ps, try: top -b -n 1 | head -n 12 | tail -n 5."},{"question":"what is rapportd and why does it want incoming network connections?","response":"The service in question facilitates Phone Call Handoff and various other communication functionalities across Apple products. \nIt's part of the operating system installed by Apple and is involved with iTunes Home Sharing as well as the Remote application used to control iTunes. \nAdditionally, it is necessary for the feature that allows text messages to be forwarded to other devices."},{"question":"how to connect iphone to mac with broken screen?","response":"If you own an Apple TV, you could use airplay mirroring to see exactly what happens on your iPhone, or you could try reflector, but both require you to enable airplay blindly. \n\nAlternatively, use QuickTime Player on your Mac, connecting the lightning port from your iPhone to the USB of your computer."},{"question":"why is naming a tables primary key column id considered bad practice?","response":"Naming a foreign key column simply \"Id\" can lead to confusion, especially when a table links to another table with a foreign key, hence, it is better to name it more descriptively, such as \"TableId\". \nSemantic significance in column naming is crucial, and generic names like \"ID\" can become problematic in this context. \nPrefixing common column names with the TableName is a good practice as it removes ambiguity and simplifies the querying process. \nHowever, using the natural join becomes difficult and confusing if primary keys across tables are all named \"ID\". \nSome developers argue that including the table name in each column name can be redundant and tedious to both write and read. \nNevertheless, maintaining consistency and reducing ambiguity in naming conventions benefit maintenance programmers, providing clarity especially when foreign key relationships may not be explicitly enforced. \nIf you do a lot of reporting queries you always have to alias the columns if you want to see both. \nUsing generic \"id\" also adds unnecessary work during complex query writing and can lead to code errors and time wastage. \nFurthermore, differing primary key and foreign key names can prevent the use of certain third-party database tools. \nLastly, utilizing natural unique information within a table as the primary key, rather than a superfluous \"id\", can strengthen relational integrity. \nAnd that's why using id is bad practice: id is often not information, just an autoincrease."},{"question":"4-dial combination padlock: is it more secure to zero it out or to blindly spin the dials after locking?","response":"Zeroing out the combination on a lock is a technique that is as secure as any other method, and has real-world security benefits. \nAdopting a practice of either zeroing or following any other predetermined sequence for resetting locks could potentially offer a higher level of security over random scrambling, as consistent resetting behaviors might make it more difficult for an attacker to guess the pattern. \nNonetheless, in terms of physical protection and practicality, the position of the dial on combination locks is largely irrelevant since these locks can be easily bypassed by cutting or picking, and as such, they provide minimal delay to a determined attacker. \nAn alternative approach to enhance security might include either using both directions equally for zeroing or always rotating all to a single direction, to leave equal amount of fingerprints. \nThe recommendation when resetting a lock is to aim for zero knowledge of the correct combination for an attacker, to ensure there is no advantage gained from any resetting method that might be employed, whether it's zeroing, using a fixed value, or random scrambling."},{"question":"how to rsync only new files","response":"According to the rsync manual, the option `--ignore-existing` is used to skip updating files that already exist on the destination. \nUsing `-t` (instead of `-a`), and `-P` (equivalent to `--partial--progress`): rsync -h -v -r -P -t source target will also transfer only new files."},{"question":"why qt is not popular?","response":"One reason why Qt may not be as popular is that it doesn't always conform to the look of native programs. \nLicensing has historically been a factor, and until 2005, those wanting to release free software for Windows tended to avoid Qt. \nAlso, until 2000, people who cared strongly about open source did not use Qt. \nAnother drawback is its compatibility issues with templates and the preprocessor. \nThe language bindings of Qt may not be sufficient for all mainstream languages, making it less appropriate for the job and some programmers will simply never have given it a go. \nAdditionally, Qt can be less productive and prone to errors due to its lack of automatic memory management and limited introspection. \nSome find it to be heavyweight for certain applications, especially when dealing with licensing requirements that may not align with common licenses. \nFor those focused on specific architectures, alternatives like C#\/.NET for Windows or Java for cross-platform apps might be more preferred. \nThe fact that Qt is based around C++ may also contribute to its lesser popularity, as fewer people use C++ for desktop apps, and it requires a separate compilation step. \nQt's signal slot mechanisms have been criticized for inefficiency, and there are limitations in the signals provided for certain widgets. \nLastly, the complexity of Qt could be a deterrent for some developers."},{"question":"what is the difference between data structure and abstract data type?","response":"An Abstract Data Type (ADT) serves as a logical description or interface, emphasizing what it does, while a Data Structure takes on a more concrete form, akin to a class."},{"question":"write in ntfs using mavericks","response":"One option is to use Paragon's NTFS for Mac\u00ae OS X 11. \nAlternatively, a combination of macfuse-core-10.5-2.1.9 and ntfs-3g-2010.10.2-macosx has been reported to enable writing to an NTFS drive on OS X Mavericks. \nInstalling NTFS-FREE for OS X Mountain Lion 10.8.2 software and rebooting the Mac is another viable solution, as reported to work on OS X Mavericks. \nFor those who prefer using Homebrew and Cask, the installation process can be initiated by installing Homebrew and Cask if not already present. \nUsing MacPorts is also an option, involving commands such as sudo port install fuse4x ntfs-3g and sudo ntfs-3g \/dev\/disk2s1 \/Volumes\/ntfsmountpoint. \nAnother alternative is to download a free driver, such as the one provided by Seagate. \nThis solution may be particularly suitable for users of OS X 10.11 El Capitan, where installing the latest osxfuse (3.x.x) is recommended for compatibility."},{"question":"i got an email threatening to ddos me if i dont pay a ransom. what should i do?","response":"When faced with threats of DDoS extortion, the advised action is to ignore them, as these are often scams without real consequences. \nIf you receive such an email, it's recommended to verify if the threat is genuine by looking up the associated Bitcoin address to ascertain its authenticity. \nNevertheless, to be safe, you should report the incident to relevant parties such as your service provider's abuse team, your hosting company, and possibly law enforcement agencies, sending them an original copy of the threatening e-mail. \nSharing the details with your VPS vendor is also recommended since any potential attack could impact their network. \nAlways ensure the legitimacy of any threat before considering payment, and maintain robust security measures."},{"question":"how to use find command to search for multiple extensions","response":"When searching for files in Linux, you can combine criteria using the -o flag, which requires the use of parentheses for proper precedence in the command structure. \nA command like \"find .-iregex '.*\\.\\(jpg\\|gif\\|png\\|jpeg\\)$'\" is suggested as a more correct approach to locating image files with various extensions. \nFor Linux, Unix, and macOS systems, the command \"find -E .-regex '.*\\.(jpg|png)'\" is identified as the only option that performs reliably."},{"question":"how do keyboard input and text output work?","response":"First, the key press event is transmitted from the keyboard hardware to the application. \nSubsequently, during the processing phase, the application determines that, for example, because the key \"A\" was pressed, it needs to display the character \"a\". \nFinally, in the output stage, the application issues the command to display \"a\" on the screen."},{"question":"is there a way to turn off translation in google play","response":"To change the language for your Google Play app, you can go to your device's settings, navigate to \"Language & keyboard,\" and under \"Select language,\" choose the desired language for your device, which will also be reflected in the Google Play app. \nFor other Google Products, like Gmail, you can change the language preference by logging into your Gmail account, clicking \"account\" in the top right corner, and selecting \"language\" from the left vertical menu. \nIf your preferred language isn't available, you can install Xposed and the appinfo module, change the language settings in appinfo specifically for Google Play, and then clear Google Play's cache to have the app in English."},{"question":"how to turn off all animations on os x","response":"It's not possible to disable all animations on OS X with one global setting, so the best thing to do is to disable them on a one-by-one basis as and when you encounter one you don't like. \nIf you aim to disable specific animations, you can utilize hidden preferences with specific commands in Terminal to achieve this. \nSome example commands being; write -g NSAutomaticWindowAnimationsEnabled -bool false, and; write -g NSScrollAnimationEnabled -bool false. \nIf you're not comfortable with Terminal, an alternative is Mountain Tweaks, which offers a graphical user interface (GUI) to adjust the behaviour of OS X."},{"question":"how to find out the start time of last sleep","response":"On macOS Lion, one approach is to search for \"powerd\" entries in the system log located at \/private\/var\/log\/system.log. \nUsing the terminal, a command like grep powerd \/private\/var\/log\/system.log effectively extracts relevant information. \nAlternatively, the pmset command provides a comprehensive way to obtain sleep-related details; using pmset -g log|grep -e \" Sleep \" -e \" Wake \" in the terminal offers a clear timeline of sleep and wake events, particularly useful on macOS 10.8.2 and later versions. \nFor those specifically interested in when the lid of a MacBook was opened, the command pmset -g log | grep LidOpen delivers information about lid open events."},{"question":"i dont program in my spare time. does that make me a bad developer?","response":"It doesn't make you a bad developer and it's possible to become a good software developer while only coding at work. \nHowever, programming in your spare time can make you a better developer. \nAlso, you should be advised that some industries are more competitive than others, so mastering your skills and developing your knowledge should definitely be a consideration. \nThat being said, whether or not you program outside work does not automatically make you a \"good\" or \"bad\" programmer."},{"question":"how to detect the encoding of a file?","response":"It is not possible to determine a file's encoding with absolute certainty without metadata or a header indicating the encoding. \nDue to the potential for multiple encodings to share the same byte sequences, even a \"smart guess\" can be ambiguous, and encoding menus exist to manually select an encoding in software like Notepad++."},{"question":"what is the difference between 16gb and 32gb?","response":"Other than cost (for the initial purchase and potentially to repair or replace it) and size, there is no measurable difference in performance, battery life, or other functions between any of the iPhone 5 models for sale. \n\nThe only difference is 16 GB of storage capacity."},{"question":"what should i do when my boss asks me to fabricate audit log data?","response":"One option is to ask your boss to put the request in writing (paper or email) before you do it. \nYou could also take your concerns to the owner\/president (in writing). \nHowever, most people agree that this is wrong and you should tell your boss that it is wrong (it's not the way to win, what would his mother say). \nDon't do it because it's never worth doing something unethical even if it costs you your job; talk to an attorney who specializes in employment law. \nKeep a copy of the current logs and encrypt (check with your lawyer), don't make changes. \nQuit and get a new job, then report your old boss."},{"question":"are password-protected zip files secure?","response":"The password protection on an Encrypted ZIP file allows only intended parties to view the contents of the files, but it is not secure on a number of counts, including in the sense that you can't depend on the integrity of the zip file."},{"question":"why do most of us use i as a loop counter variable?","response":"The letters i and j have typically been used as subscripts in mathematics, which translated into programming languages where these letters default to integer types. \nThis convention finds its origin in mathematical summation notation and has been reinforced by texts on computation theory. \nAdditionally, i, j, k are utilized within the Cartesian coordinate system. \nA single character \"i\" for index is ideal and there is no confusion as to what \"i\" means due to the convention. \nThe use of 'i' in loops, for instance, is a good choice since it indicates an index or iterator, and 'j' and 'k' naturally follow for nested loops given their sequential order in the alphabet. \nIn both mathematics, i, j, k were commonly employed to denote indices, such as in summations and matrix elements."},{"question":"moving tmux pane to window","response":"The command `join-pane` is crucial for adding a pane to the current window in tmux. \nWhen working with tmux, key bindings can enhance the experience; for example, using `join-pane -s :1` allows for adding window 1 to a pane, while `break-pane -t` enables moving a pane to its own window. \nBinding keys to the `join-pane` command can be configured for efficiency, such as employing `bind-key j \"join-pane -s !\"` to join the last active pane or window. \nMoreover, the default key binding Ctrl+b followed by `!` will break the active pane into a new window."},{"question":"block apps from accessing the internet on android device","response":"If you do not have root access to your device, you can use the Mobiwol app to control the access apps have to the internet. \nAnother option is the APK app Net Blocker, which allows you to block network access for specific apps and notifies you when networks are blocked. \nDisabling the network when the app is in the foreground or hibernating it when in the background can also help control app network access without root. \nThe No-Root Firewall app is suggested for controlling what apps have internet access without the need for root access. \nDroidwall is an app that can control network access but requires a rooted Android device. \nSeveral apps like Mobiwol, NoRoot Data Firewall, and LostNet NoRoot Firewall do not require root access, while Root Firewall, MsWall Firewall, Advanced Firewall, DroFirewall, Antivirus, and Security Firewall Plus necessitate it. \nUsers of CyanogenMod have a built-in Privacy Guard feature available to prevent apps from using the internet. \nGoogle's solution, Datally, also requires no root and helps control mobile data use."},{"question":"how do you unit test private methods?","response":"When approaching unit testing, it's generally advised to focus on the public interface rather than attempting to test private methods directly, as private methods should be considered an implementation detail. \nIn .NET development, for testing purposes, a private method could be altered into an \"Internal\" method and made \"InternalVisible\" to your unit test project. \nJava developers have the option of employing libraries like fest assert and\/or fest reflect to test private methods using reflection. \nThis involves adding the library via Maven or directly into the classpath to gain access for testing. \nAlternatively, you can modify a private method's access level to package private for testing in the same package, sometimes using the @VisibleForTesting annotation to indicate that the access change is solely for testing purposes like (Private method before testing: private int add(int a, int b){ return a + b; } Package private method ready for testing: @VisibleForTesting int add(int a, int b){ return a + b; } ). \nIf usage of external libraries is not preferred, you can still use pure standard JDK API to access private methods using reflection as it is deemed good for testing a private method. \nMoreover, for testing private methods in Java, the JMockit library offers a tool called Deencapsulation.invoke, which provides a convenient wrapper around reflection calls. \nLastly, in scenarios where it's imperative to test a private method, it will be necessary to widen the access scope of the method so that testing frameworks like JUnit can execute tests on it."},{"question":"how much business logic should the database implement?","response":"One opinion advises finding a middle ground from their experience in seeing projects in which programmers have left vital elements or where most of the business logic was implemented in database code. \nAnother opinion recommends keeping business logic out of the database as much as possible to avoid issues like decentralization and encapsulation problems. \nAdditionally, business logic doesn't belong in the database in the case of multi-tier applications. \nOn the other hand, if your business logic involves set operations, most likely a good place for it is in the database since database systems are efficient at performing set operations. \nIf the business logic involves some sort of calculation, it probably belongs outside of the database\/store procedure since databases are not designed for looping and calculating. \nOne person's experience from working at companies with different perspectives is that it is best to use Stored Procedures when execution time is important in terms of performance. \nPlace logical constraints or ubiquitous expressions, or single statements, in the database, while procedural elements, loops, and conditional branches should be coded outside the database. \nAnother opinion points out that it depends on what the database is used for. \nFinally, there's no general answer, as it also greatly depends on a business and their culture and legacy."},{"question":"should i intentionally break the build when a bug is found in production?","response":"When encountering a bug during development, the recommended approach is to fix it immediately if discovered or assign it to the relevant individual without disrupting the entire team's workflow. \nThe strategy taken may vary depending on the bug's severity, and it's crucial to address any gaps in test coverage that allowed the bug to slip through initially. \nThe role tests play and their impact on the build process should inform whether a build is allowed to succeed with known defects. \nIt's generally agreed that breaking the build is not the best practice and is considered a bad idea, as it can obscure subsequent issues and hinder overall development progress."},{"question":"understanding of diff output","response":"Given a diff file1 file2, < means the line is missing in file2 and >means the line is missing in file1. \n\nThe normal output format consists of one or more hunks of differences; each hunk shows one area where the files differ. \n\nIn your first diff output (so called \"normal diff\") the meaning is as follows: < - denotes lines in file1.txt; > - denotes lines in file2.txt; 3d2 and 5a5 denote line numbers affected and which actions were performed. \n\nThe meanings of the command line switches are as follows: -r means recursive; -u shows line number; -p(small) shows the differences in C functions; -P(capital), in the case of multiple files, shows the full path. \n\nThe diff command is easier to understand if you consider that, essentially, it outputs a set of instructions for how to change one file to make it identical to the second file; each of the following cases are explained well: a for add, c for change, d for delete. \n\nd stands for delete, but 'remove' is more clearly what happens; a stands for add, but 'insert' is more clearly what happens; c stands for change, but 'remove + insert' is more clearly what happens."},{"question":"is there an airdrop client for microsoft windows?","response":"On Windows machines, install Pidgin and enable its Bonjour account to allow file transfers, which can also be done with Macs using iChat since AirDrop is exclusive to Lion. \nUnfortunately, there isn't an AirDrop equivalent for Windows, but services like Dropbox with \"Enable LAN Sync\" could be used for local network file synchronization. \nFor a cross-platform solution, Snapdrop offers similar functionality to AirDrop, although it requires devices to be on the same LAN and employs WebRTC or WebSockets for direct peer-to-peer communication."},{"question":"are in app purchases shared in family sharing?","response":"In-App purchases are not shared in Family sharing, meaning they are not included, which is clearly stated on the Apple website."},{"question":"what are null bytes in python?","response":"A null byte is a byte that has a zero value. \nIn programming, particularly within C and C++, null bytes serves as an indicator for the end of a string, that is to say a string terminator."},{"question":"what is the difference between man and help in linux?","response":"\"Help\" is a Bash built-in command designed to provide assistance specifically for Bash commands, whereas \"man\" (manual) is a conventional way to get help for nearly all system commands and, occasionally, configuration files."},{"question":"do uninstalled apps take up space?","response":"Apps that have been uninstalled will have their internal storage deleted automatically; however, the files they create can still occupy space on your SD card."},{"question":"is dhcp the same thing as nat?","response":"Apart from IP related things, and the word 'dynamic', the two have nothing in common. \nAmong other things, DHCP is a protocol for configuring hosts and assigns IP addresses to clients dynamically, while NAT mangles IP addresses. \nIn other words, DHCP assigns IP addresses to hosts in a private network, while NAT converts private addresses, such as such as 10.0.0.3, into public addresses, such as 209.113.65.5. \nTo be sure, NAT does not assign IP addresses to devices, but converts them to allow a host on a private network to communicate with a remote host."},{"question":"is it bad practice to use your real name online?","response":"Using your real name does not usually cause any harm to you, but the information you share is the real key. \nObviously you are more vulnerable if you use your real name, and some people advise against it. \nYou must carefully balance your public and private personas. \nIt really comes down to personal comfort with your online and offline worlds colliding. \nTake into account that using your real name might be difficult if your name is common, and there are also issues surrounding gender. \nSometimes it is important to use your real name because you want to establish a public identity now or for the future. \nIt is a good idea to search for what others have said about you using your name. \nBehave in the same way on the internet as you would in the street outside your house. \nRemember that being paranoid doesn't mean you don't have enemies."},{"question":"what is the difference between a virus and trojan?","response":"The terms have a great deal of overlap and aren't necessarily mutually exclusive of each other. \nIt's better to understand the terms as describing generalized groups of attributes. \nFor example, a trojan is a malware which claims to be something legitimate, for example a virus scanner, but is in fact harmful. \nIn common discourse, any kind of malware is simply a virus capable of infecting a computer, which includes trojans and ransomware."},{"question":"why is cd not a program?","response":"Shells also provide a small set of built-in commands (builtins) implementing functionality impossible or inconvenient to obtain via separate utilities (such as cd, break, continue, and exec) which cannot be implemented outside of the shell because they directly manipulate the shell itself. \n\ncd in addition to being a shell builtin, is actually also a program on POSIX compliant OSes. \n\nIf cd was a different process then it would have to change the current working directory of its parent (shell), which is not possible in Unix."},{"question":"how can i mount sftp\/ssh in finder on os x snow leopard?","response":"You can do so using Cyberduck, a versatile app suitable for multiple platforms, which is freely available. \nAnother solution to consider is installing osxfuse and sshfs through Homebrew and Cask."},{"question":"are all magsafe chargers the same?","response":"Yes, although it ships with an adapter of 45 watts, 60 watts, or 85 watts; you can use a higher-rated adapter with a Mac that draws less power, and going the other way is also safe, but the Mac will either not charge, charge slowly, or work fine, depending on how much power it needs from moment to moment."},{"question":"keyboard shortcut to switch focus between multiple displays on os x 10.9+","response":"To switch focus between monitors without clicking, you just need to move your mouse pointer to the desired monitor. \nInstalling the free CatchMouse utility can be helpful as it allows you to assign keyboard shortcuts to move the mouse pointer between monitors. \nYou could also use Keyboard Maestro to create shortcuts for switching between different monitors. \nAdditionally, Keyboard Maestro can be set up with specific shortcuts for switching windows across different displays."},{"question":"why use ibgp and ospf?","response":"OSPF routers rapidly achieve convergence, understanding all the routes within their area without requiring a full mesh configuration."},{"question":"are `break` and `continue` bad programming practices?","response":"It's recognized that using constructions like 'break' or 'continue' is not inherently poor practice. \nThe predictability and understandability of the code's behavior is a point of contention; unexpected breaks within loops can make understanding the loop's flow challenging. \nEmploying these statements at the beginning of code blocks as a form of precondition is deemed good while using them amidst code can act as 'hidden traps,' thus making it bad. \nThe appropriateness of 'break' and 'continue' depends on whether their use enhances the understandability and efficiency of the code. \nUsing break and continue frequently makes code hard to follow, and if replacing them makes the code even harder to follow, then that's a bad change. \nThere are valid contexts for using break and continue statements, especially when alternative structured techniques are insufficient. \nHowever, they are bad because they produce methods with high cyclomatic complexity. \nSuch methods are difficult to read and difficult to test."},{"question":"is apkmirror.com safe for downloads?","response":"The site Apkmirror.com manually vets and approves all uploads to ensure app safety, and it restricts its collection to free applications, avoiding any illegal or 'cracked' versions. \nThusly, downloading from Apkmirror.com is generally safe."},{"question":"ulimit: difference between hard and soft limits","response":"A hard limit, which is set to ensure security, can only be raised by the root user, although any process can lower it. \nOn the other hand, a soft limit, while convenient for processes that cooperate, can be changed by the process itself at any time. \nHowever, it is not suitable for security purposes due to its malleability by the processes it governs."},{"question":"do you know other android keypad commands (dialer codes)?","response":"The code *#*#4636#*#* can provide information on your phone and battery, including phone information, battery information, battery history, and usage statistics. \nUsing the code *#*#7780#*#*, you can perform a factory data reset, which will remove Google account settings, system and application data, and downloaded apps, though not the system software or SD card contents. \nFor camera information, *#*#34971539#*#* will give you options like updating camera firmware and checking the camera firmware version. \nAn app called \"SGS Tools\" is freely available on the market, offering a collection of these commands. \nAndroid secret codes like 4636 (for debug information), 8351\/8350 (voice call debug), and 36245 (email debug) are consistently applicable across all devices. \nIt's important to note that each Android device may have a different set of secret codes, usually defined by the applications installed."},{"question":"how do i repeat the last command without using the arrow keys?","response":"You can use: Crtl-P, Ctrl-N, Ctrl+p, or, CTRL + P then CTRL + O. \n\nWith Magic space, you get to preview the command before it's run. \n\nWith any POSIX shell implementing the User Portability option (including ksh, zsh, bash, yash), you can also use the fc command: fc -e : -1. \n\nWith csh or any shell implementing csh-like history substitution (tcsh, bash, zsh), you can also use the ! to call the last command beginning with . \n\nTo redo the previous command you can use: sudo !! \n\nYou can set up your shell to use vi command editing mode, by adding set -o vi to your shell startup file (e.g., ~\/.bashrc). \n\nMac iterm2 users can bind \u2318+R to 0x0C 0x10 0x0d. \n\nToo long, didn't read (tl;dr): !! just appends the last command to your current command, so !! executes the last command and appends the output to your current command. \n\nThe ksh shell has a default alias r that repeats the most recent command: alias r='fc -s', so typing r runs the last command."},{"question":"where do magic hashing constants like 0x9e3779b9 and 0x9e3779b1 come from?","response":"0x9e3779b9 is the integral part of the Golden Ratio's fractional part 0.61803398875\u2026 (sqrt(5)-1)\/2, multiplied by 2^32. \n0x9e3779b1 is the prime closest to 0x9e3779b9 and appears to be a bit of \"cargo cult\" as this is not a modular hash."},{"question":"how does the mac choose which connection to use when both wifi and ethernet are connected?","response":"When attempting to connect to the internet or network on a Mac using multiple active connections, the operating system, OS X, will prioritize the connection type listed at the top within its network settings. \nAdditionally, despite any set order of service, Mac OS has been observed to favor WiFi connections over Ethernet even if Ethernet is positioned higher in the list."},{"question":"can tls work without certificates?","response":"TLS itself could do encryption without certificates. \nAdditionally, you can have SSL\/TLS without certificates."},{"question":"difference between nohup, disown and &","response":"Using & causes the program to run in the background, while nohup and disown, although largely unrelated, serve to suppress SIGHUP (hangup) signals, preventing the program from being automatically killed. \nIf you have a running job, disown can be used to modify it."},{"question":"is bitly com a virus?","response":"bit.ly itself does not distribute malware."},{"question":"quickly calculate date differences","response":"For unit conversions and calculations, including calculating the difference between two dates, qalculate is a recommended tool that comes with a GTK and KDE interface."},{"question":"how to suspend and bring a background process to foreground","response":"Interactive Ctrl+z will suspend the currently foregrounded program, bg will background the most recently suspended program, and fg will foreground the most recently suspended program. \nTo suspend the process running in the background, use: `kill -STOP %job_id`; the SIGSTOP signal stops (pauses) a process in essentially the same way Ctrl+Z does."},{"question":"roles to play when tailgaiting into a residential building","response":"The classic ways to dupe people to letting you into a building include: have a prop that gives a visual indication why you're standing outside the door, such as a cigarette or e-Cig, lunch-bag, coffee, box of donuts; approach a door with your hands full, for example, with a huge gift wrapped box; pose as someone looking to pick someone else up, a family member needing to check on an elderly resident, or dress as a fire marshal, utilities inspector, law enforcement, building security, or process server. \n\nYou could also become a legitimate employee of doordash, and then order food to that building from yourself with instructions to go and find someone specific at the company you are targeting; just show the note to the receptionist and ask them to direct you."},{"question":"technology that can survive a rubber-hose attack","response":"Making a system secure against people being tortured may be accomplished by using keyfiles, rather than a phrase that someone memorizes, or require more than one person to be party during the process, or use deniable encryption and verifiable destruction. \n\nAnother approach is to use public\/private key encryption, where you encrypt a file with the public key provided by an anonymous third party, who alone can decrypt the file."},{"question":"how to view progress when encrypting a disk?","response":"Open up the Terminal and enter the command: diskutil cs list or with APFS starting with 10.13, use diskutil apfs list. \nIf you prefer a concise answer, you can run the command diskutil cs list | grep -e \"Conversion\" -e \"Volume Name\". \nAnother approach is to use a loop with a sleep interval; for instance, while true; do diskutil cs list | grep 'Conversion Progress' ; sleep 30; done. \nAlternatively, you can use the watch command: watch -n 5 \"diskutil cs list | grep -e Conversion -e Volume\\ Name\". \nFor APFS, you can check decryption progress with while true; do diskutil apfs list | grep 'Decryption' ; sleep 720; done or encryption progress with while true; do diskutil apfs list | grep 'Encryption Progress' ; sleep 60; done. \nIf you are using fdesetup, you can check the status using fdesetup status, and for Catalina, the command is while : ; do printf \"$(date) - \" ; diskutil apfs list|grep Encryption ; sleep 300;done."},{"question":"how can i execute `date` inside of a cron tab job?","response":"Commands can be placed in a shell file for execution by cron. \nFor instance, to run a script at 5 am on Wednesdays, you could set a cron job with \"0 5 * * 3 \/data\/script.sh\", so the command would be: '0 5 * * 3 \/data\/script.sh > \/data\/script_`date +\\%y\\%m\\%d`.log 2>&1'. \nAdditionally, it is advisable to use the $() syntax for executing the `date` command and formatting the datetime output to UTC, ensuring to escape the % character and directing both stdout and stderr to a log file."},{"question":"are all https sites legitimate?","response":"HTTPS provides no guarantee that a website is not malicious. \nBasically, it means that your connection to the page is encrypted by SSL, but not necessarily the content. \nSo, malicious JavaScript or viruses can be transferred over HTTPS as easily as over HTTP. \nTherefore, it's best to avoid trusting website content just because it is delivered over HTTPS."},{"question":"does dd copy empty space?","response":"Using the \"dd\" command in Linux creates a bit-for-bit copy of a drive, capturing all the content, including \"empty space,\" the blocks that do not officially contain data, partition information, UUIDs, and so forth."},{"question":"what is this lock screen with ads and how do i remove it?","response":"The unexpected appearance of a lockscreen claiming to be a feature from DU Quick Charge could be attributed to a variety of apps, such as ES App Locker, Amber Weather, and Xender File Sharing App. \nMeanwhile, ES App Locker has been accused of manipulating its ratings through fake reviews, leading some users to shift to other file managers like Amaze File Manager, which is open source. \nIn some cases, this lockscreen can be deactivated through the app's settings like switching off the Xender Quickcharge feature in Xender File Sharing App, or by completely removing the app from the device. \nInstances of malware related to ES File Explorer have been reported by users who found that uninstalling the app resolved the issue. \nAlternatively, those wanting to continue using ES Explorer can disable the \"Charging Boost\" feature within the app's tools to eliminate the unwanted ad screen."},{"question":"high sierra - the path \/system\/installation\/packages\/osinstall.mpkg appears to be missing or damaged","response":"An approach that worked for one user was to restart in recovery mode (Cmd-R), then Utilities -> Terminal find \/ -name OSInstall.mpkg #. \nAnother user found success by creating an ISO image of OS High Sierra on a USB and completing the installation from there. \nA different user discovered that their problem was due to a disk space error and corrected it by freeing up space through the Terminal in recovery mode, which fixed the issue after a reboot. \nThe CommandOptionR key combination to initiate Internet Recovery Mode seemed to be the solution for someone else, who then reinstalled OS High Sierra. \nBooting the Mac without safe mode and reinstalling an update also worked to overcome the error in several attempts. \nAnother solution involves going to the Apple Menu, selecting the Startup Disk, and Restart, which helped resolve the issue temporarily. \nFor some users, holding down the option key while starting up to select the correct startup disk from the Apple logo proved effective. \nA final resolution was booting with Cmd + R to access the recovery partition and using the Startup Disk utility in the Apple menu to unlock the hard drive and reboot the system."},{"question":"how can i search a specific type of file in mac?","response":"In Finder, you can open a Find Window with cmd-f or initiate a spotlight search and select \"show all\", then, click the little \"+\" icon and choose \"File Type\" as a search criteria. \nYou can also perform wildcard searching by selecting a Kind of \"Raw Query\" with the kMDItemDisplayName attribute in Finder. \nAnother useful method is to narrow down your search using the kind: keyword. \nIf you prefer using the terminal, you can utilize Bash commands such as find ~ -type f -name '*pdf' or find ~ -iname '*pdf'. \nSpotlight offers another method where you can press Command + Space bar, type period (.) followed by the extension of the file you're searching for."},{"question":"unnamed faces in my oven","response":"iPhoto's face detection capabilities can sometimes mistakenly identify the back of a person's head as a face. \nUsing an oven with a reflective coating on the inside through which a photo is taken can also confuse the software, leading iPhoto to detect faces where there are none erroneously. \nHowever, upon close examination of certain images, some faces may indeed be discovered by adjusting image settings like contrast and saturation."},{"question":"how do i negotiate dialogue boxes using the keyboard only?","response":"In macOS, to navigate dialogs and select commands without a mouse, you can use the tab key to cycle the dialog boxes and move between buttons and active controls within the operating system. \nWhen a button is highlighted with a blue border, the space bar may be used to select it. \nTo enable this keyboard navigation functionality, you need to adjust settings in System Preferences under the Keyboard\/Shortcuts\/Full Keyboard Access sections. \nAdditionally, the return key typically activates the default button in the dialog, which is usually represented with a colored background. \nIt's also possible to cancel an operation using the Escape key, although this may work intermittently depending on the context."},{"question":"what is the advantage of currying?","response":"Currying depends on the ability to return a function and decomposes a functions with multiple arguments into nested functions of single arguments. \nThe advantage of currying lies in its ability to enhance the functionality of functions, allowing for more effective stacking, especially as operations become less trivial. \nAt its core, currying provides the essential benefit of obtaining partial application effortlessly. \nIt simplifies the creation of anonymous functions, offering a practical advantage in programming. \nCurrying also enables flexible function composition, allowing the creation of new functions from existing ones by fixing certain parameters. \nIt is particularly valuable in languages with only functions and lacking data types, which is important from a theoretical point of view. \nWhen dealing with incomplete sets of arguments for a function, currying stands out as advantageous, providing flexibility in function application. \nEffectively obtaining multi-argument functions and allowing limited abstraction over arity are additional benefits of currying."},{"question":"can the iphone x zoom?","response":"As of iOS 14 beta 3, the Zoomed View feature is supported on iPhone XS Max and iPhone XR. \nPrior to this update, the feature was not supported."},{"question":"why most people use 256 bit encryption instead of 128 bit?","response":"There is a common perception that larger key sizes automatically imply greater security, which is not true, since the complexity of cryptographic algorithms can be influenced by other factors, such as implementation weaknesses. \nHistorical developments and regulatory inertia have led to the adoption of various key sizes for encryption, with the choice often influenced by perceived security needs rather than actual security requirements. \nThe National Institute of Standards and Technology's draft recommendations for post-quantum cryptography include the use of 256-bit keys."},{"question":"how to use watch command with a piped chain of commands\/programs","response":"When forming command lines that involve parsing output, it's useful to include a mix of single and double quotations."},{"question":"what are alternatives for menumeters on el capitan?","response":"iStat Menus is currently running a beta version for El Capitan, and iStat Pro Widget 4.92 is a free, though discontinued, widget solution. \nAdditionally, MenuMeters has been ported for use with El Capitan, accessible at http:\/\/member.ipmu.jp\/yuji.tachikawa\/MenuMetersElCapitan\/."},{"question":"is constantly looking for code examples a sign of a bad developer?","response":"Being a developer who searches for code examples does not imply incompetence. \nIt's a recognition that memorization of all programming interfaces is impractical, and examples can be a preferred reference. \nHowever, the approach should not be to replicate code uncritically without understanding its operation. \nIn contrast, developers become less effective when they cannot solve problems without external code samples. \nSeeking guidance in coding isn't inherently unsound, but leaning on it excessively can weaken one's intrinsic problem-solving abilities."},{"question":"what are pseudo terminals (pty\/tty)?","response":"Pseudo-terminals act as emulators for serial lines, offering end points for various communication programs like telnet, ssh, and xterm shells."},{"question":"are all macbooks 64 bit?","response":"Macbooks can have either a 32-bit kernel or a 64-bit one depending on the OS X. \nMac OS X 10.6 Snow Leopard is the final version that supports 32-bit Intel Macs, while subsequent versions default to 64-bit. \nOS X programs, on the other hand, come in universal binary and can support multiple formats, namely; PowerPC 32-bit, PowerPC 64-bit, Intel 32-bit, and Intel 64-bit. \nThis makes the distinction a little blurry in that, for example, you could have a an OS with 32-bit code run on a 64-bit CPU."},{"question":"how do i download music from dropbox to my ipad?","response":"Unfortunately, because of the way iOS is architected, it is not possible to take music from third-party apps or websites and put them into Music.app."},{"question":"what is dd if dev zero?","response":"It can be used to erase specific portions of your hard drive, such as the first 4096*4096=16MB and the last 512*4096=2MB. \nThis command overwrites the specified device, in this case, \"sda,\" with zeroes, making it useful for cleaning a drive before forensically copying data. \nAdditionally, it's employed to assess the quality of inserted USB drives or MicroSD cards."},{"question":"how to use pip after the os x el capitan upgrade?","response":"One quick solution is to install Python using homebrew into a directory such as `\/usr\/local\/bin`, which allows for the use of pip and python regardless of the system provided version. \nAdditionally, opting to use `pip3 install` alongside the desired package name helps to solve permission problem. \nA direct and secure approach without altering system settings is to install Python modules for the individual user using the `pip install --user` command followed by the module name. \nAn alternative method involves installing Python with homebrew and then obtaining pip through the `sudo easy_install pip` command. \nLastly, using virtual environments, specifically using virtualenv or virtualenvwrapper, creates an isolated environment for each project, permitting seamless pip usage for package management within these enclosed spaces."},{"question":"how can i count the number of lines of a file with common tools?","response":"Use your_command | wc -l; for example: $ cat foobar.txt | wc -l; or, more simply: wc -l myfile. \n\nThe -c flag will do the job, for example: grep -c ^ filename will count the lines returned by grep. \n\nYou can also use AWK to count the lines in a file: awk 'END {print NR}' filename."},{"question":"can you see how many times you called someone on iphone?","response":"You can do so by opening the Phone app and tapping Recents, then on the \"i\" icon next to the contact you want to check. \nSubsequently, a list of calls will appear with information about them."},{"question":"how do i delete all terminal mail?","response":"To empty your mail file, you can execute the command: > \/var\/mail\/$USER. \nThis should suffice, but to delete the mail file, requires sudo."},{"question":"what is the difference between urgent pointer and urgent flag in tcp?","response":"The URG flag in TCP segments is utilized to indicate to the receiving station that part of the segment's data is urgent and should be processed with higher priority. \nThe URG TCP flag plays a critical role in managing priority traffic within a network, specifically between defined sources and destinations."},{"question":"why does my shell script choke on whitespace or other special characters?","response":"It's imperative to avoid xargs and always use double quotes around variable and command substitutions to prevent issues stemming from word splitting and wildcard expansion. \nThis guideline is recommended even though, under certain conditions and with a solid understanding of word splitting in shell scripts, one might decide not to use quotes."},{"question":"gpu problem - boot hangs on grey screen","response":"If the problem is that you're unable to move those files it's probably the System Integrity Protection that's preventing you. \nThe only real way to fix this problem is to replace the defective AMD chip. \nOnly the file AMDRadeonX3000.kext really has be absent on boot to enable a successful startup. \nIn situations where problems arise a second time after an OS X Security update, a series of steps including restarting in recovery mode and running specific commands are recommended: Restart in recovery mode by press&hold Cmd+r Run these commands."},{"question":"whats the story behind super cow powers?","response":"Jason Gunthorpe was the main maintainer and developer of Apt in its early days, and he had a fondness for cows, which seemingly influenced the inclusion of cow-based jokes and easter eggs within Apt. \nIt has been suggested that the \"Super Cow\" reference within Apt might be connected to the \"Cow and Chicken\" cartoon that was popular when Apt was under development."},{"question":"how to move all files and folders via mv command","response":"You could try: mv \/path\/sourcefolder\/* \/path\/destinationfolder\/ \n\nThe following may work in Bash, depending on your shell: $ mv source\/{,.}* \/destination\/folder\/here. \n\nThe bullet-proof (GNU) way is: cd \/SourceDir && find .\/ -maxdepth 1 -mindepth 1 -exec mv -t \/Target\/Dir {} + P. S. \n\nzsh: mv \/src\/*(D) \/dst\/ (D) to include dot-files. \n\nThe following works in Bash 4.2.46 to move all files and folders, including hidden files and folders, to another directory. (where * means all hidden files except . and ..): mv \/sourcedir\/{,.}* \/destdir\/."},{"question":"how can i save tabs in iterm 2 so they restore the next time the app is run?","response":"In iTerm2, you have the ability to save and restore window arrangements using the shortcuts \u21e7 \u2318 S for saving and \u21e7 \u2318 R for restoring. \nTo enable 'Session Restoration' in iTerm 2.9 beta or iTerm3 beta, you should open Preferences, select the General tab, navigate to Startup, change the setting to 'Use System window restoration setting', and afterwards, restart the program. \niTerm2 version 2.1.4 features a setting under Profiles that allows reusing the previous session's directory. \niTermocil can be utilized in iTerm2 to create pre-configured layouts that include a specified directory and the execution of predetermined commands."},{"question":"how to make a machine accessible from the lan using its hostname","response":"You will need to configure your other systems to use some kind of name lookup service; for example, you can bind and enter all local machines inside a local domain, then have it serve DNS for that site. \n\nIn order to access machine B from machine A using the name of machine B, machine A has to have some way to map the name of B to its IP address, so to add an entry for B in the hosts file of A: Determine the IP address of B, then connect B to the network, and it should get the IP address you specified and will be reachable by the specified name from any machine in the network. \n\nVi \/etc\/dhcp3\/dhclient.conf send host-name \u201cubuntu-laptop\u201d; and \/etc\/init.d\/networking restart. \n\nUse Multicast DNS (mDNS), or you can create an A type subdomain that points to your internal IP."},{"question":"does anyone knows who is paying for the free (normally paid) android programs on the amazon store","response":"Developers get nothing for such apps. \nNo payments are made to or received by developers for apps with a list price of $0.00 as per the updated Amazon developer agreement. \nThis was a change from the original agreement, where developers were ensured at least 20% of the set price."},{"question":"consequences of the wpa2 krack attack","response":"Both clients and access points are susceptible to the vulnerabilities described in the website: https:\/\/www.krackattacks.com: \"Who is vulnerable?\" on KRACK attacks. \nClients are advised to utilize encrypted software-based networking methods such as VPNs, Tor proxies, HTTPS, and SSH, to mitigate potential eavesdropping risks. \nAdditionally, in the absence of vendor patches, network owners can use alternative methods such as sneakernet or Ethernet cabling to secure critical systems and devices. \nDespite the severity of the vulnerability, open networks pose an easier target for attackers, hence the real-world consequences of KRACK attacks are likely to be limited for most users."},{"question":"does facebook store plain-text passwords?","response":"The workings of Facebook's password storage methods are not publicly known to anyone except for Facebook itself. \nAccording to information from an industry conference, Facebook has been confirmed to not store passwords in plain text."},{"question":"is there any reason to use c++ instead of c, perl, python, etc.?","response":"When it comes to performance, C++ offers performance advantages due to its abstraction mechanisms, particularly templates, which have no performance overhead at runtime. \nThis allows for writing efficient, high-level code without the usual runtime costs associated with other languages' abstractions. \nC++ also provides both abstraction and performance, allowing for better organization and code that can function efficiently even if data representations change. \nThis combination comes with a steep learning curve and the potential for subtle mistakes. \nTemplates and the Standard Template Library (STL) in C++ offer useful abstractions and save labor without an appreciable runtime performance hit despite increasing the binary footprint. \nMoreover, text processing in C++ is significantly less painful compared to that in C. \nTwo key features of C++ are object polymorphism, and Resource Acquisition Is Initialization (RAII), which simplifies dealing with different hardware architectures or memory management tasks. \nC++ is fast, though there is a cost in terms of syntax and strong typing. \nOn utility, C++ has a comprehensive arsenal of utilities that can be cumbersome when dealing with library dependencies or converting data types. \nThe transition from C to C++ yields considerable gains with better memory management, a stronger type system, a better standard library, and namespaces. \nFinally, C++ is commended for enabling writing significantly less code compared to C without runtime overhead and featuring better safety by catching more errors at compile time."},{"question":"whats the difference between ike and isakmp?","response":"ISAKMP is part of IKE: IKE establishes the shared security policy and authenticated keys; ISAKMP is the protocol that specifies the mechanics of the key exchange."},{"question":"dmg how to change password?","response":"You can change it by first selecting the DMG in Disk Utility, then go to Images>Change Password."},{"question":"are design patterns frowned upon?","response":"According to some opinions, the problem with design patterns is similar to the one with inheritance in that they are overused by developers who don't fully grasp when and how to apply them appropriately. \nThese patterns are often seen as workarounds for the deficiencies present in programming languages themselves. \nSince good design patterns are required to cater to many possible usage scenarios, they tend to be over-engineered. \nSo, while design patterns are not frowned upon in Agile, experienced developers know that development is rarely sufficiently general and abstract enough to fit a pattern perfectly. \nIt is further advised that that design patterns are certainly not best practice for problems that they fail to solve. \nOn the other hand, another opinion suggests that developers are almost certainly using at least some design patterns and that design patterns can prove to be significant accelerators for mastering complexity, however both patterns and anti-patterns do no good to the developer who doesn't understand why they exist. \nPeople use patterns every day without a problem as long as the code is logically functional, rarely crashes, and is user-friendly. \nDesign patterns are not antithetical to agile practices but rather what is antithetical is design patterns for the sake of using design patterns."},{"question":"how to disable battery full notification sound?","response":"Currently, there is no built-in option provided to disable the \"Battery Full\" notification alert on certain devices, including specific Samsung models. \nNevertheless, you can adjust the global notifications to silent to prevent the alert from making a sound, yet this requires individually setting the notification tone for each app and doesn't serve as a perfect fix. \nAlternatively, for those who need to mute their phone during the night but still wish to receive emergency calls, an app like \"Night Ringer Free\" can be utilized to create a whitelist for calls and messages while silencing other notifications. \nThere are also apps like Sound Manager that allow for scheduling sound volumes and types, enabling users to mute the notification volume during specific hours without affecting the ring or media volumes. \nFor users who are comfortable with using more advanced tools, Tasker is a solution on some devices that enables disabling notifications during a set timeframe, such as during the overnight charging period. \nMoreover, some users have found that operating system updates have naturally resolved the issue, as noticed with the upgrade from Android 2.2 to 2.3 on the Samsung Galaxy SGS. \nFinally, there are dedicated software modifications available separately for Lollipop, KitKat, and Jelly Bean, such as the 'GravityBox' Xposed module or the Disable Battery Full Alert module, which offer the option to remove the \"Battery Full\" notification sound."},{"question":"what is the difference between tcp and tls?","response":"TLS is purpose-built to provide a secure channel over a reliable transport layer as it does not handle transport errors, lost packets or other disturbances that may occur with IP. \nWhile TLS itself does not impose a requirement on the transport protocol to be TCP, TCP is generally chosen as the reliable protocol for internet operations."},{"question":"how can i set my default shell to start up tmux","response":"There is command chsh which changes login shell, so consult man chsh, and make tmux your login shell, but don't forget to configure the default-shell setting for tmux first. \n\nStart tmux on every shell login. \n\nYou can use case $- in *i*) [ -z \"$TMUX\" ] && exec tmux esac in my .zshrc; if you're using bash, put it in your .bashrc instead. \n\nRun tmux [[ ! $TERM =~ screen ]] && [ -z $TMUX ] && tmux fi fi. \n\nYou can execute tmux part with: (exec tmux attach || exec tmux new-session). \n\nGo to terminal preferences, and then click to \"command\" bar, check the \"Run a custom command instead of my shell\" and write whatever command you want to execute at the startup of your terminal. \n\nAdding a line like [ -z \"$TMUX\" ] && { tmux attach || exec tmux new-session && exit;} in your bashrc file will probably do the job; note, you shouldn't wrap tmux attach with exec, as this would cause the connection to be closed when there are no tmux sessions to attach to."},{"question":"where are certs stored on iphone?","response":"You can find certificates installed on your device in Settings \u2192 General \u2192 About \u2192 Certificate Trust Settings."},{"question":"how can i reduce a videos size with ffmpeg?","response":"For better compression, using H.265 instead of H.264, replace the libx264 codec with libx265 and increase the CRF value to achieve additional compression. \nWhen choosing the libx265 codec, a reasonable CRF range might be between 24 to 30. \nIn the case of two-pass average bitrate encoding (2-pass ABR), you would typically update the libx264 video codec to the more efficient libx265 codec. \nThe -crf option is commonly utilized for x264 encoding, and choosing a CRF value around 23 can yield DVD quality. Additionally, for compression without perceptible loss in quality, you could execute a default conversion using ffmpeg without specific options. \nAmong other methods to reduce video size, modifying the bitrate, varying the Constant Rate Factor, and changing the video screen size were tested. \nFurthermore, for HD video compression with minor noticeable quality loss, a command with crf 28 and certain presets for faster encoding and specific tune options can be employed. \nLastly, to find the desired size reduction, running a script with a range of crf values could be helpful."},{"question":"how do i set environment variables on os x?","response":"To set an environment variable for use in a sh type shell, such as bash or zsh, you'll need to create .profile, .bash_profile, or .bashrc. \nA .profile for environment variables can be created on an OSX system using the touch .profile command in a Terminal session, then editing the file with a text editor of your choice. \nAlternatively, on OSX, you may use the launchctl setenv command followed by the variable name and value, ensuring that you restart the application\/terminal to apply the change."},{"question":"is awk faster than grep?","response":"In general, grep is faster and more efficient than awk, being a compiled C-code program optimized for finding patterns while awk is an interpreted programming language. \nWhen it comes to basic string searches, grep reaches speeds orders of magnitude faster than awk. \nHowever, the speed advantage of grep over awk might vary depending on system implementations and the dataset being used."},{"question":"task switcher moves to non-primary display on mavericks-catalina","response":"To address the issue of the Task Switcher following the last-moused-over dockbar, it's recommended to hide the menu bar on your secondary monitor. \nAlso, do not position the Duet \"below\" your other display in the arrangement. \nFinally, unchecking and re-checking Dock > Automatically hide and show the dock, will help."},{"question":"someone is using my (or has the same) email","response":"You will have to go to court for the provider to give data about IP addresses and release the full emails, including its headers, which will show that the emails did not go through your mail server (or the mail server you use), so you can prove that you did not have access to the server the mail is originated from. \n\nThis might very well be a scam, and you can find similar letters in a Google search. \n\nOne of your first steps needs to be filing a police report to document the fact that someone is either making false accusations or committing criminal behavior in your name, and it would be good to get some legal advice. \n\nIgnoring the legal questions and going to the e-mail issue, which is the security issue, it is absolutely trivial to fake e-mail; most likely, nobody hacked your mail, someone just forged one or made up the whole thing."},{"question":"where are contacts saved on android?","response":"This depends on your manufacturer's setup. \nFor \"Plain Vanilla Android\" they are located in \/data\/data\/android.providers.contacts\/databases. \nFor a Motorola Milestone 2 they are stored in \/data\/data\/com.motorola.blur.providers.contacts\/databases\/contacts2.db."},{"question":"is it normal to spend as much, if not more, time writing tests than actual code?","response":"It is normal to often have more code within the tests than in the actual code being tested. \nWhether writing unit tests or other types of tests such as integration or acceptance tests, there can be many scenarios and edge cases to consider, which increases the volume of test code. \nIt depends on various factors, such as whether you're employing a test-driven development (TDD) approach or writing tests afterwards. \nThe time spent writing tests first through Test-Driven Development (TDD) or after the code could indeed be substantial, even exceeding the time spent writing the code itself. \nHowever, this investment in testing could help build less buggy and more maintainable code, ultimately easing future development efforts. \nYet, it is crucial to be mindful of the potential for over-testing and the time spent maintaining the tests, which might not always indicate a productive testing strategy."},{"question":"how to close all background apps at once in android 5.0 (lollipop)?","response":"To my knowledge, you cannot clear all recent apps at once on Android Lollipop 5.0, but it's generally advised not to do so. \nHowever, if you're using CyanogenMod 12 or an HTC One M7 with Sense 6, you can adjust the task manager settings from \"cards\" to \"grid\" view to enable a close all or \"X\" button."},{"question":"what is the fastest way to view images from the terminal?","response":"If you are using Gnome and the Nautilus file manager, you can directly use eog to open images, or you can use other image programs like feh for image viewing. \nFor those on framebuffer-activated pure terminal environments, fbi is recommended. \nAnother terminal-based option is fim, which offers improvements over fbi and features vim-like controls. \nIf ImageMagick is installed, its display command-line tool can be used to view pictures through command lines like 'display path\/to\/picture.png'. \nIn the case of w3m's imgdisplay library, it's able to show images in specific terminal emulators, with ranger being a file browser that can utilize it for image previews. \nAnother approach is to run a SimpleHTTPServer through Python and view images from a browser. \nOn OS X, iTerm 2 supports displaying inline images, which can be convenient compared to using the Finder or Preview.app. \nFor Linux users, installing gnome-open allows you to open files, including images, using a simple terminal command alias. \nIf you prefer a very fast terminal-based viewer, cacaview is an option, especially when graphics are not enabled in the terminal, in Debian: `sudo apt-get install caca-utils`. \nTerminology terminal emulator offers an easy way to view images through commands like 'tyls' or 'tycat'. \nPicture-tube is a node\/npm package that enables PNG file viewing in text-mode terms inside the terminal that you can install using: `-g picture-tube`. \nAnother terminal display option is pxl, which supports multiple image formats. \nCatimg is a handy tool that supports inline image viewing as well and has Debian packages available. \nIf you're more comfortable with web browsers, Chrome and Firefox, both support viewing a variety of image formats from the terminal. \nImcat is a simple solution for image viewing in the terminal that needs only one C file and one header file, and it automatically scales images with quality sampling. \nThe kitty terminal has a feature for displaying images directly inside the terminal using the icat \"kitten\". \nChafa is another tool available on GitHub for image viewing in the terminal with support for different options and animated GIFs."},{"question":"sharing browser links between pc and phone","response":"GTalkSMS (Google Code Project Page) enables forwarding links to your PC using XMPP\/GTalk. \nUtilizing Google Chrome on both PC and Android while signed in with the same Google account provides the convenience of having your browsers synced. \nAdditionally, Chrome sync, Firefox sync, and Opera link are all viable methods for synchronizing current open tabs and bookmarks between devices. \nSimilarly, MAXS can be used to exchange clipboard contents over XMPP. \nSocial bookmarking services like Papaly offer user-friendly interfaces and sync capabilities with existing bookmarks. \nWith Pushbullet, sharing a webpage from a phone and pushing it to the Windows\/Mac app or Chrome extension is trivially easy. \nFor a dependable solution, Google Keep is recommended as it outperforms other options."},{"question":"can not unlock my android device as have no internet connection?","response":"If device credentials are rejected despite being correct due to no internet connection, an option is to try entering \"null\" as the password or to utilize your username without appending \"@gmail.com\". \nAnother peculiar method is repeatedly clicking the sign-in button without entering any information, subsequently inputting something random, continuing to click, and finally entering the username (excluding @gmail) and the password."},{"question":"accidentally removed allowed vlans from cisco switch dot1q trunk","response":"Use add\/remove\/none to fix this issue."},{"question":"when someone blocks you on iphone can you still facetime them?","response":"No, blocking a number will block it for normal calls, FaceTime and FaceTime audio."},{"question":"how to uncompress zlib data in unix?","response":"To decompress using the gzip module, which itsef uses zlib, try `import gzip s = '...' with gzip.open('\/tmp\/data', 'w') as f: f.write(s)`. \nIf needing to decompress with command-line arguments in Python, use a combination of glob, zlib, and sys modules in sys.argv: with open(filename, 'rb'), and run it as '$ python expander.py data\/*'. \nFor openssl methods, a command '$ openssl zlib -d < \/tmp\/data or $ openssl zlib -d -in \/tmp\/data' can be executed. \nIt's also feasible to decompress with standard shell-script and gzip by adding the gzip magic number and compression method to data from zlib.compress. \nAlternatively, 'zlib-flate -uncompress < IN_FILE > OUT_FILE' is a viable command available in various Linux distributions and macOS, found in the qpdf package. \nOpenSSL provides commands for both compression and deflation with zlib i.e., 'openssl enc -z -none -d < \/file\/to\/deflate'. \nUsing pigz, which supports zlib compression, you can uncompress with the '-d' flag: `-d --decompress --uncompress`. \nThe zpipe utility, available with the zlib library source, allows for decompression through decompress: `zpipe -d decompressed`. \nA Perl one-liner: 'cat file.compressed | perl -e 'use Compress::Raw::Zlib;my $d=new Compress::Raw::Zlib::Inflate();my $o;undef $\/;$d->inflate(<>,$o);print $o;'' is available for macOS and nicely formatted it looks like: `use Compress::Raw::Zlib; my $decompressor = new Compress::Raw::Zlib::Inflate(); my $output; undef $\/; $decompressor->inflate(<>, $output); print $output;`. \nLastly, a Python3 one-liner: `python3 -c 'import sys,zlib; sys.stdout.write(zlib.decompress(sys.stdin.buffer.read()).decode())' < $COMPRESSED_FILE_PATH` is suggested as a natural choice for Linux users to decompress with zlib."},{"question":"is an antivirus really needed for android?","response":"Regarding antivirus usage on phones, it's suggested that running an antivirus is unnecessary. \nInstead, focus on understanding app permissions during installation and being cautious about what permissions you grant. \nThough not as crucial as on Windows, having antivirus software isn't a bad idea, even on systems like Android, as there have been instances of malicious apps. \nIn summary, sticking to downloading apps from the Google Play Store should allow you to avoid worrying about viruses on your Android device."},{"question":"are cos and qos ever interchangeable?","response":"In the Juniper world they are more interchangeable as all QoS config is done under the class of service stanza of the config."},{"question":"how does imessage know that the recipient is an ios 5 device?","response":"iMessage identifies iOS 5 devices by associating mobile numbers with device IDs stored on Apple's server for APN. \nIt utilizes the Device ID to discern whether another device is running iOS 5. \nThe use of wizards also plays a role in this identification process."},{"question":"is rsync installed by default?","response":"Although Rsync is a fast and versatile copying tool, it's often not installed on systems by default."},{"question":"how can i protect myself from this kind of clipboard abuse?","response":"Use the intermediate-text editor approach instead of editing directly in a terminal, an intermediate text editor like Notepad++ or Emacs is utilized to assemble and finalize the text before copying it to the terminal. \nNever use the terminal pasting functionality to paste things into vim\/emacs, because it is akin to executing a batch of commands. \nIt has been advised that pasting unsafe data into terminals is not safe, and even though there are plugins meant for safe pasting, they may have been compromised. \nNevertheless, it is safe to use Vim's specific command 'set mouse=a' for pasting with the middle mouse button. \nEmploy a background application to consistently monitor and automatically sanitize clipboard contents, removing potentially harmful control characters. \nAnother solution is, running the web browser in a virtual machine to prevent mindlessly pasting potentially dangerous content from the web into a terminal, given that the virtual machine's clipboard is not synchronized with the host."},{"question":"how do i prevent scrum from turning great developers into average developers?","response":"The daily scrum should be viewed as a brief meeting rather than a competitive platform, emphasizing the importance of treating Scrum as a flexible framework rather than scripture. \nScrum practices should be done correctly; not every individual can work within a self-organizing team. \nA Product Owner-centric approach and finding a scrum master and product owner who understands the importance of teamwork and individual excellence are crucial components of effective Scrum implementation. \nTailor Scrum practices to fit the unique needs of your team, instead of what Scrum theory tells you to do. \nAdditionally, understanding why management feels the need for micromanagement is key, and addressing those issues directly can help create a healthier work environment. \nHiring team players and establishing a norm that the standup simply communicates ongoing tasks can contribute to maintaining individual excellence within the team. \nTo address individual performance concerns beyond standup meetings and ticket speed, focus on caring about each team member. \nYou should prioritize the big tasks highest, so someone should pick up the big difficult tasks on day 1. \nUse Retrospectives to address process issues and align them with good business outcomes\u2013be open and honest. \nSome advise to reduce the frequency of meetings, schedule them before lunch, critically assess the objectives can enhance the effectiveness of Scrum and kill the sprints. \nRecognizing the importance of ownership and fostering a sense of responsibility for the team's success encourages developers to care about code quality and architecture."},{"question":"what is tabnabbing?","response":"Tabnabbing is an attack method where the appearance of a webpage is altered when it's not the active tab, enticing users to provide their login information upon their return. \nIt involves deceptive changes such as switching the favicon and title to imitate sites like Gmail, misleading users into believing they are on a legitimate page. \nAdditionally, it is recognized as a social engineering attack utilized via web browsers, where the attack is initialized by prompting users to visit a dangerous website which remains dormant until the user navigates away and returns to the tab."},{"question":"how can i display the contents of a text file on the command line?","response":"To display the content of a text file, you can use the cat command followed by the filename: \"cat. cat filename\". \nIf searching for specific text within a large file, you can use `cat filename | grep text_to_search -ni`. \nAlternatively, a more interactive approach involves using the Vim or vi editors, which offer extensive features for file browsing. \nIt is also suggested that you can use more interactive Vim editor (or vi editor if you do not have Vim): vim filename or vi filename which can be used as a reader in \"Normal Mode\" or using \"-R option\". \nLastly, you can use \"more e.g. more file.txt\" but it lacks many useful features that \"less\" has."},{"question":"what is the difference between reboot , init 6 and shutdown -r now?","response":"There is no difference, in that internally they all perform the same function now."},{"question":"what is nproc and nofile in linux?","response":"In terms of system limitations, the nofile parameter specifies the maximum number of open file descriptors, and the nproc parameter sets the maximum number of processes allowed."},{"question":"is 30 mbit\/s fibre faster than 30 mbit\/s copper?","response":"30 Mbit\/s is the same speed, no matter if it runs over copper or fiber; however, encoding for fiber may have less latency, fiber speeds may be more scalable than copper, and fiber losses may be lower."},{"question":"why is there a big delay after entering a wrong password?","response":"This intentional delay serves as a security measure to prevent rapid, repeated attempts at cracking the system. \nIt is designed to limit brute force attacks, ensuring that someone cannot repeatedly guess passwords at the maximum speed the system allows. \nIf the system immediately invalidated credentials upon verification of incorrect input, an attacker could exploit the response time to deduce the correctness of parts of the credentials, significantly reducing the time required for successful guessing."},{"question":"what is the exact difference between a 'terminal' a 'shell' a 'tty' and a 'console'?","response":"In Unix terminology, the terms terminal, tty, and console are closely linked, with \"terminal\" essentially being synonymous with \"tty,\" a text input\/output environment, while \"console\" refers to a physical terminal. \nThe \"shell\" is what users interact with, serving as the command line interpreter. \nOriginally, terminals were hardware devices through which users interacted with computers, evolving from teletypewriters (TTYs) to keyboards and displays. \nAs for \"consoles\", they're often the main physical terminals connected directly to a machine, and they behave like ttys within the operating system. \nShells are user interfaces for logging in and initiating other programs, predominantly known in Unix as command-line shells. \nThe distinction between terminal and shell responsibilities is split, for example, with regards input, the terminal converts keys into control sequences and the shell converts control sequences into commands. \nWith regards to output, for example, the shell emits instructions and the terminal acts on them. \nFurthermore, the shell never sees the output of the instructions."},{"question":"copying iso file to usb drive in os x?","response":"An option is to drag and drop the unmounted USB partition into the destination. \nAnother approach involves making the ISO file into a special DMG file and then uploading it. \nThe easiest way involves using the terminal to execute commands to prepare the bootable USB stick. \nAdditionally, you can utilize open-source tools like UNetbootin for this purpose, and there are step-by-step tutorials available, such as the one provided by Ubuntu."},{"question":"is tcp or udp more secure?","response":"Neither TCP nor UDP has inherent features aimed at ensuring confidentiality. \nThe security of both protocols depends on other protocols, like DTLS or Google's QUIC, to provide encryption and other security measures. \nTCP is not inherently more secure than UDP\u2014they both lack specialized security features, and differences in their security implications stem from their functional differences rather than purposeful security design. \nDepending on the application and how it's configured, TCP might be perceived as more secure, but this isn't a valid reason alone to choose TCP over UDP as there are other important considerations to take into account between the two. . \nIn terms of security guarantees, both UDP and TCP are identical when combined with modern security implementations at the application layer, as is feasible with IPv6 IPSec. \nTCP's complexity does not translate to more security by default; rather, both protocols require additional security measures to be taken, and QUIC is an example of a secure transport layer built over UDP."},{"question":"is pcie flash storage the same as ssd?","response":"Yes and no: SSD, or Solid State Drive, has flash storage inside, but SSD is a special form factor, in most cases meaning that it is designed to fit in places that a normal 2.5\" HDD would be installed; PCIe is a different form factor."},{"question":"what are your favorite mac os x keyboard shortcuts?","response":"Ctrl+F2 allows you to access menu options using your keyboard, similar to the Windows Alt+Space shortcut. \nUsing \u2318+E, you can place selected text into the search clipboard, and then utilize the combination of \u2318+G to find the next instances, making search and replace operations quick and convenient. \nIf you wish to enable a high contrast theme, the shortcut is ctrl+\u2325+\u2318+8, and to cycle through an app's open windows, you can use \u2318+` (backtick). \nFor taking screenshots, \u2318+\u21e7+4 will save a selective screenshot to the desktop, and \u2318+\u21e7+ctrl+4 will save it to the clipboard instead. \nTo navigate to the start or end of a line in any Cocoa text field, you can use ctrl+A and ctrl+E respectively, while \u2318+\u21e7+H brings up the Home folder. \nThe Spotlight search feature can be activated with \u2318+space, useful for quickly launching applications, opening files, and performing calculations. \nTo create a new folder in Finder, you can use the shortcut \u2318+\u21e7+N. \nCycling through running apps is done with \u2318+\u21e5, while \u2318+` allows you to switch through windows of the current application, and \u2318+W closes the currently active window. \nPower keys such as Ctrl+\u23cf bring up the shutdown dialog, Ctrl+\u2318+\u23cf restarts the computer, and Ctrl+\u2325+\u2318+\u23cf shuts down the computer. \nYou can use \u2318+H to quickly hide an application, and \u2318+\u2325+H to hide all inactive application windows, which helps focus on a single task. \nClosing individual or all windows within an app can be done using \u2318+W and \u2318+\u2325+W, respectively. \nTo show or hide hidden files in any file dialog, the shortcut is \u2318+\u21e7+. \nYou can quickly navigate to different folders and directories within file dialogs using shortcuts like ~\/Documents or \u2318+shift+G, which brings up the most recently entered directory. \nWhen switching applications with \u2318+\u21e5, you can select and view an application's windows using the arrow keys, then hit enter to bring a selected window to the foreground. \nTo select the startup volume or boot from a CD\/DVD, you hold down \u2325 or C respectively during boot. \nHelp for searching menu items can be accessed with \u21e7+\u2318+?, and \u2318+E puts selected text into the search dialog, with \u2318+G and \u21e7+\u2318+G used to find the next or previous occurrences. \nTaking a screenshot without cropping and with retained rounded edges of the window can be done using \u2318+\u21e7+4+space+click, also coping into clipboard with ctrl. \nIncrementing or decrementing the light or sound in quarter steps is done with \u21e7+\u2325 and the respective light or sound button. \nTo cycle through applications and windows, use \u2318+\u21e5 and \u2318+`, respectively, and \u2318+\u21e7+4 will screenshot a selected area. \nStandard commands for copy, paste, and cut are \u2318+C, \u2318+V, and \u2318+X. \nForce quitting applications is possible with Command \u2318 + Option \u2325 + Esc \u238b, and holding down Command \u2318 + Option \u2325 + Shift \u21e7 + Esc \u238b for 5 seconds will kill the foremost application. \nIn a text area, Command \u2318 + \u2192 moves to the end of the line and Command \u2318 + \u2190 moves to the beginning, with Option \u2325 + \u2192 and \u2325 + \u2190 used to jump words. Sound volume can be changed silently using shift+F12 or F11. \nExpose functions to show all windows in the current space, the desktop, or the current application windows are accessed with fn+F3, fn+\u2318+F3, and fn+ctrl+F3 respectively. \nPasting plain text, which strips out formatting, is accomplished with \u2318+alt+shift+V."},{"question":"what is the advantage of little endian format?","response":"The Japanese date convention, which follows the \"big endian\" sequence as yyyy\/mm\/dd, is particularly useful for sorting algorithms since they can compare dates using the standard string comparison where the first character holds the most significance."},{"question":"what does the .d stand for in directory names?","response":"The .d suffix at the end of a directory is to mark it as a directory, and is used to avoid name clashing between the configuration file and the directory containing it. \n\nDirectories that end in .d (note these are usually only ever in \/etc), take configuration parts."},{"question":"can iphone x case be used for xs?","response":"iPhone X and iPhone XS are near identical in dimensions and cases for iPhone X should fit iPhone XS, but the camera lens will not align properly."},{"question":"whats the difference between a normal user and a system user?","response":"The distinction between normal and system accounts is not technical but an organizational decision, important for admins and auditors. \nSystem users are created with no aging information in \/etc\/shadow and they occupy a different UID range according to \/etc\/login.defs."},{"question":"override itunes media keys (play, pause, etc) for spotify?","response":"NoMitsu has created a one-click installer that patches the remote control daemon, the app responsible for managing the media keys. \nThe app BeardedSpice is does an excellent job and offers a convenient way to ensure your media keys prioritize Spotify, while also working with numerous other media players."},{"question":"how can i wrap text at a certain column size?","response":"A lesser-known tool that can accommodate your requirements is wrap from GNU Talkfilters: wrap -w 80 < textfile."},{"question":"where are ppt templates stored on mac?","response":"For Word and PowerPoint 2011 in English, templates are stored in the Home folder at the path ~\/Library\/Application Support\/Microsoft\/Office\/User Templates\/My Templates. \nIn the case of Office 2016, the storage location for templates has changed to ~\/Library\/Group Containers\/UBF8T346G9.Office\/User Content\/Templates. \nIt's important to note that following an Office upgrade, the old path at ~\/Library\/Application Support\/Microsoft\/Office\/User Templates\/My Templates may still exist, but PowerPoint will not use that location for templates."},{"question":"how can rfid\/nfc tags not be cloned when they are passive technology?","response":"Some suggest that smart cards are secure because the key cannot be extracted, and so they cannot be cloned, or, at least, are very, very difficult to clone when the system is properly implemented. \n\nHowever, others point out that RFID tags are not passive, they just do not have a power source because they are transponders and are powered by the very RF wave sent to query them, and so can be cloned by having their data banks copied into new tags if they do not make use of password-protection or over-the-air (OTA) encryption, which are supported by Class 1, Gen 2 tags."},{"question":"how to copy path of a file in mac os?","response":"To copy any item's path name directly to the clipboard from any location within the file system on a Mac, you simply navigate to the desired file or folder, right-click on it, and while in that menu, press the OPTION key to change the copy option to \"Copy (item name) as Pathname\". \nBy selecting this, the complete path of the file or folder will be copied to the clipboard, ready to be pasted wherever needed. \nThis can alternatively be achieved using the keyboard shortcut Command+Option+C."},{"question":"is there a way to refresh a finder file listing?","response":"There are a number of approaches, on is to use a simple AppleScript to instruct the Finder to tell the front window to update every item, which can then be saved and added to the Finder toolbar for quick access. \nThe easiest way to have the Finder refresh its listing is to enter a subfolder and click the back arrow to come back to the original folder. \nAnother approach is to change the view in Finder which seems to refresh the content of the Finder window; meaning, for example, going from Icon view to List. \nUsers can also hold the Option key and right-click on the Finder icon in the Dock to select 'Relaunch' for a full restart of the Finder. \nNavigating into a subfolder and then clicking the back arrow to return or using the back arrow to go to the previous folder and then the forward arrow can also prompt a refresh. \nFor keyboard shortcuts, Command- or Command- followed by Command-[Down] can be used to quickly change folders, which in turn updates the folder view."},{"question":"how can i make auto-hide\/show for the dock faster?","response":"To accelerate the appearance of the Dock on Mac, if located on the right side of your screen, one can assign the upper and lower right Hot Corners to trigger Launchpad. \nThis causes the Dock to appear instantly via the Hot Corners, without the slight delay experienced with Dock Hiding, thus providing faster access. \nAlternatively, replacing the Dock and Launchpad with an application launcher, such as LaunchBar or Alfred, offers a rapid way to launch applications and manage files, with the added benefit of being keyboard-driven instead of mouse. \nFinally, installing the application Secrets interface to adjust system settings, including the Dock animation, without needing to use Terminal."},{"question":"do group imessages say delivered?","response":"No, there are no delivery or read receipts for group messages."},{"question":"is there a google calendar mac desktop app?","response":"Yes, the built-in Calendar app allows you to add Google Calendar accounts directly. \nAlternatively, you can use third-party apps like Sunrise, which offers a user-friendly interface and allows you to integrate your Google Account. \nAnother option is Fluid, a tool that wraps any URL into a native shell, providing a standalone application for Google Calendar. \nAdditionally, you can add Google Calendar as a Chrome App with a standalone window."},{"question":"what is the difference between data plane and control plane?","response":"The data plane, also known as the forwarding plane, refers to all the functions and processes that forward packets\/frames from one interface to another. \nThe control plane refers to all the functions and processes that determine which path to use. \nEssentially, the control plane makes decisions about where traffic is sent."},{"question":"where does this concept of favor composition over inheritance come from?","response":"The concept of composition over inheritance was initially introduced in the \"GoF design patterns book\" that came out in 1994."},{"question":"how long does it take to set up new iphone from icloud backup?","response":"It can take 1-4 hours per Gb to restore from an iCloud backup."},{"question":"how do you force a 5 ghz wifi connection?","response":"In OS X 10.9 Mavericks it's not possible to force a frequency band without using additional tools or methods. \niStumbler can be used to give you an option to manually select the 5GHz signal. \nAlternatively, you can set up a separate network name for this band and ensure that it's the closest signal to your access point. \nAnother approach to differentiate connections is to use the same SSID for both frequencies but assign different passwords for the 5GHz and 2.4GHz networks. \nTo make devices prefer the 5GHz signal automatically, increase its transmission power while reducing the 2.4GHz signal strength, though this could impact devices that only support 2.4GHz. \nOn OS X Mavericks, setting the channel number for the 5GHz band through the airport command can help \"set\" the preferred WiFi band. \nAdditionally, using Airtool to force your wireless interface to work on a specific 5GHz channel is another solution, effective on OS X 10.10. \nIn macOS Sierra 10.12.3, if networks share the same SSID, the channel for the 5GHz network can be set directly on the airport card. \nFinally, one complicated option for controlling the network on 10.11.x is to first disable roaming and then physically penalize the 2.4 GHz signal with a mesh, for example made of chicken wire, to encourage connection to the 5 GHz band."},{"question":"disable screenshot security","response":"In cases where screenshots are forbidden by secure flags within certain apps, an alternative to capture the screen is to project your phone onto the PC screen and take a screenshot from there. \nOptions for bypassing this include the use of Smali Patcher program's custom module for Magisk or the DisableFlagSecure module for Xposed on Android version 5.0 to 8.1 . \nAnother method is to mirror your Android phone\u2019s display to a computer screen using Scrcpy or Vysor app, allowing you to take screenshots, although some apps may detect and restrict functions if they notice development settings like ADB debugging are enabled. \nHowever, bear in mind that some banks require you to log in and disable security measures before you can perform certain actions with their mobile applications."},{"question":"why squash git commits for pull requests?","response":"Primarily, it allows the person pulling the PR to focus on the net effect of the changes, such as the addition of a new feature. \nThis consolidation contributes to a clear and concise git history and bugs fixed, enhancing overall readability. \nAdditionally, squashing makes backporting easier. \nIt aligns with the perspective of best practices, aiming for a single commit per issue for effective issue management. \nParticularly in public projects, squashing is crucial to eliminate security leaks that might be present in individual commits."},{"question":"what does it mean to burn a zero-day?","response":"Using a zero-day exploit is like tapping into a valuable resource that can only be used once and is usually reserved for high-priority targets. \nWhen a 0-day exploit is used recklessly or frequently, it may get discovered and patched, resulting in it being burned."},{"question":"how to show all running launchctl daemons\/agents?","response":"To retrieve a list of all jobs loaded into launchctl, you need to use the command sudo launchctl list."},{"question":"how can i diagnose a bridging (ethernet) loop?","response":"Eyeball it: if the switches have port indicators, you should be able to see which ports are the most active. \n\nSNMP monitoring: if you've got SNMP (or similar) usage stats, look at the interface statistics for the busiest switch and the busiest ports and check if any has hit 100% usage. \n\nAlso, check the CPU usage (usually \"show process cpu history\"), as looped interfaces will usually hit your CPU pretty hard, unless you're running a high end switch."},{"question":"how do quick & dirty programmers know they got it right?","response":"To confirm that software has been correctly developed, thorough testing by a good quality assurance (QA) team is critical, ensuring that it passes all tests set out to assess its functionality. \nProgrammers who adopt a \"quick and dirty\" approach often don't clean up their work later, leaving a legacy of code that may fail in unforeseen ways, placing both the company and its clients at risk. \nMoreover, many programmers believe their quick solutions are correct without truly knowing since distinguishing the accuracy of their work without testing can be challenging. \nTesting is key in establishing whether the code written under rapid and potentially sloppy conditions is indeed reliable."},{"question":"how to generate a random string?","response":"To generate a random password, you might consider using pwgen, or gpw could be your tool of choice for random user names. \nIf you prefer a method involving \/dev\/urandom and tr, which omits unwanted characters, that's another valid approach. \nAlternatively, you could create passwords with `tr -dc A-Za-z0-9 < \/dev\/urandom | dd bs=100 count=1 2>\/dev\/null`. \nFor a more straightforward option, you could use the built-in $RANDOM variable in bash, translating numbers into letters: `$ echo $RANDOM | tr '[0-9]' '[a-z]' bfeci $ echo $RANDOM | tr '[0-9]' '[a-z]' cijjj `. \nSome use `cat \/dev\/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1` to produce a 10-character string. \nFor a completely random password, md5pass can be employed, allowing you to use normal text with a salt for added security. \nShuffling a file of characters or words with shuf and then removing line terminators with tr is another recommended option: `shuf --random-source=\/dev\/urandom --repeat --head-count=20 file_with_characters | tr --delete '\\n' shuf --random-source=\/dev\/urandom --repeat --head-count=7 file_with_words | tr '\\n' ' ' `. \nIf you're looking for an easy solution, openssl's rand command provides a quick way to generate a random base64 or hex string: `openssl rand -base64 12 or openssl rand -hex 12`. \nShould you require a random string of a specific length, you can use `shuf -zer -n20 {A..Z} {a..z} {0..9}`. \nAPG can help to generate passwords from size 5 to 10 in subsets Special, Numeric, Capital and Lower: `apg -MSNCL -m 5 -x 10`. \nTo include all ASCII printable characters in your password: `< \/dev\/urandom tr -cd \"[:print:]\" | head -c 32; echo`. \nFor passwords that avoid easily confused characters:`base64 < \/dev\/urandom | tr -d 'O0Il1+\/' | head -c 44; printf '\\n' `. \nAdjusting password length with base64, tr, and cut commands allows for customizable password generation: `$ cat \/dev\/urandom | base64 | head -n 1 |tr -dc '[:alnum:]' |cut -c -13 b0R55751vWW9V `. \nYou can create highly secure passwords using\/dev\/urandom combined with tr for a wide range of characters or folding and heading for multiple passwords: `cat \/dev\/urandom | tr -cd [:graph:]|head -c 16`. \nEmbracing Unix philosophy, you could also use base64 encoding with \/dev\/urandom and dd to control output size: . \nLastly, the xxd command offers length specification through its parameters, which is convenient across different operating systems."},{"question":"mono is frequently used to say yes, .net is cross-platform. how valid is that claim?","response":"The statement \".NET is cross platform\" is essentially ambiguous. \nMicrosoft's .NET Framework product does not support cross-platform functionality and is restricted to Windows."},{"question":"how to change your date of birth on icloud?","response":"Apple support say there is no way to do this; you have to create a new account and will lose everything associated with the existing IDs."},{"question":"what is the difference between zero and null?","response":"Zero is a numeric value, allowing mathematical operations and calculations where NULL is not. \nZero represents the absence of a measurable quantity. \nIn contrast, null is not a value but a lack thereof, symbolizing non-existence or absence. \nDescribed as a unicorn, null doesn't even exist. \nWhen dealing with measurements, a newValue of null signifies nothing measured, resulting in a percent change equivalent to zero."},{"question":"what is this folder \/run\/user\/1000?","response":"The directory \/run contains system information data pertaining to the state of the system since its last boot, and files within this directory must be cleared at the beginning of the boot process. \n\/run\/user\/$uid is a special directory created for each user that holds files necessary for their currently running processes, ensuring security and organization by being exclusively accessible to the user it represents."},{"question":"why are executables called binaries?","response":"Compiled executables are binary, meaning that unlike plain text files, they require specific programs to be opened and understood, appearing jumbled in a standard text editor. \nThese executable files are generally referred to as binaries instead of detailing their internal structures because from a user's perspective, they function similarly regardless of their compiled format."},{"question":"why does find -mtime +1 only return files older than 2 days?","response":"When a file's age is calculated, it is rounded down to the nearest whole day, and \"any fractional part if ignored\", or put another way, fractional 24-hour periods are not taken into account\u2014it's a simple truncation to the nearest whole number of days. \nThis behavior is dictated by the POSIX\/SuS standard, which prescribes that the `find` command should work in this manner. \nThe argument to -mtime is interpreted as the number of whole days in the age of the file: -mtime +n means strictly greater than, -mtime -n means strictly less than. \nLastly, using -mtime N is a way to select files based on a range N \u2264 A < N+1 days old, where \"N\" represents the number of whole days that have passed."},{"question":"what does synchronize all mean in windows mail?","response":"While Get Mail will only fetch new mail in the Inbox, synchronize will look for changes in the IMAP configuration, look for changes in the folder structure of your account, and probably a lot more. \n\nSynchronize is useful to get two (or more) machines back in sync: if you make changes on one Mac, you can use Synchronize to make a second Mac aware of the changes. \n\nSynchronize basically double counts and double checks each and every message to make sure things are 100% correct, and should normally do nothing, but it will fill in any gaps as needed."},{"question":"combined `mkdir` and `cd`?","response":"The commands `eval {mkdir,cd}\\ FOLDER\\;` and `mkdir foo && cd \"$_\"` provide methods for script or command line usage to create and immediately navigate into a directory. \nThe use of `$_`, a special parameter, after a command references the last argument from the previous command, aiding in streamlining the navigation process. \nDouble quotes are necessary around `$_` in certain shells, such as bash, to ensure the correct handling of directory names that contain spaces."},{"question":"how to code faster (without sacrificing quality)","response":"Employ tools that offer productivity improvements, such as ReSharper, and upgrade hardware by adding more RAM or using a solid-state drive. \nMaking use of code generators can also speed up the coding process, particularly when dealing with repetitive tasks, and gaining more practical experience can lead to faster and more efficient coding over time. \nStaying updated with technology and studying design are additional components that can contribute toward improving coding skills. \nIt's advisable to use cognitive skills more effectively and minimize the amount of testing where possible. \nThe refinement of decision-making abilities comes from gaining experience and engaging in purposeful practice, with the aid of continuous feedback from various sources like side projects, open-source contributions, and programming exercises."},{"question":"how can i install the command line tools completely from the command line?","response":"To install the Command Line Tools for Xcode on an Apple system, users can download the Command Line Tools package directly from the Apple Developer site. \nThere are methods to fully automate the installation of Xcode Command Line Tools, which includes downloading the XCode 4.x CLTools packages from their official download site via direct links. \nThe setup for the command line tools can also be made version-independent, by using softwareupdate and an os variable that adapts to different macOS versions. \nMoreover, installing Homebrew on the system will also automatically install the command line tools."},{"question":"why not use which? what to use then?","response":"The 'which' command does not consider the shell's path hash table, leading to results that might not accurately reflect the executed command. \nFurthermore, it is acknowledged that 'which' is not the appropriate tool for investigating the actual command behind your aliases or functions, and commands like type or command are more suitable for such purposes."},{"question":"how can i prove to an airline that the ipad mini they found is the one i left on the plane, without giving them the passcode?","response":"Firstly, if your iPad has a custom lock screen message, set it to lost mode with your contact information displayed. \nHaving a contact number actually embedded in the picture on your lockscreen makes getting in touch very simple. \nAdditionally, provide them with your iPad's serial number, which is visible on the back of the device. \nDescribe any unique features on the lock screen, especially if you have a custom photo or image. \nIf you've set up a Medical ID or Apple Pay on the device, these could also serve as additional proof of ownership. \nLastly, if you've given your iPad a custom device name, ask the airline to connect it to a computer; it should display the device name in iTunes."},{"question":"why use swap when there is more than enough free space in ram?","response":"In most cases, it is considered normal for Linux systems to employ swap space, moving seldom-used memory pages there to optimize performance. \nThe kernel swaps these pages before RAM is filled to improve system efficiency and keep often-accessed files readily available. \nThis process is beneficial, as it allows the freeing up of RAM for more immediate needs, and can speed up operations. \nBy offloading less essential program pages, paged data, and unused memory to swap space, more RAM is made available for cache and actively used programs, thereby speeding up AM memory allocation. \nAdditionally, swap supports the hibernation feature, which is particularly advantageous for laptops and energy conservation. \nMoreover, swapping is an integral part of ensuring smooth kernel operation in a multi-process environment. \nSwapping out memory can be a time-consuming process, however, particularly because writing to disk is much slower than accessing solid-state RAM. \nHowever, Linux systems have evolved to better handle memory allocation and reduce fragmentation, notably from kernel version 2.6 and onwards, thus enhancing performance and minimizing the occurrence of memory-related issues."},{"question":"why is 4096 the max value for vlans","response":"Only 12 bits are used for VLANs in 802.1q, so you can only use VLANs from 0-4095 (=4096* different VLANs)."},{"question":"how can i calculate the size of a directory?","response":"The command: \"du -s directory_name\" allows you to check the total size of a specified directory without listing the size of each subdirectory, while \"du -sh directory_name\" provides the same output in a human-readable format. \nAlternatively, you can use the \"ls -ldh\" command which offers a long listing of directory information (`ls -ldh: ls -ldh \/etc drwxr-xr-x 145 root root 12K 2012-06-02 11:44 \/etc -l is `) and presents size in a human-readable format. \nFor a grand total of a directory size, use command: \"du -csh\". \nFor scripts that calculate size, use the command \"file-size.sh\" from the awk Velour library to sum up the sizes of files. \nLastly, the command: \"du -hd1\" will list the sizes of all directories at the first level of the given directory in a human-readable format."},{"question":"recursion or while loops","response":"Some problems are very amenable to recursive solutions, e.g. quicksort, while some languages don't really support recursion, e.g. early FORTRANs. \nRecursion has more expressive power than iterative looping constructs, as it allows for writing loops without the need for mutable data. \nIt is acknowledged that recursion is often less obvious and therefore more challenging to maintain compared to iteration. \nRecursion is not intrinsically better or worse than loops - each has advantages and disadvantages, and those even depend on the programming language and implementation. \nIn instances where the recursion depth exceeds the programming language\u2019s default limit, as encountered in Python, loop constructs might be preferred if the stack size is not enough. \nRecursion is about repeating call to function, loop is about repeating jump to place in memory."},{"question":"how to run a specific program as root without a password prompt?","response":"The correct syntax is: `myusername ALL=(ALL) NOPASSWD: \/path\/to\/executable` or run as a sudo `sudo \/path\/to\/my\/script` and don't use sudo for the command inside your script that actually needs root. \nIf there are multiple entries in the sudoers file, sudo uses the last one, so you need the exception last, or the NOPASSWD rule after that one in order for it to take precedence 'myusername ALL = (ALL) ALL myusername ALL = (root) NOPASSWD: \/path\/to\/my\/program`. \nIt's also important to run the program directly with its full path if there's no alias interfering, like \"\/usr\/bin\/sudo \/path\/to\/my\/program\". \nFor configurations on a system like Manjaro, you might have to alter a file like \"\/etc\/sudoers.d\/10-installer,\" which can only be seen under root privileges, to \"Ignore authentication for a group\" or \"for a user\" or \"a executable for a specific user\" with appropriate modifications. \nFinally, a secure method to run scripts with root permission is to uncomment the line \"#includedir \/etc\/sudoers.d\" in the \/etc\/sudoers file and add a line like `ALL ALL = NOPASSWD: \/path\/of\/the\/script\/which\/you\/want\/to\/run\/as\/root` in a file within the \/etc\/sudoers.d\/ directory."},{"question":"easily unpack deb, edit postinst, and repack deb","response":"The main tool to work with Debian packages is `dpkg-deb`. \nTo unpack the package, create a new directory, switch to it, and then use the command to extract its contents. \nto rebuild the package, use command `dpkg-deb -b`. \nIt's important to run these operations with root permissions or use `fakeroot` files' permissions and ownership will be corrupted at the extraction stage. \nAn alternative method is to use `fpm` along with the `--after-install` option to replace the postinst script of a Debian package. \nLastly, `7-Zip` can be utilized for a simple extraction of files from a `.deb` file since it supports unpacking \"ar\" files."},{"question":"how to remove all empty directories in a subtree?","response":"Appending `-p` to your `rmdir` command can remove directories with content in a single action. \nAnother technique is executing multiple rounds of directory removal, although its speed efficiency depends on various factors, including disk cache retention. \nFor a simple and compliant solution to directory removal, the command `find .-depth -type d -exec rmdir {} +` is advised."},{"question":"how to download portion of video with youtube-dl command?","response":"In order to extract video content, combine youtube-dl with ffmpeg because this feature on youtube-dl is not implemented yet and it will not work alone. \nYou can also use `youtube-skip-dash-manifest -g \"URL\"` with special flags to acquire separate video and audio streams for further processing with ffmpeg. \nAdditionally as tested with version 2017.08.27.1, youtube-dl also allows passing arguments: 'youtube-dl -x --postprocessor-args \"-ss 00:13:00.00 -t 00:04:00.00\" https:\/\/youtu.be\/...' directly to the postprocessor to refine the download process."},{"question":"what does the @ (at) symbol mean on osx ls?","response":"On OSX, the presence of a @ symbol signifies that the file or directory has extended attributes."},{"question":"how can i make rm move files to the trash can?","response":"To make the \"rm\" command move files to the trash can, you can utilize a command line tool like \"rmtrash,\" which typically moves the file(s) to ~\/.Trash, ensuring each file has a unique name."},{"question":"whats the difference between real, virtual, shared, and private memory?","response":"Wired memory in Mac OS refers to essential system (or kernel) code that must always remain in RAM. \nShared memory is allocated among multiple processes, potentially leading to confusion regarding actual memory usage. \nThe term \"Real\" memory describes the genuine memory consumption as calculated by the task_info() function. \nAdditionally, Real memory is connected to the physical memory present in the computer. \nConversely, Virtual memory represents a conceptual allocation of memory that relies on storage devices rather than actual RAM. \nIt's also mentioned that Shared memory is a part of physical memory that various processes can use. \nApple publishes information that can help users understand their system's memory use, such as the amount of installed RAM and the concept of Virtual memory, which is about the mapping requests made by applications."},{"question":"is there a one-liner that allows me to create a directory and move into it at the same time?","response":"The command `mkdir longtitleproject && cd $_` allows the creation of a directory and immediate navigation into it using the `$_` variable in bash, which refers to the last argument of the previously executed command."},{"question":"how do you dive into large code bases?","response":"Upon engaging in a new codebase, a beneficial approach includes the following steps: initiating a vocabulary sheet, learning the application, perusing available documentation, making assumptions, locating third-party libraries, and finally, analyzing the code. \nPair programming is an exceptionally effective technique, particularly within team environments when introducing new developers to substantial existing codebases."},{"question":"which application to preview .md files?","response":"There are a wide range of options for those interested in previewing their Markdown work: you can install a markdown QuickLook plugin such as QL Markdown for better Finder-based previews. \nMarked 2 is a highly recommended tool for its live previewing feature that updates as you save; the Markdown Preview package from package manager provides multiple styles for viewing Markdown. \nMacDown is an open-source editor; Visual Studio Code is a pleasant IDE for general use, which also has good rendering capabilities for Markdown. \nMarkdown Viewer for Google Chrome is a useful browser-based solution that formats Markdown files in a similar way to GitHub, and ; Markoff is a CommonMark file viewer available via the App Store and GitHub; lastly, Typora is suggested because it's user friendly and open source."},{"question":"what is oversubscription in networking?","response":"Oversubscription generally refers to potentially requiring more resources from a device, link, or component than are actually available. \nIt is the concept of providing more downstream capacity than your infrastructure can actually provide."},{"question":"password rules: should i disallow leetspeak dictionary passwords like xkcds tr0ub4dor&3","response":"Consider using 2-factor authentication because no password complexity scheme will protect you from user actions. \n\nNo, you should not disallow \"leetspeak\" dictionary words per se, but treat them like regular dictionary words, noting that Tr0ub4dor&3 is equivalent to six random printable characters of complexity, and a weak password, so if six random characters is too weak, then you should disallow \"leetspeak\" dictionary passwords."},{"question":"what does the cloud symbol mean next to an app?","response":"If you have enabled offloaded apps on your iOS device and notice a cloud icon next to an app, it indicates that the app was removed to save space, but its data was retained. \nYou can simply tap the app to trigger a re-download if you wish to restore it. \nThis feature's settings can be altered by navigating to the iTunes & App Store section in your Settings app, where you can toggle the option for offloading unused apps."},{"question":"how can i restart the ssh daemon on ubuntu?","response":"You can restart the SSH service in Ubuntu using the \"service ssh restart\" command. \nTo ensure you have the proper permissions to restart it, use the commands \"sudo stop ssh\" followed by \"sudo start ssh,\" which makes use of upstart."},{"question":"diffie-hellman key exchange in plain english","response":"Diffie-Hellman is a mathematical algorithm used for establishing a shared secret between two parties that can be used for secure communications. \nThis shared secret remains secure even when the exchange is observed, as the communication does not reveal the secret itself. \nOne of the simplest analogies to explain the concept is the double-locked box analogy, which illustrates how a secret can be securely exchanged. \nAnother analogy is the paint analogy found in the Diffie\u2013Hellman key exchange Wikipedia entry, which provides a visual representation of the process. \nThe key exchange problem centers around the need to securely transfer keys over an insecure connection, which is addressed by Diffie-Hellman. \nThere are two simple ways to solve the problem: meet up in person to exchange the key, or send the key electronically using a secure method. \nAdditionally, securing data on the internet requires the establishment of secure connections to maintain confidentiality and integrity, which can be obtained using the Diffie-Hellman algorithm. \nComputerphile offers comprehensive videos on Diffie-Hellman, which explain the key exchange in detail."},{"question":"how to unzip a multipart (spanned) zip on linux?","response":"To combine split archives into a normal archive, use the split command, then unpack it with unzip: converting a split archive into a single-file archive involves altering the split size to zero, then to extract the newly created single archive, simply use the unzip command. \nFor a more straightforward extraction, use \"7z x archive.zip.001,\" which will automatically locate the rest of the files."},{"question":"return only the portion of a line after a matching pattern","response":"The primary tool for text manipulation and pattern replacement is sed, which operates with commands like: `sed -n -e 's\/^.*stalled: \/\/p'`, which are designed to search and transform strings within text files. \nThe following sed command, utilizing groups and backreferences, swaps the sections before and after the specified match string: `sed -n -e 's\/^\\(.*\\)\\(stalled: \\)\\(.*\\)$\/\\3\\2\\1\/p'`. \nAnother tool, grep, like: \"grep -o 'stalled.*', provides the ability to return only the matching parts of text lines through the use of specific flags like -o. \nAdditionally, the cut command: \"grep -o 'stalled.*' | cut -f2- -d\" can be employed for extracting certain parts of a text line by using delimiters to specify the fields you want to keep. \nAlternatively, awk command: \"awk -F\"stalled\" '\/stalled\/{print $2}'\" allows for field-based text processing, utilizing patterns to search and print specified columns of text."},{"question":"what is the difference between the bash operators [[ vs [ vs ( vs ((?","response":"`[ \/ test` is a standard utility for conditional execution in POSIX shells, and all POSIX shells have it built in, although POSIX standards do not require it. \nThe `[[ ... ]]` construct also determines an exit code for conditional execution, and it features extended capabilities such as the ability to test if a string matches a wildcard pattern. \nIt is noted that the `[[ ... ]]` is a relatively newer special shell construct, differentiating itself by not word-splitting variables. \nRunning a set of commands in parentheses `( ... )` creates a subshell, which provides a temporary environment that does not affect the overall shell's state. \nParentheses indicate a subshell where commands execute in a separate subprocess, which does not have lasting effects outside the subshell. \nAn arithmetic instruction sits within double parentheses `((...))`, allowing computations on integers. \nMeanwhile, single brackets `[ ... ]` are used for conditional expressions like checking if a variable is empty or a file exists. \n`[` is POSIX compliant while `[[` is a Bash extension influenced by Korn shell, with the latter parsed differently and providing certain advantages regarding parsing and word splitting. \nThe `]` test evaluates conditional expressions, while parentheses `( )` create a subshell group where commands inside execute in a separate process, and double parentheses `(( ))` are utilized for arithmetic expressions within the shell."},{"question":"should i keep my github forked repositories around forever?","response":"For managing your GitHub forked repositories, consider archiving them by tarring or gzipping and placing them in an archive directory. \nIf your pull request has been accepted and you haven't made any other personal changes, it's advisable to delete it. \nGitHub recommends tidying up and deleting forked repositories, especially after they've been merged. \nHowever, whether you keep or delete the fork depends on your future contributions and whether you want to maintain a clean portfolio of projects. \nAn issue related to the \"Unknown Repository\" has been resolved, so you should be okay to delete repositories once all branches have been merged."},{"question":"a standard tool to convert a byte-count into human kib mib etc; like du, ls1","response":"No, there is no such standard tool, but you can use numfmt."},{"question":"os x terminal must have utilities","response":"Some recommended utilities are: Solarized (free) color scheme for Terminal, Ack, Visor, DTerm, iTerm2, lolcat, oh-my-zsh, Homebrew, Janus + macvim (Janus is a basic distribution of vim plugins), MacPorts, Lunchy, ProfontX, Inconsolata-dz, MTR, TotalTerminal, Autojump, Bwana, Go2Shell, bash-it, Shell functions, Boxen, the Silver Searcher, and Bropages."},{"question":"how can i see my home folder in the finder?","response":"To navigate to your home folder on a Mac, you can use the keyboard shortcut Shift+Command+H, while Command+UpArrow will take you up one folder level. \nAdditionally, the tilde symbol (~) combined with the Go to Folder shortcut serves to access the home folder, similar to other UNIX systems. \nFor a comprehensive guide, consult the document \"Mac OS X keyboard shortcuts (HT1343),\" which lists numerous shortcuts for OS X Lion. \nYou can also set your Finder preferences to open your home folder by default using the Command + , shortcut. \nYour home folder is typically visible in the Finder sidebar, but if it's not, you can enable it in the Finder Preferences under the Sidebar tab or use the shortcuts View \u2192 Show Sidebar or \u2325\u2318S to display the sidebar. \nIf you prefer using the Terminal app, simply run the command: open ~ to open your home folder."},{"question":"are fiber patch cables crossed?","response":"Fiber patch cables are designed to be crossed to ensure proper connectivity."},{"question":"i deleted \/bin\/rm. how do i recover it?","response":"If you need to restore the `rm` binary on a Raspberry Pi, it might be practical to obtain the correct `rm` binary from another machine and copy it to the Pi, assuming you have scp or a similar tool installed to transfer files."},{"question":"reserved space for root on a filesystem - why?","response":"By reserving 5% of disk space, the system prevents non-root programs from completely filling up the disk, which ensures continued functionality for higher privilege processes and potential system rescue efforts. \nAdditionally, maintaining this reserved space mitigates the risks of filesystem fragmentation and performance issues, particularly when the filesystem's capacity exceeds 95%."},{"question":"why oop is hard to learn?","response":"For individuals new to the concept of object-oriented programming, or accustomed to procedural programming, transitioning to an object-oriented paradigm can be time-consuming and requires a lot of practice. \nNewcomers to programming might find OOP challenging because of the unfamiliar concepts involved, and poor teaching or teaching OOP from the beginning without a solid foundation in basic data structures and binding\/higher order functions can hinder comprehension. \nSome believe that many programmers have difficulty with upfront design and planning to begin with. \nAdditionally, the tools used for OOP may not seamlessly facilitate the learning process. \nFurthermore, tasks such as telling a window to open itself may seem unusual in an OOP context. \nThe disparity between the basic explanation of OOP and its real-world applications further contributes to the perceived difficulty. \nAlso, OOP requires the ability to think abstractly and is not a paradigm that's actually natural for modeling anything because we do not think in terms of properties and methods of real life objects. \nLastly, it can also be a question of motivation: it's harder to learn something when you don't see why, and also when you can't look at what you did and figure whether you did it right or not."},{"question":"where are sony xperia backups stored?","response":"On the Sony Xperia Z5 Compact, backups are stored in: SD-Card\/Android\/data\/SonyBnR\/Backup. \nOn Sony Xperia Z1 Compact, with no SD card or where the storage destination is set as \"Internal Storage\", the backups are located in \/sdcard\/.semc-fullbackup, or \/storage\/sdcard0\/.semc-fullbackup, or \/storage\/emulated\/legacy\/.semc-fullbackup."},{"question":"how can i explain sql injection without technical jargon?","response":"SQL injection is an attack method where a nefarious individual attempts to extract unauthorized information from a website. \nThis vulnerability arises due to a weakness in how certain websites process user inputs, which can allow an attacker to gain access to the database storing all the user information. \nA practical demonstration of the attack can effectively convey its implications, showing how a seemingly benign input can lead to unexpected and potentially harmful outcomes. \nIt operates by manipulating a system's functionality, where the system mistakenly executes commands entered by the attacker as if they were legitimate. \nA query might have parameters (data) inserted into it that end up being interpreted as instructions, causing it to malfunction. \nIt can be likened to a Mad Lib, where unexpected phrases drastically alter the story if the provided sentences are not closely regulated. \nThe prevention of SQL injection necessitates code that smartly differentiates between commands and data inputs, ensuring that users cannot alter the intended actions. \nUsing cartoon characters to frame an educational story about SQL injection might be an engaging method of explanation to a lay person. \nFinally, the issue can be humorously conveyed using the example of Bart Simpson's prank calls, demonstrating how careless repetition of input can lead to unintended consequences."},{"question":"how to get a notification when my commands are done","response":"You can utilize Growl and the growlnotify binary found in the extras of the .dmg file, using a command like growlnotify with the appropriate options to display pop-up messages. \nAlternatively, the built-in say command on Mac can be used for voice notifications. \nMac OS X Lion and newer versions have incorporated status indicators within the Terminal app, such as activity indicators, unread text ellipses, and alert bell symbols, along with badge notifications on the Terminal\u2019s Dock icon. \nLion has also added little notification badges when a BEL is thrown. \nThe afplay command is another option, which can play different sound files depending on the exit status of a task and can be executed with the following scripts; ~\/bin\/donebeep: #!\/bin\/bash if [ \"$@\" = 0 ]; then afplay -v 2 \/System\/Library\/Sounds\/Blow.aiff & else afplay -v 2 \/System\/Library\/Sounds\/Sosumi.aiff & fi. \nYou can also use the alias; alias donebeep='(savestatus=$?; ~\/bin\/donebeep $savestatus \"$@\"; exit $savestatus)'. \nMac OS 10.8 and later provide the ability to send messages via the Notification Center using tools like terminal-notifier. \nFor a simpler and more specialized task, tools like brb and ntfy are available for command completion notifications, with ntfy offering additional features like automatic suppression of notifications when the terminal is in focus. \nYou can also use the built-in osascript command to run an Apple Script to set up a visual notification, for example, osascript -e 'display notification \"Command done\" with title \"Your title here\". \nFinally, iTerm2 also offers its own built-in notification feature with Shell Integration."},{"question":"project is nearly done, but procedural spaghetti code. do i rewrite or just keep trying to ship it?","response":"One option is to choose an architecture and gradually migrate the codebase to it. \nAlternatively, you could focus on getting the product to a viable state, known as the Minimum Viable Product (MVP), and then proceed with shipping it. \nRedesign and rewriting are viable strategies, but it's crucial to implement them incrementally on a working system. \nDespite the procedural spaghetti code, shipping the product is still a valid option. \nYou can provide your customers with a usable product and then consider refactoring based on future needs or feature requests. \nIn the end, it's essential to finish the project and ship it."},{"question":"how to move apps to sd card in samsung s duos?","response":"For Android 4.x devices, such as the Duos, you can move apps to the SD card by navigating to Settings\u2192Apps\u2192Manage Apps, then scrolling to the app you want to move, and tapping the \"Move to SDCard\" button. \nHowever, if the button is grayed out, the app in question cannot be moved to the SD card."},{"question":"are private methods with a single reference bad style?","response":"Decomposing long functions into smaller, private ones, though they may only be used once, is not considered bad practice but rather beneficial for readability, testing, and modularity. \nThe concept is highly situational, and while decomposition improves clarity and prevents co-dependence of code, it can also create challenges if not done carefully, considering aspects like side effects, assumptions, and the potential for misuse."},{"question":"how do i know how reusable my methods should be?","response":"According to one opinion, the overwhelming problem of software design is trying to account for an uncertain future. \nA strategy that is indefinitely applicable is good coding practice. \nExperience, domain knowledge, and code reviews are essential tools for improving your software engineering skills. \nDesigning software should focus on design comprehensibility and flexibility to better serve end users, rather than on the potential for code reusability. \nRegarding reusability, \"obvious\" parameters can be put in there, but you shouldn't start trying to predict the future. \nUltimately, code should be as reusable as needed, based on the demands of the project and the judgement of the developer."},{"question":"what is the difference between port channel and etherchannel?","response":"\"EtherChannel\" (or \"Link Aggregation\") is the technology that allows you to combine several links between two devices and use them at the same time as a single interface. \nThe \"Port-channel\" is the just the name of the virtual interface in IOS."},{"question":"how to play youtube audio in background\/minimised?","response":"Playing YouTube audio in the background or while the app is minimized is currently a challenge or impossible, but background audio is coming in a future release of the YouTube app. \nThat said, alternative methods can be employed by opening YouTube in a standard browser instead of the app to prevent the video from pausing or stopping, providing a workaround for continuous playback. \nSome browsers, like Firefox, offer the ability to request the desktop site, allowing background playback, or Firefox for Android (which YouTube has blocked so you need an extension: https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/video-background-play-fix\/). \nAdditionally, using alternative media players such as MX Player or VLC for Android allows background audio playback. \nUtilizing the Xposed framework with a module specifically designed for YouTube background playback is another option for achieving this functionality. \nSome users have found success by using the play\/pause button on headphones while staying on the home screen while playing from a browser. \nInstalling browsers like Brave (ttps:\/\/m.youtube.com use Youtube vanced app https:\/\/youtubevanced.com\/ use YMusic app use NewPipe app) and enabling the media play background option in site settings can offer a solution, along with using alternative apps like YouTube Vanced, YMusic, or NewPipe."},{"question":"why arp is layer 2 protocol?","response":"ARP is a layer 2 protocol, for the reason a broadcast is sent on the layer 2 and ARP does not usually traverse to layer 3. \nMoreover, ARP is specified as an ethertype within an Ethernet-V2 frame and is not typically forwarded by standard IP routers, supporting its classification as a layer 2 protocol."},{"question":"should we avoid object creation in java?","response":"This depends on the specific application. \nThere is no way to avoid object creation in Java. \nIf you are writing a latency-sensitive application and wish to avoid GC pauses, or if you are in constrained memory situations, you may want to minimize the number of active objects created, as each object carries a small overhead (typically 8-16 bytes depending on JVM implementation). \nObject avoidance in general is not condoned, but you should also avoid creating objects unnecessarily, and if you are creating the same object frequently, it is better to share that object. \nCreate as few objects as possible, however, avoiding object creation by maintaining your object pool is a bad idea."},{"question":"what is a bind mount?","response":"A bind mount is an alternative view of a directory tree that replicates it under a different point. \nIt's like a symbolic link at the filesystem level, but instead of just pointing to another location, it creates another access point for the same filesystem. \nThis type of mount is useful for creating specific views of the filesystem namespace, which can be particularly valuable in certain situations like chroot environments."},{"question":"file open dialog is missing sidebar items","response":"Open a Finder window; while in a open file or save as dialog box, you can drag folders onto the sidebar, and they\u2019ll appear under a badly-named \u201cFavorites\u201d section. \nIf you go to Finder -> Preferences -> Sidebar and put a check next to all your Favorites, this should work."},{"question":"how to start tmux with attach if a session exists","response":"A variety of methods are available to ensure tmux sessions are handled effectively; for instance, you can use the script '\/somewhere\/on\/your\/path\/ttmux', or set it up as a shell function: `#!\/bim\/sh #`. \nIt's also possible to create an alias that starts a new tmux session if attaching to an existing one fails, using `tmux attach || tmux new`. \nYou can also simply add a line in your ~\/.tmux.conf file: `# if run as \"tmux attach\"`, which allows tmux to automatically create a new session if one doesn't exist when you attempt to attach. \nIf your version of tmux supports it, using the 'new-session' command with the appropriate flags will let you attach it to an existing session named `-A -s main` or create it if necessary. \nFor versions earlier than 1.8, you can use tmux attach || tmux. \nAdditionally, checks can be incorporated into your .bashrc to prevent double-nesting of sessions, like in `if [ -z \"$TMUX\" ] && [ ${UID} != 0 ] then tmux new-session -A -s main fi`. \nAnother approach involves checking the existence of a session before trying to attach to it using `session=\"main\" #` then discard output #. \nLastly, for a simpler alternative, leveraging the ` $ tmux a || tmux' command can streamline the process."},{"question":"in centos, what is the difference between yum update and yum upgrade?","response":"Yum upgrade will eliminate obsolete packages, while yum update may or may not do this, (some say that it will not). \nThe removal of obsolete packages can be risky, as it may remove packages that you use. \nBecause the upgrade definitely will remove obsolete packages, the update is the safer option."},{"question":"how can i deal with the cargo-cult programming attitude?","response":"You need to find ways to motivate your students, no student that is truly motivated is going to just go for a copy and paste solution. \nThis could be done by challenging them to create the shortest possible solutions to the problem and rewarding the more succinct solutions with an incentive. \nFurthermore, you should instruct with personal involvement, sharing experiences and knowledge, and demand the same depth of engagement from your students. \nYou also need to prove to them that it is both possible and faster to start anew vs. copying and pasting. \nThis could be done by creating new programs before their eyes during class and setting assignments that require creativity, while also adding a factor into the grading of assignments based on conciseness, which could equate to keeping redundant code to a minimum. \nFor example, you should be present them with exercises that build on one another and showcase a different angle to an issue, exposing a previous solution's limitations and prompting a revised approach. \nThis will make them think about, analyze, modify and experiment with each solution, instead of just copy-pasting a ready-made piece of code. \nAs part of this you can have them take the code from previous assignments and turn it into a subroutine. \nYou will also want to teach them about function documentation to help them understand what the subroutine is actually doing. \nWhen it comes to setting assignments, you should definitely avoid recycling assignments or merely giving them similar sounding ones. \nHowever, you can craft some exercises that might look similar, but aren't, in order to show them how harmful a copy-paste attitude can be; at least to the students that fall into the trap. \nAdditionally, embracing collaborative problem-solving through discussion and debate would also help. \nThis would also show them that programming should be about solving the problem at hand and not just finding the quickest fix. \nTo get them thinking, you should ask them ask them detailed questions about snippets of code, before they even start coding. \nAnother way to encourage independent thought, would be to give them assignments where they have to explain the code that someone else wrote, or even refactor it. \nAs part of this they should add comments to the code, line by line if necessary, to explain it in plain English. \nThen, once they have explained the code, they can move on to modifying it. \nIntroducing them to Test-Driven Development (TDD) from the start is another strategy. \nThis will drive them to actually write more code and test it, which will aid in articulating the problem that they're tackling. \nAnother method to help move away from the cargo-cult attitude would be to utilize an obscure programming language as to decrease the likelihood of finding pre-written code, thereby requiring them to authentically engage with the programming process. \nFurthermore, consider using a very high-level language that requires a minimum of boilerplate code. \nYou can also streamline your teaching, by ignoring any concepts that might be counter-productive and focus on the simple idea that computers can only do a very small number of different basic operations. \nMoreover, before even getting on to code, you might want to focus on abstract concepts, thus allowing for a focus on the fundamentals without intimidating students with actual code. \nThis could be a very hands-on activity where you are in charge of guiding them through. \nBy starting with abstractions and progressing towards the concrete, students are compelled to grasp foundational concepts which are resistant to copy-pasting tactics. \nAlso, beginning by doing assignments on paper using a pseudo code while adding structures as you see fit can also help. \nFurthermore, denying Internet access during assignments executed in the classroom ensures reliance on core knowledge rather than online resources. \nAs an introductory exercise, before even writing any code, get your students to submit a printed out algorithm in English adding plenty of comments to it. \nAs part of this they should need to keep translating back and forth between English and a programming language, Java say, this increasing their understanding of code. \nAnother method which could reduce the intimidation of code that can lead students to resort to a copy-paste strategy is to supply them with some simple code scaffolding that they can easily build upon, which is actually quite normal in the real world of programming. \nAlso, providing incomplete code fragments in tutorials might compel learners to thoroughly understand each piece before assembling a functioning program. \nAs part of the learning process, repetition is key and will help them to eventually go from imitation to mastery, even just typing out the code can help get to a place of understanding it. \nFurthermore, dedicating time with problem students to work on elementary constructs and straightforward routines may help them apprehend the essential basics and you also might consider having them learn flow charting. \nTo progress students through the stages of learning, choose diversified problems, and projects that develop over time, encourage peer reviews, and have them write extensive documentation on their code. \nYou want to build their skills to get them to a place where you can encourage them to engage in self-driven projects on topics of personal interest. \nFinally, animation projects might help increase the depth of their understanding, as these require comprehension of code execution."},{"question":"how do i change the google play country?","response":"To update your information in Google Wallet, sign in to your account, navigate to Settings, and modify your \"Home address\" to the new one. \nWhen dealing with regional restrictions on Google Play, it might be necessary to remove pre-existing cards and only use one with a billing address from the desired country. \nConsider uninstalling all Google Play Store updates, as some individuals have reported resolving their country-related issues when the updates are re-applied. \nAdditionally, if you can't change your country due to previously setting up a Merchant account, creating a new Google account while physically in the desired country may bypass this issue. \nGoogle recently introduced a \"Country and profiles\" option in account settings, which helps users switch their Play Store country if they have a valid payment method in the new country."},{"question":"how to force ssh client to use only password auth?","response":"Use the command `ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no example.com`. \nIt's imperative to ensure that password authentication is not prohibited in the client configuration. \nWhen configuring SSH client settings, you can also specify options on a per-host basis in your configuration file located in the .ssh directory. \nIn certain scenarios, like when encountering issues with SSH servers that are not securely maintained, specifying a non-existent identity file, such as `ssh -i \/dev\/null host`, can be an effective workaround. \nFurthermore, verifying that `BatchMode=yes` is not enabled in your `.ssh\/config` is critical, as this setting would prevent the interactive password prompt from appearing."},{"question":"can i use 2 android phones as walkie talkie? (without internet!)","response":"Mesh Wi-Fi networking on Android smartphones has been successfully enabled, as evidenced by a group that conducted tests. \nAdditionally, there is an app called Wi-Fi Walkie Talkie that can be utilized for this purpose, known for its simplicity and the fact that it is open-source and ad-free."},{"question":"on developing deep programming knowledge","response":"One recommendation is to read content from knowledgeable individuals like Eric Lippert and then solve problems firsthand. \nAnother recommendation is to acquire Reflector or any other decompiler start opening up some of the most used .NET libraries to learn how the internals work. \nFurthermore, you can enhance your C# expertise by writing a C# compiler or other tool. \nStudying the language specifications in depth for the ones that want to gain expertise is advised. \nFurther advice is to hold off learning more languages and first concentrate on one language and delve into its complexities before learning another. \nAnother approach is immersing yourself in programming language communities, like comp.lang.c++.moderated, programming in your selected language and examining code written by others. \nActively seeking out questions about language syntax and semantics, even those you're unfamiliar with, is a proactive method to build expertise. \nTrue proficiency in programming requires delving into the compiler and runtime, then start reasoning (and building) software at the next level of abstraction lower in the stack. \nLastly, \"reading the Fine Manual\" and familiarizing yourself with language specifications is essential."},{"question":"how to edit etc\/hosts file?","response":"To edit the etc\/hosts file on a rooted device, you have the option to use ES File Explorer or other file explorers that have root access."},{"question":"should images be stored in a git repository?","response":"One viewpoint expresses that there is no significant downside, especially if the images don't change often and you don't store large quantities of them. \nAdditionally, should you store your images in git: this gets more tricky, but git is very good with text files, but by its very nature isn't very good with binaries. \nDisk space, often cited as a reason against storing images, may not be as critical in an era where storage costs are relatively low. \nOne advantage of storing images in a git repository becomes apparent when managing different software versions that require changes to the images. \nIt provides a structured way to handle image updates, especially when dealing with multiple versions and language-specific variations. \nFor those inclined to include images in git, using git-lfs (Large File Storage) is recommended."},{"question":"is bgp a layer 3 protocol?","response":"BGP uses a layer-4 protocol to communicate with other BGP speakers in order to do what is normally considered a layer-3 function. \nThe reason it's a layer 4 protocol is because BGP is on top of TCP."},{"question":"why isnt linux embraced as the official gnu kernel?","response":"GNU will not adopt something as a project unless the developers agree to certain stipulations, which bind all official GNU projects; there is nothing for Linus Torvalds, kernel.org, et al. to gain from placing themselves under the GNU umbrella. \n\nThere are deep ideological differences between the GNU project and the Linux kernel projects, which gets in the way of a possible unification; the focus of the FSF, the organization behind the GNU Project, is on ideological purity with respect to the idea of free software, while the Linux kernel project has a much more pragmatic stance on software freedom. \n\nWhile it is said that Linux was not at all portable, Linux is becoming more and more a place where large corporates are investing real money and time."},{"question":"app does not appear on iphone?","response":"Search with Spotlight, check for a new Home screen by swiping to the right, and check all your folders, and, if those don't work, try a hard reset."},{"question":"is there a minimal installation of adb?","response":"There's no need to go through the extensive steps of installing the complete SDK; basic ADB commands can be run with minimal installation. \nAn option particularly suited for OS X users is the Quick ADB\/Fastboot installer which includes the binaries and installer needed to execute ADB and Fastboot commands. \nAlternatively, a 15 seconds minimal ADB, fastboot, and drivers installer is available, which simplifies the process by including everything required without the need to search for manufacturer-specific drivers. \nFor Debian users, simplicity is key; they can effortlessly install adb and fastboot, as the system supports direct and up-to-date installations."},{"question":"whats a good windows rdp client for mac?","response":"You can use RDC (Remote Desktop Connection Client for Mac 2) as a free option that works on both Intel-based and PowerPC-based Macs. \nAnother free option is Chicken of the VNC, while a paid alternative is LogMeIn. \nCoRD is a program that requires minimal setup and operates well without the need for modifying configuration files. \nMoreover, since the El Capitan 10.11.4 update, CORD 0.5.7 for iMac no longer crashes, offering a more stable. \nIndeed, CoRD, along with Jump Desktop, might be the best RDP Clients for Mac. \nHowever, they also face stiff competition from the new Microsoft Remote Desktop 10 as the best RDP client for Mac. \nMeanwhile, Thinomenon RDC supports features like audio, printing, scanning, and RemoteApp\/RAIL, making it a top contender for the best RDP client. \nAlternatively, iTAP supports NLA and offers a basic, but functional, user experience especially in full screen mode. \nRoyal TSX is a full-featured connections manager that supports a range of protocols including RDP, VNC, SSH, and Telnet. \nMoreover, it really stands out for its features like SSH\/Telnet connections with X forwarding. \nFinally, Chrome Remote Desktop is a cross-platform solution that allows for remote assistance and access but lacks certain functionalities like rebooting without losing connection."},{"question":"do the parent directorys permissions matter when accessing a subdirectory?","response":"To traverse a directory, it is essential to have execute permission on that directory. \nThe way a file is accessed, whether through a relative or absolute path, can affect the permissions needed. \nAdditionally, execute permission on a directory is required to access files within it, even when using a symbolic link."},{"question":"what is the difference between odexed and deodexed roms?","response":"A .dex file is a compiled bytecode version created for the Android Dalvik VM. \nAn .odex file is a pre-compiled .dex file optimized for a specific platform, speeding up app startup times but compromising portability and theming capabilities. \nA .dex file is akin to the .exe files on Windows, operating within the Dalvik VM language, and the handling of .odex and deodex files pertains to the management of application resources. \nA deodexed ROM only contains the .apk file and results in slower app startup times due to the lack of optimization, offering greater ease of theming. \nOn the other hand, odexed ROMs optimize app retrieval for speed. \nThe solution of zipaligning at boot allows for optimized access to apps without sacrificing themability, albeit with slower boot times."},{"question":"ive rooted my phone. now what? what do i gain from rooting?","response":"With root access, you can remount your \/system\/ directory as read-write, which allows you to remove unwanted carrier-shipped applications, among other things. \nRooting your Android device allows you to overcome manufacturer-imposed limitations, essentially giving you control over your device. \nIt also allows you to uninstall and\/or backup stock or default apps that you don't use or don't want, besides those that violates user's privacy. \nMoreover, rooting permits the moving of files and apps without restrictions, as well as more powerful program running capabilities like enhanced Tasker functionalities and better power management with specific apps."},{"question":"is xkcd password strength true?","response":"While it is argued that the approach may not be universally good advice, especially due to length constraints imposed by some websites on passwords, such as Skype, ING, eBay, Binckbank, and KPN, limiting passwords to 20 characters. \nOthers, however, defend the xkcd advice, emphasizing the importance of using mnemonics that are easy to remember and generating passwords as long as one can remember them. \nNevertheless, skepticism arises as some assert that the xkcd method is no longer considered good advice, with password crackers evolving to counteract this specific technique. \nAcknowledging the complexity of the matter, it is emphasized that the effectiveness of the xkcd method depends on various factors."},{"question":"when was the shellshock (cve-2014-6271\/7169) bug introduced, and what is the patch that fully fixes it?","response":"RedHat was alerted to a vulnerability in all versions of bash from 1.14.0 onwards, on September 14. \nA patch was released by Mr.Ramey on September 26 to fix the CVE-2014-7169 bug."},{"question":"crime - how to beat the beast successor?","response":"The CRIME attack abuses compression mechanisms in security protocols to guess sensitive information such as cookie values. \nIt specifically targets the compression of data in the SSL\/TLS protocols, leading to potential security breaches. \nBuilding on this method, it is possible to construct an attack that can leak arbitrary cookie values successfully."},{"question":"how do i transfer edited photos from my iphone to my computer?","response":"AirDrop or email the photo to yourself, or, if you've enabled iCloud Photo Library, download it from the Photos web app at iCloud.com."},{"question":"specify identity file (id_rsa) with rsync","response":"You can define a specific ssh command using the '-e' option as follows: \"rsync -Pav -e \"ssh -i $HOME\/.ssh\/somekey\". \nSSH user config files allow for setting default configurations per host. \nStarting the ssh-agent can be done effectively with the command: \"eval `ssh-agent -s' ssh-add \/path\/to\/mykey\"."},{"question":"whats the difference between entry level\/jr\/sr developers?","response":"Job titles such as entry-level, junior, and senior in programming rely highly on the specific company's policies and job role expectations. \nFor example, an entry-level programmer is seen as a beginner needing clear guidance and frequent checks on their work, while junior-level needs less explicit instructions, less checking, and a senior is held responsible for major project segments, expected to work independently, often giving little or no instructions. \nOver their career progression, developers transition from being closely supervised to mentoring others and making crucial technical decisions. \nThe classification into these levels can be affected by many factors, including the amount of time spent in the profession, making experience a significant determining factor."},{"question":"are c strings null terminated?","response":"\"C strings\" are universally null-terminated, following the convention established by the C Standard Library. \nThis behavior was codified in C89 and continues to be part of the C language standard."},{"question":"how can i do a change word in vim using the current paste buffer?","response":"You can use registers to do this, and make a keybinding for the process. \n\nYou can use yw to yank your word, such as foo, then move the cursor to the word you wish to replace and use \"_dw to delete it, sending the text to the register 0, the null register, (so it doesn't overwrite the contents of the \" register, where yanked\/cut text goes by default), using \"0p (or, cw then ^R0 (which is repeatable)), and then simply paste with p. \n\nYou could write a plugin to simplify this process to achieve maximum speed; one such available is called: ReplaceWithRegister. \n\nYou usually replace strings with :%s\/...\/...\/ and you can do this with the word under your cursor. \n\nYou could simply paste before you delete: \u2019yw\u2019 then go the word you want to replace, \u2019pldw\u2019 (paste, move one character right, delete word)."},{"question":"how to export variables from a file?","response":"source tmp.txt export a b c .\/child. \n\nset -a . .\/tmp.txt set +a set -a causes variables\u00b9 defined from now on to be automatically exported; you can also use set -o allexport as a more descriptive alternative way to write it (set +o allexport to unset). \n\nTry: while read LINE; do export \"$LINE\"; done < .\/tmp.txt. \n\nA dangerous one-liner that doesn't require source: export $(xargs output_file`. \nAlternatively, an awk one-liner `awk '!seen++' filename` can achieve a similar result. \nUsing standard utilities involves a sequence of commands numbering lines, sorting and uniquifying by ignoring line numbers, and then sorting by line numbers before cutting off these numbers to output the deduplicated content. \nPython also offers a one-liner solution to sort and remove duplicates from a file: `python -c \"import sys; lines = sys.stdin.readlines(); print ''.join(sorted(set(lines)))\" < InputFile`. \nThe Unix `sort` utility can be used with the `-u` flag to directly sort and remove duplicates from a file, for example, `sort -u big-csv-file.csv > duplicates-removed.csv`. \nFor in-place file editing without creating a new output file, GNU awk provides an option with `gawk -i inplace '!a++' file`. \n`uniq` command is used to report or filter out repeated lines in a file, usually post sorting since it works on adjacent duplicates. \nIf preserving the original line sequence is not a concern, a combination of `sort` and `uniq` can be used as in the command `sort duplicates.txt | uniq > noDuplicates.txt` to remove repeated lines."},{"question":"how do you tell if advice from a senior developer is bad?","response":"To discern the quality of advice from a senior developer, asking another senior developer for their perspective can provide additional insights. \nAdditionally, researching on your own and validating the advice against industry best practices is crucial. \nIf the senior developer can articulate sound reasons and examples supporting their advice, it adds credibility. \nTaking advice with a grain of salt and cross-referencing it in books and reputable online sources is a prudent approach. Furthermore, if there's lack of clarity in the advice, don't hesitate to ask questions for a better understanding. \nUltimately, evaluating whether the suggested approach is objectively effective or if there is the any objective reason why his way would be inferior becomes a key criterion in assessing the advice."},{"question":"did i just get dns hijacked?","response":"It is obvious that modifications were made to the DNS settings of your router, likely with the use of default credentials. \nTo address this issue, it is recommended to reset the router to its factory settings, update the firmware to the latest version, change the default login information, and ensure that remote access to the router is disabled. \nThe primary DNS entry of your router was redirected to a malicious DNS server, causing devices on your network to resolve legitimate domains like apple.com to phishing sites. \nThe compromise likely stemmed from the Asus AC87U router's outdated firmware, enabling a DNS hijacking attack, emphasizing the urgency of timely updates and secure password management for router interfaces."},{"question":"why are z and y switched?","response":"It seems that you have set the wrong language for your keyboard. \nIt might be German, which employs a QWERTZ layout, as opposed to QWERTY."},{"question":"is vlan 1 the native vlan?","response":"Regarding default VLAN settings, Cisco and most vendors have VLAN 1 set as the native VLAN."},{"question":"help! my home pc has been infected by a virus! what do i do now?","response":"In eliminating a computer virus, a reliable approach involves isolating the computer by completely wiping the hard drive and reinstalling the operating system, an act colloquially referred to as \"nuke it from orbit\". [1*, 2*, 4* ,6*, 8*]\nTo properly address the situation, it is important to identify and back up important files and programs, change sensitive website logins and credentials, isolate the infected machine from networks, and change all critical online passwords immediately. \nIf you desire an extra layer of security during your process, you may want to utilize a virtual machine like VirtualBox. \nAdditionally, performing scans with anti-virus and anti-malware software, performing \"deep scan and clean\", making regular backups, and ensuring all software and operating systems are up-to-date are useful practices for maintaining computer health and mitigating future security risks. \nRunning virus protection, keeping it updated, and installing virus eradication software also serve as preventative measures. \nHowever, if reinfection is a possibility and sensitive information may have been compromised, it's advisable to switch off the PC, disconnect all cables, and seek professional assistance to verify the presence of a virus, secure user files, and proceed with a clean system installation."},{"question":"tdd vs. productivity","response":"Despite the initial perception of slow progress, the elapsed time is probably going to be the same and the TDD software will be substantially better quality. \nOne opinion offers that, in their experience, time spent writing unit tests is more than saved in reduced debugging time for projects that are done using TDD from the beginning. \nDebugging is almost eliminated when using TDD, thus enhancing the predictability and efficiency of the development process. \nHowever, another opinion offers that it's uncertain if TDD will help in certain fields such as gaming, where the value of TDD is questionable due to the nature of the code and its testing difficulties. \nFinally, it's important to remember that while TDD is good only only if you don't aim for for 100% test coverage, it may not always align with delivering business value and should be balanced with feature development."},{"question":"how to copy a file from a remote server to a local machine?","response":"To transfer files using SCP, the command syntax to consider is `scp username@source:\/location\/to\/file username@destination:\/where\/to\/put`. \nAdditional insights on SCP usage can be obtained by referencing `man scp`. \nAn alternative for file synchronization and transfer is `rsync`, which provides commands like `rsync -avzh --stats --progress remoteuser@remoteip:\/path\/ localpath`. \nFor local network transfers where security is not a concern, `netcat (nc)` is recommended as it is deemed the fastest method within a trusted network. \nWhen copying a directory and its contents via SCP in Linux, the command follows the structure `scp -r root@:~\/folderinremoteuserdir ~\/folderinlocaluserdir`."},{"question":"why are ipv4 addresses running out?","response":"There are 4 billion addresses available under IPv4, which should be enough for everybody in principle, but the minority who can afford it have 15-20 devices connected to the internet, which is more down to marketing than necessity, so it comes down to money; plus, providers want to promote IPv6, and so have given out addresses like candy, until almost none are left."},{"question":"how do i disable the click sound on the camera app?","response":"To delete the camera sound file on your device, administrative access, known as root, is required. \nFor devices like the Nexus One, turning the system volume down via normal volume controls while in the camera may also silence the shutter sound. \nSome users prefer using a specialized app such as Silent Camera to avoid camera shutter noises. \nAdditionally, certain camera applications may include a built-in option to disable the shutter sound. \nThis feature isn't exclusive to newer versions like Froyo; it's also found in older versions like Eclair on devices such as the Samsung Vibrant, within the camera's settings under a \"Shutter sound\" option. \nFor those utilizing automation apps like Tasker, a task can be programmed to set the system volume to zero whenever the camera app is launched, restoring the volume to its original state upon exiting the app."},{"question":"do i really need to install a task manager?","response":"In most scenarios, it is unnecessary to use a task manager or killer on Android, especially with the latest 2.2 versions, as the operating system manages multitasking more effectively on its own. \nMost services that run in the background consume minimal memory unless they are actively engaged in a task. \nHowever, there are infrequent circumstances where a task manager could be beneficial, such as when a run-away process needs to be terminated, which is something a monitoring app like Watchdog might alert you to."},{"question":"how to clear the cache or do a hard refresh in safari?","response":"To do a full refresh, you can press \u21e7 Shift and click the Refresh button, or use the keyboard shortcut \u2318 Command+R. \nClearing the cache is possible with \u2318 Command+E, followed by a refresh. \nAlternatively, you can go to Safari > Empty Cache or use the shortcut \u2318 Command+\u2325 Option+E. \nAnother option is to use the combination \u2318 Command\u2325 OptionR, which serves as Safari's equivalent to \u2318 Command\u21e7 ShiftR in Chrome, ensuring a \"Hard Refresh\" without clearing the cache. \nDepending on your Safari version, you might find that Opt+Cmd+E or \u2325 Option \u2318 Command E."},{"question":"aggregation vs composition","response":"Aggregation, as distinguished from ordinary composition, diverges significantly by not implying ownership. \nIn composition, the demise of the owning object results in the simultaneous destruction of the contained objects. \nWhen examining composition, it can be perceived as 'needs a,' where the relationship denotes a necessity, such as a car needing an engine. \nConversely, aggregation is akin to 'things related for a purpose'. \nIn the realm of composition, the relationship \"A owns B\" implies a strong association, signifying that B has no independent meaning or purpose within the system without \"A\". \nOn the other hand, in aggregation, the relationship \"A uses B\" conveys a weaker association, allowing B to exist independently, both conceptually and functionally, from \"A\". \nFurthermore, the strength of association is emphasized by stating that composition is a robust association, while aggregation embodies a weaker form of association. \nTo illustrate this concept further, one can consider a simple example: an array of objects exemplifies composition, where the deletion of the array results in the vanishing of its contents. Conversely, an array of pointers to objects represents aggregation, allowing the array to vanish without affecting the existence of its members, unless a specific method is employed to delete each object as its pointer is removed."},{"question":"linux: difference between \/dev\/console , \/dev\/tty and \/dev\/tty0","response":"\/dev\/console is a set of virtual devices which can be set as a parameter at boot time; the Linux Kernel documentation explicitly identifies \/dev\/console as a character device with a specific number (5,1). \nThis set includes devices like \/dev\/tty[0-N], where N represents the highest numbered TTY, and \/dev\/tty0, which is the default virtual console. \nThe Linux Kernel documentation further clarifies that \/dev\/tty is the current TTY device, \/dev\/console is the system console, and \/dev\/tty0 is the current virtual console. \nCharacter devices like \/dev\/console and \/dev\/tty0 allow for reading and writing to the current virtual terminal. Moreover, \/dev\/tty is recognized as one of the three key standard devices defined by POSIX."},{"question":"is password knocking a good idea?","response":"From a defense perspective, there's a small amount of value here, though not much, because having a knock requiring three successive passwords, of lengths A, B, C, is no better than if there was just a single password with length A+B+C. \n\nAt most, the only positive defensive benefit you get with this scheme is frustrating the attacker a little at first, as it would fool a standard brute-force attack, but it is not advisable as the negative is it is too complicated for a normal user. \n\nOne possibility is it may help to reduce phishing-type things: if users expect to enter successive passwords, but a system accepts the first password in lieu of accepting the others, then you know that the system is compromised and is simply logging your username and password."},{"question":"what do the scripts in \/etc\/profile.d do?","response":"The usage of a configuration directory allows modifications to an application's configuration, which would not be viable with a single, shared configuration file."},{"question":"route servers and looking glasses - what are they?","response":"A looking glass is usually a website (most often CGI) that interfaces with routers that are owned and operated by a single ISP or other network operator. \nThe difference between a public route server and a looking glass (aside from an LG having a nifty CGI) is that a wide variety of networks (including some tier one carriers) peer with a route server, so there's an \"overall\" bigger picture of which prefixes are coming from which ASN's. \nA route server itself is an eBGP speaker, however there have to be specific considerations for a route server and multilateral BGP peering."},{"question":"are programmers good at math?","response":"Some say that in most instances, good programming and an interest in mathematics are distinct abilities, and proficiency in one does not necessitate competence in the other. \nOne programmer noted that the very worst very worst programmers they had ever worked with had PhD's in math. \nSome prominent programmers, like Jeff Atwood, do not necessarily have a strong inclination towards mathematics. \nWhile a fundamental understanding of algorithms is crucial for becoming a standout programmer, and a basic comfort with or knowledge of math will help you in your work, you don't necessarily need to excel in mathematics. \nA lack of mathematical inclination does not preclude success in programming, though familiarity with principles like logic and geometry can enhance one's work with databases. \nThe idea that math is essential for programming is sometimes considered a myth, mainly propagated by academic environments, rather than by the reality of working as a programmer. \nSome say that the level mathematical ability required depends completely on what you're programming. \nBut many believe math to be essential for programming, stating that mathematics is an abstract notation for modeling real world situations, which is exactly what programming is. \nThey add that high-level programming may not require extensive math; however, more in-depth understanding is mandatory for low-level programming. \nProgramming, they say, has firm mathematical roots, and comfort with numerical concepts is important, further advising that you have to either learn math, or create your own\u2013either way, it is important to be good at it in some form or another. \nThe essence of being \"good at math\" may equate to the ability to construct and manipulate mental models rather than the memorization of facts, which is crucial for programming as well, proving to some that a programmer with good math skills will be a far better programmer than the one who lacks. \nMathematical knowledge can facilitate certain programming tasks, as seen in a Javascript acceleration and deceleration simulation using the Fibonacci sequence. \nA comfort level with algebra seems almost non-negotiable for being a proficient programmer, but extensive math experience beyond that may not be frequently necessary. \nSome say that it's pretty hard to be good at programming if you don't understand some basic concepts in Discrete Mathematics like set theory and Boolean logic. \nDirectly learning algebra from programming is not uncommon, as it helps in understanding algebraic expressions, and mathematics can give a valuable foundation for software developers. \nProficiency in mathematics can result in superior programming skills, as programming is essentially applied math: both fields reward clear, analytical thinking. \nLikewise, interest in programming can boost mathematical ability, illustrating a practical application for math concepts in coding. \nWhile some say that business programming might not involve intricate mathematics, they assert that the development of 3D graphics engines and developing data structures rely heavily on mathematical concepts. \nBut others counter that even business programming requirements necessitate some math skills, particularly databases, algorithms, and query processing, which are fundamentally mathematical."},{"question":"ifconfig command not found","response":"The \"ifconfig\" command is replaced by \"ip a\" due to deprecated net-tools, and is accessible via \"\/sbin\/ifconfig\" or by installing \"net-tools\" package, so try \"Is \/sbin\/ifconfig\". \n(You need \"\/sbin\" in your command). \nIf the file does not exist, it's possible the command is not installed."},{"question":"what does it mean when someone keeps a digital touch message from you?","response":"Selecting the keep option will not remove items from the conversation; rather it's just a way to save space."},{"question":"how to open multiple windows in outlook for mac?","response":"To open multiple windows on your computer, navigate to File -> New -> Open New Main Window."},{"question":"are wifi passwords saved on icloud?","response":"Although it is not explicitly mentioned if passwords are stored in the backup, iCloud Backups of iOS devices include the Keychain of all saved passwords on the device, including WiFi network passwords."},{"question":"is there an imessage client for windows?","response":"Official iMessage clients are exclusively available for iOS and OS X as of May 2016, and there are no official iMessage clients for Windows. \nHowever, if your iOS device is jailbroken, you have the option to purchase the Remote Messages tweak from Cydia for $3.99 and use iMessage via a web interface from anywhere."},{"question":"what un(der)-documented features have you stumbled upon in mountain lion?","response":"A 'Do Not Disturb' mode can be activated in the Notification Center to silence notifications for the day, while the Centre itself can be toggled with click-and-hold. \nAlso, notifications can be quickly dismissed with a two-finger swipe. \nIn the Dock, an accidental Dock icon removal prevention feature has been added, requiring a minimum distance and duration before an icon is deleted. \nAlso, bouncing application icons in the Dock can be silenced simply by hovering over them, while the Dock's aesthetics have also been slightly improved. \nIf an application is iCloud-savvy, its Open dialog has an iCloud tab. \nFurthermore, Safari now supports tab sharing across Mac devices with the same iCloud account. \nAlso, in Safari, renaming bookmarks has been made quicker, the Reading List can now cache content for offline use and PDF navigation has been enhanced. \nFor Finder, customization of the sidebar through drag-and-drop is available again. \nAlso, a three-finger tap can be used to trigger QuickLook for items in the Finder, plus direct video\/audio encoding from Finder is now an option. \nQuick Look also allows zooming in on PDFs through touchscreen gestures or mouse actions. \nThe Mac App Store can be navigated forward and backward using two-finger swipe gestures, similar to Safari. \nMeanwhile, software Updates now come through the App Store, while the Store updates come with new reopening and skipping options for apps. \nAlso, the Preview app has gotten a new 'Edit' toolbar and week numbers can now be displayed in Calendar app. \nFurthermore, taking app screenshots without shadow is an available option and full screen apps can be used on a screen other than the primary one by dragging the app to the desired screen and activating full screen mode. \nNow, downloads and file copies come with an inline progress bar that indicates progress made, while enhancements to Launchpad include a search bar on top and the display of download progress on the Launchpad icon. \nAlso, Zoom and Mission Control\/Launchpad integration has been improved. \nOther changes include, new kinetic photo-based screen savers were introduced, allowing users to choose images from several stock image categories or their own collections. \nAlso, photo navigation in screensavers is possible using keyboard arrows. \nChess can be played over the internet via Game Center. \nYou can force the system to ask to keep changes when closing documents, thus providing more control over document saving. \nThe 'Save As' functionality has returned, accessible through the keyboard shortcut: option-shift-command-S, or by pressing the OPTION key while the file menu is pulled down. \nInternet Sharing supports WPA2 encryption enhancing security. \nNew date picker interfaces are integrated into date entry fields. \nWeb Sharing for individual users can be re-enabled through Terminal commands. \nAirPlay Everywhere feature enables streaming audio from the Mac to devices like Apple TV and Airport Express. \nScrollbars become wider when hovered over to facilitate easier grabbing. \nIn-app file manipulation options are expanded for efficiency. \nApplications are now expressly listed as 32-bit or not in the 'Get Info' dialogue window. \nDictation is available wherever text can be input, but requires an internet connection. \nManaging Dashboard widgets is streamlined with a new interface and a search bar. \nDocument auto-locking feature has been removed. \nShow scrollbars functionality without scrolling has been added for multi-touch devices. \nThe estimated battery time remaining option has been removed from the battery menu bar item. \nUsers will now receive prompts for address book access. \nAccessibility settings can be accessed quickly with the keyboard shortcut: \u2325+\u2318+F5. \nMultiple Time Machine Backup Destinations can be set. \nThe kernel is exclusively 64-bit and Kernel security is improved through ASLR. \nClipboard content persists through reboots."},{"question":"how do i report a security vulnerability about a trusted certificate authority?","response":"When dealing with a serious claim involving vendor security issues, it is first advised to contact the vendor in question. \nIn parallel, reporting to the root store security teams at major corporations like Google, Microsoft, Apple, and Mozilla is crucial, as they design and maintain security controls. \nFor those less certain about proceedings or wishing anonymity, the Chromium security team offers assistance in reporting and coordinating these efforts. \nAlternatively, contacting CERT is a solid option for guidance, confirmation of vulnerability assessments, and for documenting one's discovery. \nOperating system and browser vendors are also relevant points of contact considering they manage root CA lists. \nIf necessary, individuals should compile evidence of the vulnerability, such as a certificate chain or session capture that demonstrates the fault, and publish it to platforms like GitHub or Pastebin to prevent repudiation. \nFor personal protection and representation in communications with vendors and the public, seeking a representative through the community, the Electronic Frontier Foundation (EFF), or a personal attorney is advisable."},{"question":"are there any risks to rooting a device?","response":"Rooting a device comes with certain risks, including the potential to brick the device, although it should be unlikely, and it depends on how you do it. \nDoing so often voids the warranty, especially outside the EU, where warranty terms are not upheld if the state voids it. \nUpdates from the manufacturer may stop if the device is rooted and a custom ROM is installed, or certain updates might unroot the device. \nRooted phones, however, can be as secure as unrooted ones if root permissions are managed correctly. \nRooting your phone inevitably involves granting root permissions, and the risk arises when apps with root access turn rogue or inadvertently share permissions, potentially allowing untrusted apps to gain similar access. \nTherefore, it's crucial to be mindful of the apps to which you grant root access to ensure the security of your phone. \nMoreover, there are instances where malware has escalated to root permissions on un-rooted phones as well."},{"question":"is it possible to rotate images in preview in degrees other than 90?","response":"While it seems there is no obvious way to rotate images in degrees other than 90, there is in fact a 'hidden' feature that allows you to do so. \nSimply hold the Option button down and use two fingers on the trackpad to rotate the image."},{"question":"preserve bash history in multiple terminal windows","response":"To preserve bash history in multiple terminal windows, first, add two lines to your ~\/.bashrc: \n```shopt -s histappend PROMPT_COMMAND=\"history -a;history -c;history -r;$PROMPT_COMMAND\"```. \nAdditionally, you can use the `history -a` command to append the current session's history to the histfile and then use `history -r` on other terminals to read the histfile . \nYou can edit your BASH prompt to run \"history -a\" and \"history -r\": \n```savePS1=$PS1 (in case you mess something up, which is almost guaranteed) PS1=$savePS1`history -a;history -r```. \nAnother approach involves writing a script to set a history file per session or task: \n```# write existing history to the old file history -a # set new historyfile export HISTFILE=\"$1\" export HISET=$1```. \nYou can also map the following to a hotkey: \n```history | grep -v history >> ~\/master_history.txt```. \nConsider this solution: \n```# Write history after each command _bash_history_append() { builtin history -a } PROMPT_COMMAND=\"_bash_history_append; $PROMPT_COMMAND\"```. \nIf you prefer a simple version, you can use the following: \n```shopt -s histappend PROMPT_COMMAND=\"history -a; history -c; history -r\"```. \nTo maintain history in a file-per-tty, allowing multiple people to work on the same server, use this approach: \n```shopt -s histappend PROMPT_COMMAND=\"history -a; history -c; history -r\"```. \nAnother method involves storing the history of each session separately and recreating it on every prompt: \n```export HISTFILESIZE= export HISTSIZE= export HISTTIMEFORMAT=\"[%F %T] \" export HISTFILE=~\/.bash_myhistory PROMPT_COMMAND=\"history -a; history -r; $PROMPT_COMMAND\"```. \nThe following is also worth considering: export HISTFILESIZE= export HISTSIZE= export HISTTIMEFORMAT=\"[%F %T] \" export HISTFILE=~\/.bash_myhistory PROMPT_COMMAND=\"history -a; history -r; $PROMPT_COMMAND\". \nFinally, for a more hands-on approach, you can create a script to merge the on-disk \".bash_history\" with the in-memory shell 'history'; here is the result: https:\/\/antofthy.gitlab.io\/software\/history_merge.bash.txt."},{"question":"how to use windows internet on android phone through usb cable","response":"To use Windows Internet on an Android phone, you must have more than one network connection for the sharing tab to show up. \nAdditionally, you should disregard your Android device's instructions and attempt to connect to the USB-Internet regardless."},{"question":"how to connect iphone screen on mac?","response":"You can try the Reflector App; or try the Airserver App, which is an app that turns your Mac into an Airplay receiver. \n\nAlternatively, you can screen capture the iPhone directly using QuickTime Player on the MacBook (it is pre-installed on OS X), connecting the iPhone via USB cable to the MacBook; the QuickTime Screen Recording function will work on an iOS 8 device connected to the computer via USB. \n\nThere is also a forthcoming service called iRec that should achieve this."},{"question":"what is the working directory when cron executes a job?","response":"The working directory when cron executes a job is the home directory by default: \/home\/your-user-name."},{"question":"i found that the company i work for is putting a backdoor into mobile phones","response":"It is right to worry; some people advise removing the backdoor completely. \nJust because the company won't use it, doesn't mean someone else won't find it and use it. \nBy definition your company is knowingly shipping a product with a serious security vulnerability. \nIf they don't see it as a big deal, you're not asking them the right question. \nAll you can do is communicate the risk in a way that the business area can understand. \nThis was reported in China's ZTE Ships Smartphone with Backdoor to MetroPCS. \nAlthough sometimes required by law (insist on internal documentation to that effect), you should seriously consider going to some governmental or regulatory authority with this, just to protect yourself, for example, CVE. \nYou can go on pastebin and make a full and comprehensive security advisory (cover your tracks). \nSome people counsel against immediate whistleblowing. \nBeforehand, you should hire a very skilled lawyer and be prepared to lose a lot of time and money, or even the job."},{"question":"compress a folder with tar?","response":"Use the command `tar czf name_of_archive_file.tar.gz name_of_directory_to_tar`."},{"question":"how safe are password managers like lastpass?","response":"Online password managers carry somewhat more risk, which includes the possibility that the online database could be breached in various ways and technical vulnerabilities. \nPassword managers create a single point of failure because all passwords are kept in one place, and it is crucial to ensure that this \"basket\" is well-protected. \nTwelve security concerns were reported to LastPass, emphasizing the importance of assessing security risks associated with both server-side and local password manager instances."},{"question":"is ghidra better than ida?","response":"This is largely subjective, but Ghidra is free and open-source on GitHub, including the decompiler. \nIDA on the other hand is very expensive, particularly when you start adding the decompiler licenses. \nIDA supports some architectures that Ghidra doesn't, and vice versa. \nAdditionally, IDA has a debugger, whereas Ghidra does not."},{"question":"external drive does not mount after plug off without eject","response":"If you are trying to mount a hard disk and it appears in the disk utility but cannot be mounted, you could try mounting it as read-only using the command `diskutil mountDisk readOnly \/dev\/diskx` to access your data, especially if there's a chance that the disk's partition table is corrupted. \nIn severe cases where the partition is indeed corrupted, you may have to format the hard drive. \nBefore taking that step, it can be useful to repair the volume for any errors using the disk utility or terminal commands. \nYou should also go to Launch Pad, open Disk Utility, select the disk that won't mount, and attempt to repair it. \nAnother possible solution is to eject the disk first and then try to mount it again, which may work without errors. \nFurthermore, if you have tried various commands, such as mounting and unmounting, and they fail, you could unmount and eject the disk, then reconnect it to your computer. \nSometimes, using a Windows PC to properly eject the disk before reconnecting it to your Macbook can also resolve the problem. \nAdditionally, check if the fsck process is preventing the disk from mounting when connected. \nIf fsck is indeed the culprit, killing the process could immediately mount the volume."},{"question":"where can i find good dictionaries for dictionary attacks?","response":"A comprehensive list of passwords collected by Ron Bowes is available at: http:\/\/www.skullsecurity.org\/wiki\/index.php\/Passwords. \nThe CrackLib dictionaries are also a notable resource for password security. \nYou can also find them in a blog written by g0tmi1k, which can be accessed at http:\/\/blog.g0tmi1k.com\/2011\/06\/dictionaries-wordlists\/. \nA critical addition to password security resources is the crackstation wordlist, which includes an extensive compilation of dictionaries and leaked databases. \nIt can be helpful to utilize the compilation at https:\/\/github.com\/danielmiessler\/SecLists for popular passwords, usernames, and attack types."},{"question":"how do i increase sudo password remember timeout?","response":"When dealing with sudoers, the manual can be accessed in the terminal via the command 'man sudoers'. \nAlthough you can use simple text to edit files, the permissions are set to make this challenging, reflecting the importance of this file to system security. \nYou can edit the sudoers file using vi, emacs, or BBEdit. \nMoreover, by running 'sudo visudo' and adding the line 'Defaults timestamp_timeout=-1', you can ensure that the sudo password never times out. \nThis command also checks for syntax errors before saving changes, alerting the user to correct any mistakes."},{"question":"what is the difference between ringer and volume?","response":"Ringer volume refers to the sound coming out of your phone when its ringing. \nIt can be adjusted by the volume buttons on the side of your phone as long as no media is playing. \nHowever, if you are playing any media on your phone then the volume buttons will adjust the volume of the media being played. \nSimilarly, if you have a pair of headphones plugged in, the volume buttons will adjust the output sound level of the headphones."},{"question":"how do i delete a file whose name begins with - (hyphen a.k.a. dash or minus)?","response":"One method to remove a file with the '--help' name is to use the rm command with an argument to stop parsing options by typing `rm -- --help`. \nAlternatively, you can prepend `.\/` to the file name, effectively using the command `rm .\/\u2014help`. \nAnother technique involves deleting a file by searching for it by its inode number, which is unique to every file in a file system. \nThe `find` command can also be used with the option `-name '--help' -delete`, but it's essential to be careful as it will recurse through subdirectories unless the `-maxdepth 1` option is also included. \nFor a straightforward solution, you can use the Midnight Commander (mc) file manager and delete files with a simple key press. \nIf these methods don't work, you can use scripts like \"perl -e \"unlink '--help' or die 'Could not unlink.';\" perl -e \"rmdir '-d' or die 'Could not rmdir.';\" to force deletion. \nLastly, one could use Vim to 'edit' the directory and delete the file from within the Vim interface."},{"question":"how can i mount an ext4 file system on os x?","response":"You can install OSXFUSE via the brew command line package manager: brew install homebrew\/fuse\/ext4fuse. \nAlternatively, you can boot Linux VM swiftly on your OS X using Vagrant. \nThis requires an install of a VM provider, such as VirtualBox, and Vagrant either via .dmg file from the site or using brew cask. \nFor (High) Sierra For Sierra and High Sierra ext4fuse seems to work well, what's more it's read access only, so could be considered the preferable method. \nIf you should want to unmount, you can use the command: diskutil umount ${MOUNT_POINT}."},{"question":"is wpa and wpa2 the same?","response":"Apparently, WPA was the original WPA standard, and WPA2 is an improved version of it; the advanced protocol will not work with some older network cards."},{"question":"how can i add a new application to the open with menu?","response":"Files can be forced to open with any desired application by dragging them onto the app while holding down the Option (\u2325) and Command (\u2318) keys. \nFurthermore, it's possible to configure a service using Automator that adds an option to open files with a particular application, such as TextEdit, and this can be set up to be triggered by a hotkey using Keyboard Maestro."},{"question":"what if kill -9 does not work?","response":"Kill -9 (SIGKILL) always works, provided you have the permission to kill the process, with the exception of zombie processes, which are harmless as they only consume an entry in the process table. \nIt will go away when the parent process dies or reacts to the death of its child. \nSome users say that the following conditions would prevent a kill: a rootkit, immunity from the kill (the initialization process, kernels or anything with a PPID equaling 0, a process in uninterruptible sleep, or where a process has restarted automatically. \nYou can see if the process is a zombie by using top or the following command: `ps aux | awk '$8==\"Z\" {print $2}'`. \nHowever, if the parent did not read the exit status, the kernel is out of whack, or a remote mount has caused a zombie process that does not stop with unmounting the device or samba, the only method to kill the zombie is the reboot or wait. \nYou can also try attaching to the process with gdb: `gdb -p > kill Kill the program being debugged? (y or n) y > quit`"},{"question":"do changes in \/etc\/security\/limits.conf require a reboot?","response":"It's not necessary to reboot, but you should close active sessions, as these sessions still use old values."},{"question":"is applecare for iphone transferable?","response":"Yes, according to AppleCare's Frequently Asked Questions, both the AppleCare Protection Plan and AppleCare+ are transferable. \nFurthermore, when an individual obtains an Apple product with AppleCare, the previous owner is obliged to transfer the ownership of the AppleCare Protection Plan or AppleCare+ to the new owner if they choose to sell or give the product away. \nThe option to transfer ownership is provided because the original owner has the ability to cancel the AppleCare protection at any time and may receive a prorated refund."},{"question":"extract only a specific file from a zipped archive to a given directory","response":"To extract a specific file from a zip archive, use the command `unzip ARCHIVE_NAME PATH_OF_FILE_INSIDE_ARCHIVE`, which will unzip the file to the current directory. \nTo list all files in a Zip archive: unzip -l ARCHIVE_NAME."},{"question":"in arch linux how can i find out which package to install that will contain file x?","response":"Since pacman 5.0, there is built-in functionality for searching the database with the -F option. \n\nFrom ArchWiki: $ pacman -Qo df. \n\nThe google way:www.archlinux.org\/packages\/ bin\/filename."},{"question":"how to clear journalctl","response":"Configure journald to retain only the amount of data you're interested in by scheduling it to limit disk space usage. \nModify the \/etc\/systemd\/journald.conf file to set a maximum usage parameter, such as SystemMaxUse=100M or SystemMaxUse=1M, and then restart the systemd-journald service for the changes to take effect. \nAdditionally, using journalctl, you can vacuum the logs by size or time, for instance, keeping only logs from the past two days (` journalctl --vacuum-time=2d`) or limiting the size to 500 MB (`journalctl --vacuum-size=500M`). \nA very brute force method to clean the entire log: `$ sudo journalctl --vacuum-time=1seconds` and `journalctl --rotate journalctl --vacuum-time=1s` to remove the active files as well or to merge all journals and clean them up on CentOS-7, `journalctl -m --vacuum-time=1s` or simply `sudo journalctl --vacuum-files 1` . \nIf those commands don't work, as in some systems like CentOS, you might have to use a command like `sudo rm -rf \/run\/log\/journal\/`. \nTo directly clear log entries, you can overwrite the system.journal file using a simple change directory and overwrite command (`cd \/run\/log\/journal\/\/ >system.journal `) after backing up the file (`cp \/run\/log\/journal\/\/system.journal \/mylog\/dir\/back\/system.journal.bak`) if needed. \nPersistent configuration changes can be achieved by creating a dedicated config file in the \/etc\/systemd\/journald.conf.d\/ directory, which will maintain a small log size indefinitely and can be reverted easily if necessary. \nLastly, should you need to remove logs for a specific service, performing a journalctl --rotate will archive the logs, enabling the --vacuum-time command or other vacuuming options to take effect on them."},{"question":"how can i communicate with a unix domain socket via the shell on debian squeeze?","response":"On Debian, you can make use of a tool named socat for your networking needs. \nThis tool, also known as a bidirectional data relay, allowing for connections to Unix domain sockets which can be achieved with specific socat commands. \nAlternatively, netcat-openbsd, supports a -U option for connecting to Unix-domain sockets."},{"question":"parallelize a bash for loop","response":"A useful technique for executing commands in parallel is to use `cat \"args\" | xargs -P $NUM_PARALLEL command`, which feeds each line of the \"args\" file into the command, limiting the execution to a maximum of $NUM_PARALLEL processes at once."},{"question":"when are getters and setters justified","response":"In Java, methods are used in interfaces rather than fields because only methods can be defined within an interface. \nIf there's a need to pass a field through an interface, implementing 'getter' and 'setter' methods is necessary."},{"question":"most efficient method to empty the contents of a file","response":"To empty a file in UNIX, you have multiple options such as using the command \"cp \/dev\/null filename\" or \"> filename\" which effectively clear the content by copying the empty \/dev\/null over the file, or \"truncate -s 0 filename\" . \nThe command \"cp \/dev\/null filename\" is generally efficient, although slightly slower, unless truncate is run from a script."},{"question":"new developer cant keep up with branch merges","response":"Struggling with branch merges as a new developer might be a sign of bad software engineering on the company's part. \nRunning 'git fetch' regularly, not 'git pull,' ensures you stay updated with the latest changes from the development branch. \nGit's interactive rebase (git rebase -i) can be a powerful tool in managing branch merges. \nHowever, it's important to recognize that difficulties in branch merges often extend beyond individual engineering capabilities and can be a team-related problem. \nProactive measures, such as regularly merging the developed branch into your feature branch help avoid conflicts in the future. \nStrategies like merging with the development branch whenever changes occur, engaging in discussions with colleagues about conflict-avoidance techniques, merging earlier and changing fewer lines, as well as getting a good diff tool can significantly ease the process. \nWhile handling conflicts in git merge might be simpler than in git rebase, open communication with the team leader is essential to coordinate modifications by concurrent developers. \nAvoiding multiple people working on the same files, supported by immediate regression tests is advised, and rebasing into a single commit before merging is an effective approach. \nDepending on the project's code, pair programming may be the best approach. \nEmphasizing the importance of regular merges into the development branch, breaking tasks into smaller, manageable units, and having a working code that passes tests daily facilitates smoother integration. \nAlternatively, if frequent merges with the develop branch are undesirable, using 'git pull --rebase' can offer a workflow resembling SVN. \nPractical advice includes merging granular frequent commits, frequently rebasing your branch, and developing familiarity with Git commands."},{"question":"how to check who last logged in linux?","response":"The command \"last\" reads from a file, typically \/var\/log\/wtmp, and lists successful login attempts, showing the most recent first. \nTo find out the last time a file was updated, you should use the \"stat\" command. \nAdditionally, the \"lastlog\" command is noted for its ability to filter user logins within specific date ranges."},{"question":"how to delete photos from icloud but keep on computer?","response":"On your laptop, move your photos to a separate folder, then delete them from iCloud; on your phone, upload the photos to your laptop and delete them from the phone, then turn off photos in iCloud."},{"question":"how can i keep my ssh sessions from freezing?","response":"If you need to keep your connection alive for as long as it stays active in a terminal, consider using \"screen\" on the remote host. \nFor those facing issues with a hibernated laptop or unreliable network connections, \"mosh\" is recommended, which runs over SSH and allows automatic reconnecting."},{"question":"does the shebang determine the shell which runs the script?","response":"Yes, the shebang determines which shell runs a script: the line contains a path to the bash interpreter, ensuring the script is interpreted by bash, regardless of the executing shell."},{"question":"blacking out a part of a pdf, or redaction of text","response":"If you have Adobe Acrobat, you can use its dedicated redaction tools for this purpose. \nAnother option is using PDFPen, which provides a redaction tool that works properly. \nScanTango is another tool that offers redaction features. \nFor a free solution, you can convert the PDF to an image or JPG and then save it as a PDF again in Preview. \nGIMP, a free photo editor, can be used to open the PDF as an image and apply redactions using tools like the line tool. \nPDF Studio version 8 includes a manual redaction tool within its content editing features. \nAlternatively, you can use Preview on Big Sur, which now has a dedicated Tools\/Redact menu item for deleting the content being redacted."},{"question":"how does amazon bill me without the cvc \/ cvv \/ cvv2?","response":"Certain security codes like CVV are not deemed necessary for transactions on platforms like Amazon, as it opts for a faster shopping experience. \nFor most transactions, the essential information needed for a purchase just includes the card number and, typically, the expiration date. \nMerchants may request the CVV when saving a card to verify its legitimacy but are not allowed to store it, due to the risk of incurring heavy fines if discovered by card companies. \nDespite this, Amazon willingly pays a higher rate to allow payments without the CVV, relying on the merchant's reputation and low incidence of chargebacks to mitigate risks. \nIn essence, whether transactions without the CVV are accepted is based on the bank's discretion, which may vary, and some banks might grant exceptions for Amazon, due to its substantial track record."},{"question":"is there a charge for airdrop?","response":"Airdrop it is always a direct connection (usually wifi or a mix of wifi + bluetooth) between the 2 devices, so your internet quota won't be used at all."},{"question":"what is an emergency call, and can i set number for it?","response":"The feature that allows dialing an emergency number like 911 without unlocking the phone is intended for use in emergencies. \nThis functionality is limited to calling emergency numbers and cannot be easily changed. \nWhile some older versions of Android enabled the addition of extra emergency call numbers, altering or removing the default emergency number, mainly 911 in the USA, is not straightforward in the latest versions."},{"question":"can ipv6 connect to ipv4?","response":"An IPv4-only host cannot directly communicate \/ interoperate with an IPv6-only host, because they are two completely separate protocols, with separate, incompatible packet headers and addressing. \nHowever, NAT64\/DNS64 is a common approach for clients, allowing IPv6 clients to reach IPv4 servers, while reverse proxies can be used for directing traffic for servers."},{"question":"how do you maintain focus when a particular aspect of programming takes 10+ seconds to complete?","response":"The removal of distractions is suggested, such as ensuring a quiet workspace with no phones, fast computers, and internet access. \nOne can also reduce compile times by downsizing the project or purchasing a faster machine if necessary. \nA practical tool is a command-line utility that signals task completion, preventing over-distraction (although some recommend against it as it might be disruptive for your colleagues). \nDuring short pauses like a compile delay, engaging in light activities that don't demand intense mental focus like briefly reviewing code, walking, stretching, doing pull-ups, filling up a water bottle or making tea, organizing your workspace, tracking non-working time, doodling or performing other short tasks. \nSome recommend investigating the Pomodoro technique. \nOthers use short delays to think about the existing task\/solution and what can be done to improve it, going back to review the code, starting work on the next chunk, setting up a secondary task, doing documentation, code cleanup, and code alignment, or looking for bugs, typos, or ways to refine code style. \nBut sometimes, it's best to resist the urge for constant activity and embrace brief moments of inactivity."},{"question":"what is the purpose of the lost+found folder in linux and unix?","response":"The lost+found folder in Linux and Unix serves as a construct used by fsck when there is damage to the filesystem. \nFiles that would normally be lost due to directory corruption are linked in that filesystem's lost+found directory. \nThis directory provides a way for you to find files that were lost but were salvaged by the system repair process."},{"question":"is there any real reason multiple inheritance is hated?","response":"The compiler reserves a substantial amount of memory for class data, which can lead to inefficiency and waste. \nNo unequivocally compelling argument exists that universally invalidates the utility of multiple inheritance. \nSome languages might struggle with implementing multiple inheritance effectively. \nHowever, multiple inheritance does not inherently pose problems in a language designed to handle it properly."},{"question":"is this a violation of the liskov substitution principle?","response":"There is largely a consensus on the fact that there is a violation of the Liskov Substitution Principle (LSP), although there is a suggestion that there may not be a violation. \nWhether a violation of LSP is qualified depends on the program that utilizes the subclass and the documentation of expected behavior for the objects. \nLastly, a violation of LSP might arise from a prior violation of another principle, such as the Single Responsibility Principle, and examines a strategy for resolving the issue."},{"question":"what are the security reasons for disallowing the plus sign in email addresses?","response":"There is no inherent security risk with using a '+' in email addresses, as this is allowed by email formatting standards. \nThe restriction of '+' often results from certain systems utilizing a whitelist approach for email characters, excluding symbols they do not anticipate, such as '+'."},{"question":"what is the purpose of gibberish comments posted to my blog?","response":"Spammers are meticulously examining your website, initially checking to see if their comments are published and verifying which link formats will transform into clickable hyperlinks on your site. \nThey are also attempting to undermine any spam filters you may have by using random strings of text, circumventing blacklists, and corrupting self-learning filters with irrelevant data. \nAdditionally, these tactics are deployed to gradually degrade the precision of filters that employ Bayesian analysis by polluting the data they consider 'good'."},{"question":"what are the alternative android app markets?","response":"AppBrain offers user-friendly site and seamless integration with phone app installation, and provides a cleaner interface to the Google Play Store. \nIt also facilitates installing apps directly from a PC browser, serves as a meta-store, and is preferred for discovering new apps. \nAlso, AppsZoom is accessible from desktops and offers app downloads with reviews and ratings. \nAnother option is SlideME, which is useful for purchasing in countries where paid market access is not available. \nThe Amazon Appstore is also has various features and services related to app management, while the Samsung app store supports Samsung devices with excellent developer support and thorough app review processes. \nAnother option is Yalp Store, which allows for downloading apps from the Google Play Store without needing a personal Google account. \nThen there's Aurora Store, an open source alternative to Yalp Store that doesn't require Google's proprietary framework to operate. \nMeanwhile, F-Droid is a repository focused on free and open-source tools, ensuring that all apps are of high quality and adhere to open-source standards with privacy in mind. \nGetJAR gained popularity when it exclusively launched Angry Birds, while 1mobile.com specializes in free apps and offers unique application recommendations. \nSoc.io Mall provides a range of digital products beyond apps, and Antiroid offers free alternatives to paid apps. \nGoogle Play for Education offers educational content for K-12 educators and students, improving app accessibility in classrooms. \nAptoide presents a variety of safe and secure apps from its repositories with an emphasis on privacy and offers user control over app updates and backups. [12* 13*] \nFinally, AOpenSource is another option among the plethora of Android markets."},{"question":"why should one not use the same asymmetric key for encryption as they do for signing?","response":"Using the same key for encryption and signing, may enable attacks, depending on the particular public-key scheme you use, as an attacker can use this to decrypt our encrypted message. \n\nThe main reasons for using separate keys for signing and encryption are related to key management: it is useful in an organization where encryption key needs to be backed or kept in escrow in order to decrypt data once an employee\/user of the organization is no longer available; unlike the encryption key, the signing key must never be used by anyone other than the employee\/user, and does not and should not need to be kept in escrow, so different expiration times can used for the signing and encryption keys. \n\nIf you use different keys for different purposes, you can decide upon all questions of key management based upon the requirements of a single purpose, but if you use a single (master) key for multiple purposes, you may end up with conflicting requirements."},{"question":"is there a quick way to lock my mac?","response":"Go to \"System Preferences\" then \"Security\" under \"General\" to change your preferences. \nIf you enable screen locking within the screen saver pref pane you can put the computer to sleep and lock at the same time by pressing \u2318+\u2325+F12. \n\u21e7+\u2318+\u2325+Q will perform a quick logout. \nVia the Expose system preferences panel you can set a \"hot corner\" of your monitor that activates your screen saver. \nGo to settings -> Mission control and then over to HotCorners on the bottom left corner where there are 4 corner settings: choose anyone of them according to your feasibility as put to sleep. \nAnother option is to enable Fast User Switching in the Login Options pane of the Accounts preferences panel. \nYou can also use \u2325+\u2318+\u23cf to put your Mac to sleep. \nControl-Command-Q locks your screen on High Sierra. \nIf you don't need to remote control the Mac, MacLoc is a simple and effective solution. \nIf you want to be able to remote control: launch the application Keychain Access, press \u2318 to open up the Preferences window, tick the Show Status in Menu Bar, click the newly appeared lock icon in the menu bar, then click Lock Screen. \nAnother idea is to use a free tool like the BetterTouchTool to configure you track pad so that a four finger swipe left locks your Mac. \nAlternatively, configure Lock as \u2303+\u2318+L or you can specify whatever you want. \nTry using a keyboard shortcut (such as CTRL-OPT-L or Command+Option+Shift+L) and use Automator to make a screen lock service. \nIf you're using Alfred, just invoke Alfred and start typing \"lock\". \nControl-Shift-Power (\u23cf or \u233d) also works, as does just clicking the Apple menu at the top left of the screen, and then pressing Lock Screen (^\u2318Q). \nDeskshade, QuickLock, Lock Me Now and Padlock are examples of programs that lock the screen."},{"question":"has many vs belongs to?","response":"In a database relationship, there's typically a table designated as the \"belongs to\"-side holding a foreign key that references another table, known as the \"has many\"-side."},{"question":"dropbox for android folder location","response":"On an OG Droid, Dropbox typically downloads files to `\/mnt\/sdcard\/download`. \nFor Dropbox version 3.0 on a Sony Xperia T3, the default directory is `\/Android\/data\/com.dropbox.android\/files`. \nIn Dropbox 2.0, the standard location is `\/mnt\/sdcard\/Android\/data\/com.dropbox.android\/files\/scratch\/[files]`, as discovered on a Samsung Galaxy Tab 8.9 with an Astro file manager. \nOn a Samsung Note 3, Dropbox's storage path is `\/storage\/emulated\/0\/Android\/data\/com.dropbox.android\/`. \nFor the Huawei Nova 3i, when the \"Make available offline\" option is selected in Dropbox for Android version 156.2.2, the persistent copy is stored in `Main storage\/Android\/data\/com.dropbox.android\/files\/u123456\/scratch\/Some folder\/Somefile.txt`. \nHowever, Dropbox for Android version 218.2.2 no longer saves offline files or folders in a directly accessible directory, accessible only through the Dropbox app, as experienced on a Pixel 1 running Android 10."},{"question":"how to ssh to remote server using a private key?","response":"The process of using ssh involves the -i option to incorporate your key."},{"question":"is bash in osx case-insensitive?","response":"It's not a question of BASH's system, but rather the default file system on macOS: this system is case insensitive, meaning it typically does not differentiate between file names with varying capitalization. \nMacOS's APFS file system, while case insensitive, preserves the case of file names."},{"question":"should i be worried of tracking domains on a banking website?","response":"The embedding of third-party scripts that interact with external servers on a bank's website is deemed to be absolutely not acceptable, particularly when sensitive information is being dealt with. \nBanking websites are known for not being monolithic and often involve multiple third-party systems. \nAlthough the chance is low, it's acknowledged that third-party tracking scripts could potentially become a real threat to security by inadvertently leaking sensitive data like account balances."},{"question":"when will my phone get the android 2.3 update (gingerbread)?","response":"A list of all known and rumored dates for devices' updates has been provided by Community Wiki. \nFor instance, the Commtiva z71, Geeksphone One and Geeksphone Zero will get the unofficial update to version 2.3.7 (CynogenMod 7.1) on October 11th, 2011."},{"question":"alternative to windows snipping tool for mac osx","response":"Use the keyboard shortcut \u2318+\u21e7+3, while the shortcut \u2318+\u21e7+4 lets you capture a custom area you select by clicking and dragging. \nAdditionally, using \u2318+\u21e7+4 followed by space allows you to capture a specific window of your choice. \nMoreover, you can use the built-in Grab app to take screenshots in the Utilities folder. \nAlternatively, the Preview app has an in-built feature to take screenshots with options such as selecting an area, a window, or the entire screen. \nThe Snip app is another tool you might like, which can be downloaded for free from the Mac App Store. \nYou might consider dedicated screenshot tools like Easycrop, SnapNDrag, Grab, Skitch, or Jing for more advanced functionality like annotations and sharing."},{"question":"how can i do development on my android device?","response":"For Android development, you might consider trying Ruboto IRB, available on GitHub, which allows interactive Ruby scripting and is beneficial for learning and prototyping. \nTerminal IDE is another option, providing a full Java \/ HTML \/ Android development environment directly on Android devices. \nIf you're interested in C#, there's an app called C# To Go that offers a basic C# REPL for experimentation. \nFor various scripting languages like Python, Perl, and JavaScript, SL4a (Scripting Layer For Android) is a noteworthy tool that grants access to Android API and can be integrated with other editors for enhanced functionality. \nWithin the realm of browsers, Aloha Editor is acknowledged for operating in browser environments, with Firefox mobile highlighted for its advanced HTML5 capabilities. \nAIDE is an inclusive application that supports a complete edit-compile-run cycle for Android app development without requiring root access and is compatible with Eclipse project formats. \nFor web server solutions with PHP support, PAW Server for Android is recommended, facilitating web server functions including PHP through a plugin. \nLastly, the Android Web Developer app is specialized for web development featuring support for web languages and offering various project access methods along with code editing and previewing features."},{"question":"is learning cobol worth it?","response":"Learning COBOL might not be worth it according to some perspectives. \nWhile some argue that COBOL cannot be a bad thing and that there is a demand for skilled COBOL programmers, others suggest that it is a dead language and there are better things to learn first. \nIf you envision yourself as a COBOL programmer, then pursuing it could be worthwhile. \nHowever, there's a contrasting opinion that it may not be worth it from a work market perspective. \nHaving COBOL on your resume might not be beneficial in some places and could even be considered a liability. \nAdditionally, some argue COBOL probably isn't the right language, emphasizing that nothing is interesting in it unless you have a real practical need for it. \nOverall, opinions vary, and the decision depends on individual career goals."},{"question":"is it always a best practice to write a function for anything that needs to repeat twice?","response":"It's not always a best practice to refactor code into separate methods solely based on repetition; factors like improving code clarity and modularity should be considered. \nDeciding when to create a function will depend on the actual function. \nAlthough it's one factor in deciding to split off a function, the number of times something is repeated shouldn't be the only factor. \nIt is recommended to use the rule of three: the third time you need the same thing, refactor it into a properly sharable piece, which helps with both readability and manageability. \nIf it makes the code easier to read, then consider creating a function. \nOnly refactor when there's meaningful task separation and potential code co-evolution, ensuring changes remain consistent across function uses. \nIn essence, enhancing readability should be a primary driver when splitting code into a function."},{"question":"is there the dark mode (inverted colors) in the preview application for pdf reading?","response":"Preview currently lacks a dark mode, but for better nighttime screen interaction, you can use flux software to adjust color warmth and reduce brightness. \nAlternatively, iBooks is an option that does offer a dark mode. \nIf you need to invert colors in Preview, the system-wide shortcut Command-Option-Control-8 enables the inversion of screen colors. \nFor Mac users, the Negative app provides two negative modes for PDF reading, including color inversion with sepia, and system preferences allow for the inversion of display colors as well. \nUsers of Adobe PDF Reader can customize settings for a black page background and dark grey document text. \nA browser extension like Midnight Lizard can change colors in PDF documents opened in Chrome-based browsers, and imagemagick can be employed on a Mac to invert colors in a PDF document. \nPDF Expert offers an effective dark mode for reading PDFs and performs smoothly without inverting colors inaccurately, as system-wide inversion might."},{"question":"how can i disown a running process and associate it to a new screen shell?","response":"Utilizing the GNU screen can greatly aid in remote process management. \nAlternatively, reptyr is a tool that enables the transfer of a process between terminals. \nAnother highly effective solution is tmux, which allows session detachment and reattachment across terminals. \nShould you need to pause and then resume a process, sending STOP or CONT signals with kill can achieve this. \nIf you need to inject code into a running process, the tool \"injcode,\" available on GitHub: https:\/\/github.com\/ThomasHabets\/injcode, can facilitate this without the need for prior setup with screen or tmux."},{"question":"are all house keys different?","response":"It's likely each lock\/key combo is pretty unique although some cheap padlocks could have the same shape if the manufacturer is cutting corners."},{"question":"ipv6 address space layout best practices","response":"Best practice is to use a \/127 for P2P links and \/128 for loopbacks, and interfaces that are facing customers should be \/64 if you want to use SLAAC. \n\nThe basic parameters are likely going to be that each subnet must be a \/64 (dictated by IPv6), although you could start at \/56 and try to project what will be used in the next several years and adjust up or down accordingly. \n\nAll subnets (other than P2P links) should be assigned as a \/64 which gives you a ridiculous number of host addresses (a \/48 would give you 65,536 \/64 networks). \n\nIf you are already pretty happy with your IPv4 design, then doing an IPv6 overlay that mirrors things is probably a good option and eases the transition for everyone. \n\nYou should focus on aggregation rather than address space preservation and aggregate every subnet \"living\" in a POP under the same bigger prefix."},{"question":"how big should my time machine backup drive be?","response":"For effective use of Time Machine, you'll need a drive that has 2 to 4 times the space of the data you wish to back up, though for lighter users, you might manage with 1.5 times the space. \nThe larger your backup drive, the more historical data Time Machine can retain, which has practical implications for how long your backups can be preserved. \nIn line with this, the actual volume of the drive is less significant than the volume of data you possess. \nA 240 to 360GB drive could be enough if you only use 120GB of data."},{"question":"why was tanenbaum wrong in the tanenbaum-torvalds debates?","response":"Production became cheaper, and x86 came so close to the price of RISC, that it wasn't feasible anymore to use it. \nThere was also a small vendor lock-in. \nAdditionally, Tanenbaum's stance on microkernels, for instance, was refuted, particularly as the industry moved towards hybrid kernels instead of the pure microkernel model he championed. \nMoreover, Tanenbaum's belief in the inevitable dominance of technically superior solutions in the market was criticized, as evidenced by the rise of Windows with its user-friendly graphical interfaces, which appealed more to consumers compared to traditional text-based systems like Unix and DOS. \nAdditionally, the evolving landscape of computer ecosystems, including the diversification of CPU architectures to cater to different use cases, was cited as evidence that Tanenbaum's predictions did not fully account for the complexities of the industry. \nThe economic aspects of hardware were also highlighted, emphasizing the importance of considering the broader economic implications alongside technical advancements."},{"question":"can facetime calls be tapped?","response":"FaceTime calls are known to have strong encryption which is generally adequate for most users' needs. \nHowever, there is a potential for skilled individuals, equipped with the necessary tools and the inclination to invest time, to crack FaceTime's encryption, although it's unlikely that the average person would be a target for such efforts. \nFaceTime's security is reinforced by the use of end-to-end encryption with AES-256, ensuring that only the sender and receiver have access to the contents of the communication, according to details revealed in an Apple white paper from February 2014."},{"question":"how does ransomware get on peoples computers?","response":"Ransomware typically arrives via emails falsely claiming to have pending invoices attached with Word documents; when these documents are opened, the ransomware installs itself and begins its encryption process. \nIt's not sufficient to avoid ransomware by merely steering clear of downloads from dubious websites; instead, ransomware can also come from trusted sources like the official website of a popular application\u2014as demonstrated by the ransomware infection in the OS X version of the Transmission BitTorrent client through its official website."},{"question":"how to decrease .pdf size without losing quality","response":"To reduce the size of a PDF with high-quality results, you can add a custom filter by creating a new directory (if you don't have it) and adding a new filter file with a unique name and display name, and changing compression settings and image size accordingly. \nIf you're using Adobe Acrobat or GhostScript, adjusting parameters can help optimize file size without stripping away important document structures, and if you created the PDF, reducing images without loss before adding them can be highly effective. \nQuartz filters are another solution that can be installed via a single command line from sources like GitHub. \nThe built-in ColorSync Utility on Apple devices also allows you to create custom filters that can address image data size within PDFs. \n To do this, open 'Color sync utility' and choose Filters and Duplicate Filter Set resolutions, and Image Compression as 'Uncompressed', then Go to Export menu. \nAlternatively, ImageMagick is a tool that can be used to lower a PDF's resolution, thus reducing its size."},{"question":"is it a bad idea for a firewall to block icmp?","response":"Blocking ICMP in its entirety is probably not the best idea, and, some might say, not only useless, but in most cases also harmful. \n\nHowever, it depends on the area in which it is used and since firewalls are able to act on type and code parameters, you can decide what to pass through the firewall and what not; it is probably not wise to use it on border routers, but for internal network diagnostics, yes, it can be used."},{"question":"why does everyone use git in a centralized manner?","response":"Utilizing Git centrally provides the advantage of maintaining a gold standard of the current state of the project, ensuring a reliable reference point while facilitating improved code-sharing mechanisms. \nIn a development environment, where code must converge, a centralized server, often a CI server, is a natural point for code coalescence and building the product. \nThis central repository in Git allows other developers to conveniently pull down changes at their discretion, eliminating the need for constant checks on a central server like SVN. \nPulling \"all colleagues' changes vetted in the central repo\" becomes more convenient and scalable, particularly when there's a lack of specific interest in particular changes or colleagues' work. \nAdditionally, using Git in a centralized manner allows for flexible commit practices, such as squashing work-in-progress commits together. \nThe reliability of a central 'truth' CI server, almost always available, adds to the appeal of the centralized Git workflow. \nBusiness logic also favors a centralized server, aligning with realistic business scenarios, and using Git ensures access to the distributed side for handling complex situations. \nThe decision to use Git centrally is also influenced by considerations of complexity and the need for consistency in the workflow. \nFurthermore, the organizational structure of companies, often centralized, reflects in their workflow, and tools like Git are adapted to this chain of command, with the decentralized aspect often being a feature that may not be needed in such contexts."},{"question":"magic mouse can never reconnect on yosemite","response":"To resolve Magic Mouse connectivity issues, first, turn off the Wi-Fi, then turn it back on and reconnect the Magic Mouse. \nIf problems persist, consider changing the device name to avoid spaces and special characters; for example, rename it to something like \"mymouse\". \nIn some cases, conflicts between Wi-Fi and Bluetooth signals may be causing the problem, so addressing any such conflicts could help resolve the issue."},{"question":"how do i determine the number of ram slots in use?","response":"On Linux, you may determine memory details by utilizing commands like `dmidecode -t memory,` `dmidecode -t 16`, and `lshw -class memory` with root permissions. \nFor those less familiar with shell commands, executing `sudo dmidecode -t memory | grep -i size` can provide a straightforward display of the installed memory module sizes."},{"question":"disable automatic itunes launch when iphone is plugged in via usb","response":"In iTunes, you can prevent the software from automatically interacting with your iPhone by unchecking options such as \"Open iTunes when this iPhone is connected\" or \"Automatically sync when this iPhone is connected\" in the Summary tab, depending on your iTunes version. \nAdditionally, to reduce automatic processes further, consider disabling iTunes Helper by removing it from your Login Items list through the Users & Groups section in System Preferences."},{"question":"how to know if a disk is an ssd or an hdd","response":"To identify the exact model of your disk, you can enter the command \"check cat \/proc\/scsi\/scsi\" in your terminal, which will display the information needed to determine if it is SSD or HHD. \nAlternatively, you can use \"smartctl\" to retrieve vendor information by installing smartmontools and then running \"sudo smartctl -a \/dev\/sdb\". \nYou can also utilize \"lsblk\" from the \"util-linux\" package and execute \"lsblk -d -o name sda 0 sdb 0 sdc 1\" where ROTA means rotational device to determine whether the disk is rotational with 1 (true) or 0 (false)."},{"question":"how does duckduckgo know my native language even though i am using a vpn in a country with a different language?","response":"One possible explanation is that DuckDuckGo is using the headers that are sent in your request to determine their display, for example, your system could be using IPv6 data, which will reveal your home IP as usual."},{"question":"why is root login via ssh so bad that everyone advises to disable it?","response":"Direct root login might lead to increased damage if a brute force attack is successful. \nAdditionally, misconfigurations related to \"passwordless\" SSH keys could unintentionally expose your machine to the internet. \nIt's essential to acknowledge the presence of bots that actively attempt to gain access to computers via SSH by using common passwords like \"root\" or \"password123\". \nRestricting root access over SSH complicates a bot's task as it would then have to guess both a valid username and the corresponding password."},{"question":"whats the difference between eval and exec?","response":"The 'exec' command is used to replace the current shell process with a new one and handle stream redirection or file descriptors if no command has been specified. \nThe 'eval' command on the other hand is used to evaluate strings as commands. \nAlthough both `exec` and `eval` can be utilized to construct and execute commands with runtime-known arguments, only `exec` replaces the current shell process."},{"question":"shortcut key for fullscreen mode","response":"To toggle fullscreen mode, you can use the button in the top right of each window, or the keyboard shortcut, depending on the application. \nFor most applications, the keyboard shortcut is ^+\u2318+F (Control+Cmd+F). \nIf you prefer customizing the shortcut, you can do so in System Preferences by selecting the \"Keyboard\" icon, then the \"Keyboard Shortcuts\" tab, and choosing 'Application Shortcuts'; In this menu, set your desired combination, such as CMD+CTRL+F."},{"question":"installation of macos high sierra update 10.13.4 failed; how do i recover without losing data?","response":"Boot to safe mode by holding shift during power up and restart normally. \nIf you encounter problems with macOS updates, you can use Recovery Mode and restore from a Time Machine backup to resolve the issue. \nRunning First Aid from the Disk Utility when the laptop is in a crashed state can also solve issues without losing data. Alternatively, booting into Recovery Mode using Command + R and selecting Reinstall macOS High Sierra can fix problems while keeping your existing data intact. \nIn some cases, reinstalling macOS High Sierra using Command + R at boot time can resolve an Installer Log error and update the system to the latest version without wiping your drive. \nSetting your startup disk to \"Macintosh HD\" in Recovery Mode and restarting can also bypass error messages. \nSometimes, mounting Macintosh HD in Recovery mode, checking it with First Aid, and restarting the computer can solve the update problem. \nAnother method that may work is choosing Macintosh HD as the startup disk at the installation log and then restarting. \nHolding down the Option key at startup and selecting the original partition can also allow you to boot into your system and update from there. \nIf standard procedures don't work, entering Recovery Mode and using previous backups, despite the loss of recent changes, could be the final workaround."},{"question":"is putty safe to download?","response":"It's nearly impossible to verify that you get a clean copy of PuTTY."},{"question":"when using the single responsibility principle, what constitutes a responsibility?","response":"Understanding what qualifies as a \"responsibility\" in the context of software design's Single Responsibility Principle (SRP) is not unanimously agreed upon, and no concrete scientific or formulaic approach defines it. \nRecognizing responsibilities comes down to a developer's experience and judgment, particularly in anticipating what aspects of the code are likely to change because changes stem from varied business needs. \nThese changes could be driven by distinct factors such as tax rate adjustments, marketing decisions, database optimizations, or the introduction of new platforms like mobile apps. \nDevelopers aim to segregate code into modules where each serves a single business function, safeguarding against the risk that a change instigated by one business aspect inadvertently impacts unrelated areas of the codebase. \nUltimately, the SRP suggests that a class should only encapsulate the logic for one business function to ensure changes come from a single, cohesive group, thus maintaining a modular and less tightly coupled system."},{"question":"how to redirect output to a file from within cron?","response":"There are two ways: change the redirection from &>> to 2>&1; change the default shell by adding SHELL=\/bin\/bash in the crontab -e file. \n\nMake sure your shell redirection syntax conforms to \/bin\/sh."},{"question":"is 000 a valid cvv code?","response":"000 is perfectly valid, and you can't be sure if a credit card's codes are valid until you try."},{"question":"search for military installed backdoors on laptop","response":"To verify the integrity of a laptop suspected of having been tampered with, it's crucial to check the weight distribution by verifying the precise weight of each component such as ICs and PCB. \nIt's also suggested to examine the power usage over time to detect backdoors, as they often consume power, though this is not a completely reliable method due to the minimal power usage of modern integrated circuits. \nAdditionally, one can use X-ray inspection to view the internals of a multi-layer printed circuit board, though this method is intensive and requires specialized equipment and skills. \nGiven that searching for, tampering with, or removing computer or monitoring devices can be perceived as a criminal act, and any overt action can appear suspicious, a more subtle approach is advised. \nDetecting hardware changes is difficult, so it's more likely that a device gets compromised through software installation if it was only taken for a short period. \nTo ascertain if your device's network activity is suspect, you should connect it to a router that records traffic and validate IPs with registries such as ARIN. \nHowever, it's also wise to reflect on your risk profile and whether it's practical to assume that a sophisticated, expensive hardware implant has been used against you. \nA diligent approach to checking for a backdoor involves monitoring network chatter through your router."},{"question":"why shouldnt we roll our own?","response":"Rolling your own or creating a secure encryption algorithm can be a difficult and risky endeavor if you are not a security or cryptography expert, as you may inadvertently introduce major security vulnerabilities. \nIt is generally not advisable to gamble on encryption, especially when the stakes are high and the payoff does not justify the potential risks involved. \nCrafting an encryption system that no one can decrypt is a particularly challenging task even after having significant expertise and years of analysis by the cryptographic community. \nHowever, it's essential to understand that no one can foresee all potential attacks, making solitary attempts at creating secure cryptographic systems impractical. \nIt's generally advised to rely on publicly vetted and expert-reviewed encryption methods rather than attempting to design your own encryption, which is an error-prone process that experts avoid. \nMoreover, the process becomes even more challenging when designing systems robust against attackers with insider knowledge. \nDespite these challenges, experimenting with your own cryptography can be a valuable learning experience, provided the resulting code is not used in real applications."},{"question":"how can i view hidden files in the finder?","response":"To enable the Finder on your Mac to display all files, including those that are normally hidden, you can execute the following command prompt in Terminal: defaults write com.apple.Finder AppleShowAllFiles -bool YES; killall -HUP Finder. \nAlternatively, as a simpler and safer approach, you can navigate to the finder menu bar, select \"Go\/Go to folder\", Type the path to the invisible folder, in this case the top directory first slash of \/folderName\/, and it will reveal the contents without using the terminal. \nAn even quicker method is to navigate to Finder, click on Go Hold down Option key, and hidden directories & files will appear. \nTo toggle the visibility of hidden files in Open\/Save dialogs, a shortcut involving CMD\/shift\/.(period) can be used. \nTo hide defaults again, write com.apple.finder AppleShowAllFiles -bool FALSE killall Finder."},{"question":"ssh-add complains: could not open a connection to your authentication agent","response":"Try $ ssh-agent \/bin\/sh and then $ ssh-add [yourkey]. \nIf you're running the C shell (csh) on FreeBSD PI, initiating the ssh-agent can be done with the command eval `ssh-agent -c`. \nFor Git users on Windows, go to the Git installation directory, C:\\$Installation_Folder$\\Git\\cmd, and execute start-ssh-agent to run the ssh-agent correctly. \nAlso, if you're performing git operations with sudo, you can start the ssh-agent with superuser rights by running sudo ssh-agent bash, which gives root access and allows operation without the frequent need for sudo."},{"question":"why doesnt java 8 include immutable collections?","response":"Immutable collections require sharing to be usable, as creating a new list for every operation would be inefficient and create excessive garbage. \nThere cannot be an \"Immutable Collection\" interface, because immutability is a nature of an implementation, not a characteristic of an interface. \nTrue immutable collections in Java would need to be final classes rather than interfaces, to ensure their immutability."},{"question":"how can i remove the bom from a utf-8 file?","response":"The tool \"dos2unix\" is capable of removing Byte Order Marks (BOMs) that don't align with UTF-8 encoding, often introduced accidentally by certain software on Microsoft operating systems."},{"question":"how does a segmentation fault work under-the-hood?","response":"The MMU within the CPU sends a signal, and the kernel then directs this to the terminal program, resulting in its termination. \nThe kernel uses signals to handle events like page faults or access violations. \nDepending on whether the program has a signal handler installed, the program may either fix the error and continue running or if no handler is present, the program is simply terminated. \nIn cases where the signal is ignored, this could lead to infinite loops on some architectures."},{"question":"will erase iphone delete icloud?","response":"Erasing your iPhone won't affect your iCloud data. \nSimilarly, factory resetting your iPhone does not impact your iCloud."},{"question":"how can i argue against: system is unhackable so why patch vulnerabilities?","response":"You can argue that you want a multi-layered security strategy with defense in depth, and consider the business impact of the worse-case scenario if your firewall has a security vulnerability, in terms of costs due to lost revenues, legal\/regulatory fines, or damage to the company's image in the industry."},{"question":"how to transfer files from pc to android emulator?","response":"To transfer files to or from an SD card image when using an emulator, you should utilize the adb push command to copy files from your desktop to the emulator, and adb pull to copy in the opposite direction. \nYou can also make transfers using the DDMS UI, albeit only one file at a time. \nFirst, in the Devices tab, select the emulator that you want to view the file system for, then locate the file in the File Explorer and click the Pull file button. \nFinally, to copy a file to the device, click the Push file button on the File Explorer tab."},{"question":"ssh key-type, rsa, dsa, ecdsa, are there easy answers for which to choose when?","response":"DSA and ECDSA keys are of fixed length and are considered US government standards, while RSA is better known and allows for longer key lengths, making it arguably more secure due to its more extended key capability. \nRSA keys are known for their widespread compatibility, working across various platforms, whereas ECDSA is a newer option that is not as widely supported yet, with some older systems potentially experiencing difficulties. \nRecent changes in OpenSSH 7.0 and higher no longer allow the use of DSA keys by default, even though it used to work everywhere as per the SSH standard. \nECDSA keys are comparatively smaller for a similar level of security, but like DSA, they are vulnerable to poor random number generation, which can compromise the key. \nFor practical compatibility and to avoid potential issues with different systems and services, RSA is recommended over DSA or ECDSA."},{"question":"when to choose fiber instead of twisted pair (copper)","response":"Copper has a shorter max distances per link than fiber, and is susceptible to electromagnetic interference; copper also has the disadvantage that when running data cabling between different electrical bonding zones (e.g., buildings with different electrical earths), different ground potentials might try to equalize over the copper cable. \n\nIf you are going to run FCoE over the medium, then it is better to run fiber than copper as the BER for copper is significantly higher and most of the time will be outside of the tolerance for the \u201clossless\u201d nature of FCoE. \n\nFiber beats copper as soon as distance becomes a factor, allowing for much longer max cable length distances, depending on the specification and throughput, and does not suffer from electromagnetic interference, so is particularly suitable for high electrical noise environments, and is recommended for backbone cabling where the long haul is needed; fiber also allows for wavelength division multiplexing (WDM), which you can't use with copper. \n\nFiber is even recommended for a short run between two cabs in a DC between core routers. \n\nAnother factor is that people are more afraid to touch a fiber cable compared to copper, so you'll get less of the \"Oops, I didn't realize that was the switch uplink\"."},{"question":"how do i equally balance tmux(1) split panes?","response":"Use the shortcut ctrl-b space to cycle through layouts with even spacing. \nYou might consider scripting a custom layout and binding a key to execute it if you need a specific arrangement, as suggested by tmux command pipe-pane used to save the layout to a script. \nA command line option available is the tmux select-layout tiled, which evens out the sizes of your panes, and this can be assigned to a hotkey for convenience. \nFor mouse users, pressing ctrl b, followed by the command \"resize-pane -M\", allows you to resize panes using the mouse, assuming mouse mode is active."},{"question":"\/usr\/bin vs \/usr\/local\/bin on linux","response":"Most software packages provided by the distribution usually land in \/usr\/bin\/. \nHowever, when it comes to system-specific and manually installed scripts, you would place them in \/usr\/local\/bin\/. \nIn terms of hierarchy, \/usr\/bin\/ is the primary directory for executables that are required by normal users and not necessary for booting the system or system restoration. \nOn the other hand, \/usr\/local\/bin\/ is reserved for binaries and non-binaries specific to the local system. \nThese distinctions maintain order across different system directories and align with the filesystem hierarchy standards."},{"question":"where can i find my crash logs?","response":"To locate your crash logs, you can open the Console app, which is found in the Applications -> Utilities directory to display all system messages, including crash information. \nAdditionally, check the ~\/Library\/Logs or \/Library\/Logs directories to see if crash logs are stored there. \nSpecifically, crash logs may be present in the ~\/Library\/Logs\/DiagnosticReports\/ directory, where ~ represents your Home directory."},{"question":"how to buy an app for a friend?","response":"Google Play Gift Cards have become widely accessible in numerous countries, which enable you to buy an app for your friend or relative."},{"question":"is the aes iv secret?","response":"An initialization vector (IV) usually does not have to be kept secret, but should not be reused with the same key to maintain security. \nWhen storing an IV, there is no need to encrypt it, provided it is random; only the key requires secure storage. \nFor certain encryption modes like CBC, the IV must be unpredictable to thwart active attacks."},{"question":"can i connect an android phone to an external monitor, keyboard and mouse?","response":"To meet these needs, the Motorola 'Atrix' phone is a device that has been recently showcased, with its release anticipated for later in the year. \nSamsung Galaxy S can connect to a TV through the use of a Micro USB to HDMI cable. \nSamsung also offers a dock for the Galaxy Tab, which enables it to connect to a full-size keyboard, positioning the screen similarly to that of a laptop. \nAdditionally, various Android devices, including the Galaxy Tab, have video or HDMI out features, and Bluetooth can be used for keyboard connections. \nThe Asus EEE Pad Transformer is another device that aligns with user requirements and is currently available. \nYou can find demonstrations online, like the one for Ubuntu for Android, showing how an Android phone can be turned into a fully functional desktop while simultaneously functioning as an Android phone. \nThe Samsung Galaxy Nexus setup allows for the use of Bluetooth peripherals and an external monitor, providing a simple solution without the need for special drivers or applications."},{"question":"how do you hide your best friends on snapchat?","response":"You cannot hide the best friends list in snapchat, although you could block the users to remove their name from the list."},{"question":"how api works in website?","response":"A Web API is just an Interface to allow access to your system such as a website via standard HTTP request methods."},{"question":"how do i zip\/unzip on the unix command line?","response":"To zip files in a compressed format, the GNU tar program is generally used with the following syntax: tar -zcvf myfile.tgz, which will compress the current directory, or you can specify other filenames to compress. \nTo unzip the compressed file, the command tar -zxvf myfile.tgz is employed. \nTypically, tar is used to create an uncompressed archive, which can then be compressed using either gzip or bzip2. \nTo decompress these archives, you would use the gunzip and bunzip2 commands, respectively. \nIf dealing specifically with the Zip file format, the zip and unzip commands are the straightforward choices for compression and decompression. \nThe pax utility is often recommended over cpio and tar for its ability to archive files and compress the archive, differentiating it from the process of zipping, where each file is compressed individually before archiving. \nThe unzip and zip -r archive.zip commands can be employed to simplify archive creation on the command line, provided they are available on your system. \nA tool like 7-zip, typically included in the package p7zip, offers commands such as 7z and 7za for creating and decompressing 7z archives, as well as support for standard zip archives. \nShould you lack the zip and unzip packages but have Java, the jar utility can be used as an alternative for unzip operations with the syntax jar -xf file.zip. \nBSD Tar is also capable of creating and extracting archives using commands like bsdtar -a -c -f for compression and bsdtar -x -f for decompression for additional flexibility. \nAn example of using the zip command to compress a list of modified files with an intermediary text file listing all files to be zipped can be realized using the command cat modified-files.txt | zip modified-files.zip -@. \nWhen extraction is the sole concern, dtrx is a tool that simplifies the process by automatically handling different archive formats and necessary actions."},{"question":"do ibooks backup to icloud?","response":"PDF files and non-iTunes store eBook content are backed up to iCloud."},{"question":"should i disconnect my macbook pros power cord when the battery is fully charged?","response":"It's unnecessary to detach the battery on your MacBook Pro as it ceases charging once full, and modern Apple batteries are designed smarter than earlier versions. \nHowever, for optimal care of your MacBook's battery, it's advisable not to charge it fully, and instead, you can disconnect it after reaching 90% or more. \nFinally, the chemistry of lithium batteries does not necessitate periodic cycling to maintain capacity."},{"question":"what does lc_all=c do?","response":"It is assumed that ANSI-C might have defined the \"POSIX\" locale, which is related to the C default locale. \nAn application's output language defaults to the system's default when the LC_ALL environment variable is set to a particular locale. \nThe LC_ALL environment variable is paramount as it has the capability to override all other localization settings, except for $LANGUAGE, under specific conditions."},{"question":"adb is not working in android studio?","response":"Android Studio does not include ADB; instead, you need to get it through the Android SDK, which is typically set up the first time you run Android Studio version 0.9.x or newer. \nWhen using a physical device with Android Studio, ensure that debugging mode is activated, which permits Android Studio to access the device."},{"question":"how to respond when you are asked for an estimate?","response":"When asked for an estimate, the approach depends on the organization and how the estimates are used. \nIf the estimate is intended to provide a general idea of when a task will be ready, a quick estimate based on experience is generally feasible. \nIt is common practice to include any uncertainties or possible variations with the estimate, along with an assessment of how changes may impact other areas of the system and the extent of regression testing required. \nHowever, if the estimate is for contractual purposes or in a scenario where more precise timing is necessary, a comprehensive work breakdown is undertaken. \nResponding confidently is key, projecting professionalism while delivering the estimate. \nIt is advised to always provide a range, indicating both lower and upper bounds to account for potential variations. \nEven if the numbers are somewhat speculative, maintaining a balance is crucial to avoid estimating oneself into a difficult situation."},{"question":"why ospf has area 0?","response":"The primary function of designating Area 0 as the backbone in OSPF is to maintain a consistent SPF calculation across the network and to avoid the creation of routing loops. \nThis is achieved by permitting the avoidance of the \"counting to infinity\" problem commonly associated with distance-vector protocols. \nAdditionally, by limiting the topology to a simple hub and spoke configuration, OSPF effectively eliminates redundant paths, thereby preventing potential 'count to infinity' issues."},{"question":"how to use wildcards (*) when copying with scp?","response":"To correctly use scp and prevent the remote machine from interpreting the asterisk as a glob character, it is necessary to pass a literal escape. \nQuotation marks around the file pattern are recommended since they negate the need for a backslash before the asterisk. \nWhen scripts incorporate variables in the file path that need to expand, using double quotes is advisable, lest single quotes prevent the variable expansion. \nNote that scp only supports wildcards for file names but not for directory names."},{"question":"how can i set up a keyboard shortcut for switching input source?","response":"For input source toggling in System Preferences, navigate to Keyboard \u2192 Shortcuts \u2192 Input Sources and define a keyboard shortcut there. \nIf you are using Apple's Bangla keyboard, you can type English by holding down the Option\/alt key, or with the Bangla Qwerty keyboard, do this by pressing the Caps Lock key. \nAdditionally, IMEShortcuts is a tool that lets you assign shortcuts to specific input methods, making it quicker to switch among them."},{"question":"timezone setting in linux","response":"The \"tzselect\" command is designed to assist with the task you are trying to accomplish. \nTo set the timezone in Ubuntu, you merely need to substitute 'Asia\/Tokyo' with your preferred timezone."},{"question":"is anaconda safe to install?","response":"Yes, it is safe to install Anaconda; however, there is no such thing as a 100% guarantee of security. \nInstalling any software, including Anaconda, on the same device used for online banking may not be entirely \"safe\" in the sense of having no risk at all, as you can't be certain about what the software is doing."},{"question":"what is mail, and how is it navigated?","response":"The \"mail\" command is described as an intelligent mail processing system that is especially useful when writing shell scripts or cron jobs. \nThe \"mail\" program should ideally align with the POSIX\/SUS's mailx program, but the user may need to navigate any differences that arise."},{"question":"hardening linux desktop machine against people from my household","response":"First, use a strong and difficult password for the root user. \nSecondly, always login and work from another user with no administrative rights. \nRemove other users' admin access, lock down each users' account, and put protections in place to prevent abuse. \nEnable the BIOS password option. \nDisable automatic booting from USB, CD and network. \nA good idea is to access the data from a Live DVD\/CD only (mark a CD-R with a sharpie so you can tell if it's been swapped). \nOr keep the system partition (or just the bootloader, kernel and initial ram disk) on a very fast USB disk so you can take it with you. \nAlternatively, encrypt your Linux partitions but use a script to change the password every time. \nIt is a good idea to download your Linux distro on a trusted computer, and remember not to type on physical keyboards (or at least use a wired one, not a wireless one. \nA security-focused distro might also be an option, like Kali or Ubuntu Privacy Remix. \nTwo more suggested programs to use are Qubes OS and antievilmaid. \nThere are plenty of other methods you could use, including creating a TrueCrypt hidden container, then installing your guest inside that container. \nYou could put a small lockbox containing the external encrypted hard drive in the glove compartment of your car and work solely off that. \nUse a hot-swap cage for your hard drive, and remove the hard drive when not in use. \nA simple suggestion is to buy a notebook or cheap single-board computer and carry it around with you; don't store sensitive data on a shared machine. \nThe best defence is a good offence: set a trap with a camera."},{"question":"what leads to windows thinking i pressed the insert key on a macbook pro?","response":"On Apple hardware running Windows natively, the key combination \"fn + return\" acts as an Insert key press. \nAnother key combination that results in the Insert function is \"fn + i\" on Windows. \nAlternatively, \"Fn + m\" can be used as an Insert key if the numeric keypad is activated and NumLock is off. \nIn a specific scenario using Midnight Commander on OSX Yosemite, \"ctrl-T\" simulates the Insert key press. \nHowever, some users have declared the key combination \"option + command + i\" the best option. \nLastly, the \"Fn+Shift+return\" combination on an Apple Wireless Keyboard with a non-Apple device, like an Ubuntu-running Dell laptop, offers the same functionality as \"shift + insert\" on Windows."},{"question":"how to remove a single line from history?","response":"Use the command `history -d linenumber`. \nMoreover, to manually edit or remove specific entries, you can access and modify the `~\/.bash_history` file. \nIf you wish to employ the -d option to remove a single line or clear all commands using the -c option, these actions can be performed from the terminal command line."},{"question":"why wont closing the lid sleep my macbook pro with external monitor attached after upgrading to lion?","response":"Unfortunately, it is currently impossible to change the behavior that prevents a MacBook Pro from going into sleep mode when its lid is closed while an external monitor is attached following an update to Lion, unless you wish to make other changes or run additional scripts. \nSome users attest that disconnecting the power cord before closing the lid will make the computer go into sleep mode. \nThere is also a workaround available which involves using a script that sends the computer to sleep if it detects that the laptop's display is inactive."},{"question":"how can i add new folders to the favorites in the finder sidebar?","response":"To add new folders to the Favorites in the Finder sidebar, simply drag the folder to the desired position in the sidebar. \nIf the folder doesn't show the \"horizontal location-line\" graphic, making it seemingly impossible to attach it to the sidebar, try dragging a folder within the folder into the sidebar and cancel that action when you see the location line graphic; then, attempt to drag the main folder onto the sidebar again."},{"question":"image capture opens after iphone is connected","response":"When you have your iPhone connected to iTunes, make sure to check in iPhoto's preferences and select \"No Application\". \nAdditionally, it's possible to select \"Other\" and then iTunes from the drop-down menu when connecting the iPhone. \nIf you're looking for specific preferences, you will find them in Image Capture itself."},{"question":"how to add repository from shell in debian?","response":"The add-apt-repository command, which can now be found in the software-properties-common package, simply executes a couple of commands to add the repository: append the repository to \/etc\/apt\/sources.list and add the repository key to the machine. \n\nIf you're running a non-ancient version of Debian (Etch or later), you can just drop a file in \/etc\/apt\/sources.list.d\/."},{"question":"creating database connections - do it once or for each query?","response":"Creating one connection per query or transaction is considered best practice when working with databases as it is much easier to manage \"closing\" the connections. \nHowever, in striving to optimize code by reusing the connection object, you gain efficiency in the small thing at the expense of the much bigger thing and it may lead to performance issues, especially since it does not allow the ability for the ADO.Net connection pool to effectively manage the important underlying connections."},{"question":"how can i delete a word backward at the command line (bash and zsh)?","response":"\"Alt+Backspace\" is a functioning shortcut for deleting the previous word in bash and zsh shells. \nAn alternative method in some environments is the use of Ctrl+W, which is recognized as the standard command to kill the last word you typed. \nFor Mac users, this action can be performed by pressing \"Fn+Delete\". \nAdditionally, terminal emulators may have their own specific shortcuts, and sometimes you can customize them within your settings or by modifying files like \"~\/.inputrc\". \nIt\u2019s even possible to configure the 'stty' command to change the default key bindings for word deletion or line deletion."},{"question":"which ipods are no longer supported?","response":"The iPod Classic is not supported by the current software, and Apple Support indicated that there is no backward compatibility available; they advise purchasing a new iPod model. \nFor users with older iPod models, it's noted that they can no longer sync with the latest iTunes version, but an older version of iTunes installed on a Windows PC could resolve the issue. \nHowever, for managing an iPod Classic, the use of a third-party music manager, like transpod, is recommended as an alternative to the current iTunes software, especially for users who do not have an older iTunes version."},{"question":"what all does adb backup and how do i restore part of it?","response":"When you use ADB backup with the appropriate command line switches, it allows you to backup both the apps themselves (.apk files) and their associated data. \nIf necessary, it's also possible to perform a partial ADB restore or to backup and restore Android settings and applications via ADB."},{"question":"is using dot and at in email addresses in public text still useful?","response":"Yes, it might still have an impact, though it has probably never been very useful as email harvesters have probably long been scanning for that obfuscation; it is better to use some fancy advanced munger, or simply use images."},{"question":"how do i open the context menu from a mac keyboard?","response":"To emulate a right-click on a Mac, you have several options depending on your preferences and setup, and a common strategy is using various programs to map the right click onto various keys or combinations of keys: people have reported using Better Touch Tool to assign a custom gesture for right-click functions; using Alfred with RightClick workflow to trigger a right click on Option+CMD+Enter; using Shift+F10 (using the Fn key if needed) in Word 365 on Mojave; and using CLion to remap the right click to a hot key. \nAlternatively, some users have created scripts to do this using AppleScript (available in Github) or Hammerspoon. \nStill others have noted that the context menu, typically accessed by a right click, can be opened by using keyboard shortcuts such as Ctrl+5 or Fn+Ctrl+I if you have enabled Mouse Keys in the Universal Access settings, and that Mac OS X native features also allow you to map a \"context click\" to a specific key combination; some have also reported that Fn+Shift+F10 works for many windows on a Mac. \nSome users have found workarounds through online resources like cnet, although these may require looking in different screen areas for commands."},{"question":"why isnt udp with reliability (implemented at application layer) a substitute of tcp?","response":"Both protocols are designed with certain guarantees and raw TCP has more guarantees than raw UDP. \nUDP with reliability can indeed be a substitute for TCP. \nHowever, in general, TCP is pretty optimal so it's not worth going to all the extra work and adding a (large) chance of adding bugs and security flaws."},{"question":"im doing 90% maintenance and 10% development, is this normal?","response":"Doing 90% maintenance and 10% development, especially in the initial phases of a career, is a situation that many freshers face. \nIt might indicate a challenge in workload management and task prioritization by the management. \nWhile your situation is a bit edgy, it is still considered normal, particularly for an entry-level position. \nEmbrace it as a building block for your future career, as entry-level employees often find themselves handling tasks that others might not prefer."},{"question":"are macs vulnerable to the bash shellshock bug?","response":"To determine if your system is affected by the \"Shellshock\" vulnerability, a specific command can be typed in your shell: env x='() { :;}; echo vulnerable' bash -c 'echo hello', and if it says vulnerable, then you are vulnerable. \nAccording to another opinion, all Mac OS X machines are technically vulnerable to \u201cShellshock,\u201d until Apple issues a security update. \nHowever, it is advised that you are only truly vulnerable if someone you don't know can remotely access your machine and in such a way to be able to execute a Bash command. \nThis means that your desktop Mac, which really does not run server applications of any kind, is not at any serious risk. \nAs an end-user, it is recommended that is safer to await an official security update from Apple."},{"question":"how to view root directory and subdirectories in finder?","response":"To view the root directory and subdirectories in Finder, open Terminal and enter `sudo chflags nohidden directoryname` or sudo chflags nohidden \/usr to unhide a specific directory. \nIf you want to unhide the entire root directory and its subdirectories, use the command `sudo chflags -R nohidden \/*`. \nIn Finder, you can press Shift-Command-G to bring up the \"Go to folder\" dialog, where you can enter the path to the directory you want to access. \nAnother approach is to run the command `defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder` to show hidden files and directories, including the root directory. \nFor newer macOS versions like High Sierra, you can open Finder, go to preferences, navigate to the Sidebar section, and add the directories you want to appear in the sidebar."},{"question":"prevention measures against laptop seizure at us borders","response":"Full disk encryption (FDE) is recommended, which can be at three levels, the third involving a third-party not subject to US jurisdiction having the key: creating a second key before you leave home and leaving this with a trusted person means you cannot access the data either, or send a non-memorizable keyfile to your destination. \n\nHowever, others suggest the best way to protect against a border search of your data is to not have anything suspicious on the hardware you take through customs; using encryption technology will most likely raise suspicion in the first place."},{"question":"do gpus work with bootcamp?","response":"Yes, in general, external GPUs work with Boot Camp."},{"question":"what characters do i need to escape when using sed in a sh script?","response":"When constructing a sed expression and you do not need to interpolate shell variables, it is advised to enclose the entire expression in single quotes to ensure the contents are interpreted literally by the shell. \nFor expressions requiring variable interpolation, only the variable part should be in double quotes to prevent the shell from misinterpreting certain characters."},{"question":"terminal prompt not wrapping correctly","response":"Your issue may stem from incorrect COLUMNS & LINES environment variable settings, which usually adapt automatically when resizing the terminal but can be manually set with the `resize` command. \nTerminal prompts should enclose non-printable sequences within `\\[` and `\\]` to make bash recognize the actual prompt length (with \\r\\n outside of the \\[...\\]) or alternatively, use `\\001` and `\\002` instead of `\\[` and `\\]`. \nIn scenarios where the size of the window assumed by the terminal is not the same as your actual window size, use `$ shopt checkwinsize` in bash to correct the terminal's understanding of the window size. \nFurthermore, complications can arise from using wide unicode symbols, and in such cases, escaping 2 out of 3 of these symbols is recommended to provide bash with an accurate character count."},{"question":"what does systemctl daemon-reload do?","response":"The process of executing `systemctl daemon-reload` involves re-running all generators, which dynamically generate unit files and manage additional dependencies. \nThis action allows systemd to incorporate changed configurations, reloading unit files, and recreating the dependency tree without affecting sockets listened to by systemd on behalf of user configurations. \nGenerators play a crucial role in this process, converting non-native configuration files into native unit files and can be found in specific directories like \/usr\/lib\/systemd\/user-generators\/."},{"question":"how to do ipconfig on android?","response":"In order to manage network configurations on an Android device, one can install the Terminal Emulator and enter the command \"ifconfig eth0\" for interface details. \nAdditionally, the free application, OS Monitor by eolwral, is useful for monitoring various network interfaces, along with their traffic statistics, and offers the feature of viewing open connections. \nA simple command \"netcfg\" is also a solution, which lists the network interfaces and can be run on any terminal emulator on the device or remotely via adb."},{"question":"what does stage mean in git?","response":"In the Git version control system, the term \"stage\" refers to the process of preparing a file for a commit. \nImagine staging as a dump truck ready to move the work you load into it. \nThis step, occurring before the commit process, is akin to a loading dock where you have control over the changes that will be shipped away. \nWhen you stage a file, you meticulously prepare it, creating an intermediate step between completing your work and making a permanent commit to the repository. \nIt's essentially an unnamed, uncommented local commit that provides a transitional state in your local repository."},{"question":"use an android tablet as a wacom drawing tablet for a pc?","response":"The GfxTablet project enables you to use a tablet as a drawing device on a network-based platform. \nTouchscreen tablets differ greatly from drawing tablets like Wacom's, as touchscreen devices lack features such as pressure sensitivity, angle detection, and hovering capabilities, which are essential for precise artistic work. \nFor those seeking Samsung devices with drawing functionalities similar to a Wacom, the Samsung Note II offers pressure sensitivity and includes a Wacom digitizer. \nAnother alternative for tablet drawing is the Virtual Tablet app, which is freely available on the Google Play Store and promises a satisfactory but not flawless experience. \nFor collaborative drawing across devices, the Explain Everything app is a solution, or Microsoft Office for Android, which has robust drawing features and enables syncing with desktop versions."},{"question":"my isp uses deep packet inspection; what can they observe?","response":"Deep packet inspection involves analyzing all of your traffic, including details like the IPs you are connecting to, port numbers, protocols, and other specifics about the network connection. \nDespite encryption like HTTPS, metadata can still be read by your ISP. \nWith deep packet inspection, everything you do, if transmitted in plain text, can be seen. \nAn ISP can detect the presence of VPN traffic, although not the encrypted data within the VPN packets, and may even block such traffic."},{"question":"is charging my iphone all night harmful?","response":"It is not harmful to leave a modern phone charging overnight. \nModern phones have mechanisms that prevent them from overcharging once the battery is full. \nStill, removing protective cases that retain heat might be better to avoid overheating. \nNightly charging, typical behavior for many users, does not tend to harm battery life with current technology, particularly lithium-ion batteries. \nHowever, long-term habits of overnight charging could potentially shorten a battery's lifespan."},{"question":"agile for the solo developer","response":"The concept of \"Cowboy Development\" refers to a form of Agile tailored for solo developers. \nAn alternative to structured Agile methodologies could be to work in well-defined sprints or deliberately adopt a Kanban approach. \nAgile is effective for both teams and individuals, as it focuses on adapting processes to meet changing project requirements and continuously delivering value. \nA critical aspect of most Agile methodologies is unit testing, which ensures the integrity and functionality of code throughout development."},{"question":"how did google know i looked something up?","response":"The reason websites may know about your visit is primarily due to their use of Google tools, such as Google Analytics or advertising services, which provide them with visitor information. \nContrary to some beliefs, Google does not know the specifics of your searches; it is only aware of your visits to websites that share this data, and such information does not include details from search engines like DuckDuckGo that conceal your queries. \nAdditionally, Google and other platforms utilize \"retargeting\" strategies, allowing them to display targeted advertisements based on your previous site visits, across various unrelated websites within the same ad network. \nThis is due to Google's algorithms selecting the most profitable advertisements to display based on user activity. \nThe inclusion of tracking tags from Google, as well as other Demand Side Platforms (DSPs) and Data Management Platforms (DMPs), on websites, contributes to this targeted marketing, affecting what ads you see online."},{"question":"how to convert a heif\/heic image to jpeg in el capitan?","response":"Users advise that tifig is an excellent command line tool that works very well, as it is fairly straightforward to compile on modern platforms, including El Capitan. \nAdditionally, ImageMagick is a recommended command line tool option for converting HEIC images to JPG. \nFor users operating macOS Big Sur, using the terminal with sips commands offers a native method for image conversion from HEIC to JPEG, with the ability to process batches of files and even remove the original files."},{"question":"why not allow spaces in a password?","response":"For security concerns, it discourages people from using actual sentences as passwords which could be insecure if they had real meaning. \nMoreover, there is nothing insecure about a space in a password if it maintains good entropy. \nBanning space characters in passwords is generally a bad password policy. \nPasswords with leading and trailing spaces may cause issues for individuals who frequently copy and paste without care. \nThe issue with spaces in passwords relates to programmatic semantics. \nSpaces and certain special characters may be processed differently across various computing platforms. \nFrom a convenience standpoint, not having spaces in passwords is a very good policy, especially as seen from the perspective of customer support. \nThe Space key on a keyboard often makes a distinctive sound that can aid someone in guessing the structure of a password when heard."},{"question":"what directory comparison tools can i use on os x?","response":"Tools like Diffmerge, rsync, Beyond Compare and the Changes app are suitable for comparing directories in OS X, with the latter two being available for purchase. \nMeld and FreeFileSync are recommended open-source tools that serve the same purpose. \nAdditionally, macOS and Linux users have a built-in utility that allows the use of the diff command to compare directories directly from the terminal."},{"question":"how to download from google play store without wifi?","response":"In order to update apps regardless of whether you're on Wi-Fi or using cellular data, you have to adjust the auto-update apps setting to 'Auto-update apps at any time'."},{"question":"run a command without making me wait","response":"To run a command in the background, the ampersand (&), or occasionally percentage (%) symbol is appended at the end of the command in the syntax: 'long_command with arguments > redirection &'. \nAdditionally, there are tools like `screen` or `tmux` that allow for detaching the entire shell from the background process, which can later be re-accessed, even from a different computer, for example, `$ tmux new -d 'longrunningcommand'`. \nUsing `nohup` before the command, followed by '&', ensures that the process continues even if the current shell is closed, and it records the output to a log file, nohup.out. \nThe standard output (stdout) and standard error (stderr) streams can be redirected to files to avoid cluttering the terminal, using `>` for stdout, `2>` for stderr, and `&>` for both. \nWhen redirecting both stdout and stderr to a single output file, the syntax `command > output.log 2>&1 &` is used."},{"question":"where does lineageos store update files?","response":"The updates are located in the \/data\/lineageos_updates directory as of August 31st, 2017."},{"question":"ntoskrnl is using port 80?","response":"It could be a false positive. \nHowever, it can be fixed by disabling the service and changing its startup type from automatic to manual."},{"question":"how to create nested directory in a single command?","response":"The command uses the -p option, and should be: sudo mkdir -p x\/y\/z."},{"question":"file cant be moved by root on os x","response":"If you encounter security restrictions on OS X 10.11 or newer while trying to modify certain files, you can disable this security feature by booting into recovery mode and using a Terminal command: csrutil disable. \nAnother method to modify restricted files is to start the terminal in Recovery Mode and delete the file. \nFor directories that have been locked due to the system's user-level flags, you can execute the command chflags -f -R nouchg directory on a higher-level directory to prevent the problem. \nIt's also advisable to check if the folder containing the file you wish to modify is locked; to do this, use the 'get info' function in Finder and ensure the locked checkbox is not marked. \nIn cases where you are unable to delete a file through the terminal, you may have success by using Finder to delete the entire directory that contains the problematic file."},{"question":"tmux status-bar corrupted after catting a binary file, how to reset?","response":"You may have to invoke stty sane at the command line which will reset the in-kernel TTY drivers to some set of default values that usually let you proceed. \nIf the TTY drivers are messed up enough, you may have to type stty sane \"blind\", that is, without on-screen feedback."},{"question":"how do i use pushd and popd commands?","response":"The commands pushd and popd facilitate modification of the directory stack, allowing for a structured directory manipulation that maintains a history of visited directories. \nThese built-in shell commands, including dirs, enable users to switch between directories, ensuring a return to the original point of departure. \nOne can efficiently manage directory changes by utilizing pushd instead of cd, while popd is employed to reverse these changes, removing directories from the stack. \nThe functionality of these commands extends to creating shortcuts for frequent directory access within terminal environments, streamlining the process of moving between recently used directories. \nThese tools prove especially useful for navigating complex directory structures, where simple back-and-forth movements between locations are insufficient, offering greater flexibility and efficiency in directory management."},{"question":"what is b in grep?","response":"In regular expressions, the term \"\\b\" signifies a \"word boundary,\" and the command searches for all words i in the file linux.txt."}] \ No newline at end of file