-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
51d75da
commit 4d8ba4b
Showing
2 changed files
with
10 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"name":"rm -rf /","tagline":"by NeQuissimus","body":"# Prevent Spotlight indexing\r\n##### (Apr 16, 2014)\r\n###### OSX\r\n\r\nCreate a file `.metadata_never_index` in a folder and its contents (recursively!) will be ignored by Spotlight indexing.\r\n\r\n# Send/Receive SNMP traps\r\n##### (Sep 17, 2013)\r\n###### OSX, Linux\r\n\r\n_~/.snmp/snmptrapd.conf_\r\n\r\n```bash\r\ndisableAuthorization yes\r\ncom2sec local 127.0.0.1/32 public\r\ncom2sec local 10.30.68.0/24 public\r\nview all included .1\r\n```\r\n\r\n_Start receiver_\r\n\r\n```bash\r\nsudo snmptrapd -Lf ~/.snmp/output.txt\r\n```\r\n\r\n_Send sample trap_\r\n\r\n```bash\r\nsudo snmptrap -v 2c -c public -m ALL localhost \"\" SNMPv2-MIB::sysLocation.0 s s \"Hello World\"\r\n```\r\n\r\n---\r\n\r\n# Change .NET framework in Powershell\r\n##### (Sep 17, 2013)\r\n###### Windows\r\n\r\n```xml\r\n<!-- The following should be saved in C:\\Windows\\System32\\WindowsPowershell\\v1.0\\ (or the correct path to Windows Powershell)\r\n as a file named \"powershell.exe.config\" -->\r\n<?xml version=\"1.0\"?>\r\n<configuration>\r\n <startup useLegacyV2RuntimeActivationPolicy=\"true\">\r\n <supportedRuntime version=\"v4.0.30319\"/>\r\n <supportedRuntime version=\"v2.0.50727\"/>\r\n </startup>\r\n</configuration>\r\n```\r\n\r\n---\r\n\r\n# Path to .NET Framework\r\n##### (Sep 17, 2013)\r\n###### Windows\r\n\r\n```powershell\r\nfunction Get-FrameworkDirectory {\r\n $([System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory())\r\n}\r\n```\r\n\r\n---\r\n\r\n# Copy files with progress\r\n##### (Sep 16, 2013)\r\n###### OSX, Linux\r\n\r\n```bash\r\nalias ls='rsync --progress'\r\n```\r\n\r\n---\r\n\r\n# Remove key from known_hosts\r\n##### (Sep 16, 2013)\r\n###### OSX, Linux\r\n\r\n```bash\r\nssh-keygen -R HOST\r\n```\r\n\r\n---\r\n\r\n# MySQL log\r\n##### (Sep 16, 2013)\r\n###### MySQL\r\n\r\n_my.cnf.51_\r\n\r\n```\r\nlog=/var/log/mysql/mysql.log\r\n```\r\n\r\n_my.cnf.56_\r\n\r\n```\r\ngeneral_log=true\r\ngeneral_log_file=/var/log/mysql/mysql.log\r\n```\r\n\r\n---\r\n\r\n# Prevent Spotlight indexing \r\n##### (Mar 29, 2013)\r\n###### OSX\r\n\r\n```bash\r\ntouch /Volumes/MyDrive/.metadata_never_index\r\n```\r\n\r\n---\r\n\r\n# List/Clear downloaded files list in OSX\r\n##### (Jan 19, 2013)\r\n###### OSX\r\n\r\n_List_\r\n\r\n```bash\r\nsqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2 'select LSQuarantineDataURLString from LSQuarantineEvent'\r\n```\r\n\r\n_Empty_\r\n\r\n```bash\r\nsqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEvents* 'delete from LSQuarantineEvent'\r\n```\r\n\r\n---\r\n\r\n# Rebuild context menu entries\r\n##### (Aug 22, 2012)\r\n###### OSX\r\n\r\n```bash\r\n/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user\r\n```\r\n\r\n---\r\n\r\n# Limit bandwidth\r\n##### (Apr 19, 2012)\r\n###### OSX\r\n\r\n_Add_\r\n\r\n```bash\r\nipfw pipe 1 config bw 100KB\r\nipfw add 1 pipe 1 src-port any\r\n```\r\n\r\n_Remove_\r\n\r\n```bash\r\nipfw delete 00001\r\n```\r\n\r\n---\r\n\r\n# Headless VMware Fusion\r\n##### (Feb 17, 2012)\r\n###### OSX, VMware Fusion\r\n\r\n```bash\r\n/Library/Application\\ Support/VMware\\ Fusion/vmrun -T fusion start /Volumes/VMs/_Hadoop/Hadoop\\ Master.vmwarevm/Hadoop\\ Master.vmx nogui\r\n```\r\n\r\n---\r\n\r\n# Hide/Show ~/Library\r\n##### (Jul 21, 2011)\r\n###### OSX\r\n\r\n```bash\r\nchflags [nohidden|hidden] ~/Library\r\n```\r\n\r\n---\r\n\r\n# Force login via RDP\r\n##### (Mar 11, 2011)\r\n###### Windows\r\n\r\n```\r\nmstsc /v:123.123.123.123 /admin\r\n```\r\n\r\n---\r\n\r\n# Blank Dock.app icon\r\n##### (Feb 12, 2011)\r\n###### OSX\r\n\r\n```bash\r\ndefaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type=\"spacer-tile\";}'\r\nkillall Dock\r\n```\r\n\r\n---\r\n\r\n# Rebuild Spotlight index\r\n##### (Oct 6, 2010)\r\n###### OSX\r\n\r\n```bash\r\nsudo mdutil -E /\r\n```\r\n\r\n---\r\n\r\n# Trigger OSX maintenance scripts\r\n##### (Sep 21, 2010)\r\n###### OSX\r\n\r\n```bash\r\nsudo periodic daily weekly monthly\r\n```\r\n\r\n---","google":"UA-31449022-1","note":"Don't delete this file! It's used internally to help with page regeneration."} | ||
{"name":"rm -rf /","tagline":"by NeQuissimus","body":"# Send/Receive SNMP traps\r\n##### (Sep 17, 2013)\r\n###### OSX, Linux\r\n\r\n_~/.snmp/snmptrapd.conf_\r\n\r\n```bash\r\ndisableAuthorization yes\r\ncom2sec local 127.0.0.1/32 public\r\ncom2sec local 10.30.68.0/24 public\r\nview all included .1\r\n```\r\n\r\n_Start receiver_\r\n\r\n```bash\r\nsudo snmptrapd -Lf ~/.snmp/output.txt\r\n```\r\n\r\n_Send sample trap_\r\n\r\n```bash\r\nsudo snmptrap -v 2c -c public -m ALL localhost \"\" SNMPv2-MIB::sysLocation.0 s s \"Hello World\"\r\n```\r\n\r\n---\r\n\r\n# Change .NET framework in Powershell\r\n##### (Sep 17, 2013)\r\n###### Windows\r\n\r\n```xml\r\n<!-- The following should be saved in C:\\Windows\\System32\\WindowsPowershell\\v1.0\\ (or the correct path to Windows Powershell)\r\n as a file named \"powershell.exe.config\" -->\r\n<?xml version=\"1.0\"?>\r\n<configuration>\r\n <startup useLegacyV2RuntimeActivationPolicy=\"true\">\r\n <supportedRuntime version=\"v4.0.30319\"/>\r\n <supportedRuntime version=\"v2.0.50727\"/>\r\n </startup>\r\n</configuration>\r\n```\r\n\r\n---\r\n\r\n# Path to .NET Framework\r\n##### (Sep 17, 2013)\r\n###### Windows\r\n\r\n```powershell\r\nfunction Get-FrameworkDirectory {\r\n $([System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory())\r\n}\r\n```\r\n\r\n---\r\n\r\n# Copy files with progress\r\n##### (Sep 16, 2013)\r\n###### OSX, Linux\r\n\r\n```bash\r\nalias ls='rsync --progress'\r\n```\r\n\r\n---\r\n\r\n# Remove key from known_hosts\r\n##### (Sep 16, 2013)\r\n###### OSX, Linux\r\n\r\n```bash\r\nssh-keygen -R HOST\r\n```\r\n\r\n---\r\n\r\n# MySQL log\r\n##### (Sep 16, 2013)\r\n###### MySQL\r\n\r\n_my.cnf.51_\r\n\r\n```\r\nlog=/var/log/mysql/mysql.log\r\n```\r\n\r\n_my.cnf.56_\r\n\r\n```\r\ngeneral_log=true\r\ngeneral_log_file=/var/log/mysql/mysql.log\r\n```\r\n\r\n---\r\n\r\n# Prevent Spotlight indexing \r\n##### (Mar 29, 2013)\r\n###### OSX\r\n\r\n```bash\r\ntouch /Volumes/MyDrive/.metadata_never_index\r\n```\r\n\r\n---\r\n\r\n# List/Clear downloaded files list in OSX\r\n##### (Jan 19, 2013)\r\n###### OSX\r\n\r\n_List_\r\n\r\n```bash\r\nsqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2 'select LSQuarantineDataURLString from LSQuarantineEvent'\r\n```\r\n\r\n_Empty_\r\n\r\n```bash\r\nsqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEvents* 'delete from LSQuarantineEvent'\r\n```\r\n\r\n---\r\n\r\n# Rebuild context menu entries\r\n##### (Aug 22, 2012)\r\n###### OSX\r\n\r\n```bash\r\n/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user\r\n```\r\n\r\n---\r\n\r\n# Limit bandwidth\r\n##### (Apr 19, 2012)\r\n###### OSX\r\n\r\n_Add_\r\n\r\n```bash\r\nipfw pipe 1 config bw 100KB\r\nipfw add 1 pipe 1 src-port any\r\n```\r\n\r\n_Remove_\r\n\r\n```bash\r\nipfw delete 00001\r\n```\r\n\r\n---\r\n\r\n# Headless VMware Fusion\r\n##### (Feb 17, 2012)\r\n###### OSX, VMware Fusion\r\n\r\n```bash\r\n/Library/Application\\ Support/VMware\\ Fusion/vmrun -T fusion start /Volumes/VMs/_Hadoop/Hadoop\\ Master.vmwarevm/Hadoop\\ Master.vmx nogui\r\n```\r\n\r\n---\r\n\r\n# Hide/Show ~/Library\r\n##### (Jul 21, 2011)\r\n###### OSX\r\n\r\n```bash\r\nchflags [nohidden|hidden] ~/Library\r\n```\r\n\r\n---\r\n\r\n# Force login via RDP\r\n##### (Mar 11, 2011)\r\n###### Windows\r\n\r\n```\r\nmstsc /v:123.123.123.123 /admin\r\n```\r\n\r\n---\r\n\r\n# Blank Dock.app icon\r\n##### (Feb 12, 2011)\r\n###### OSX\r\n\r\n```bash\r\ndefaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type=\"spacer-tile\";}'\r\nkillall Dock\r\n```\r\n\r\n---\r\n\r\n# Rebuild Spotlight index\r\n##### (Oct 6, 2010)\r\n###### OSX\r\n\r\n```bash\r\nsudo mdutil -E /\r\n```\r\n\r\n---\r\n\r\n# Trigger OSX maintenance scripts\r\n##### (Sep 21, 2010)\r\n###### OSX\r\n\r\n```bash\r\nsudo periodic daily weekly monthly\r\n```\r\n\r\n---","google":"UA-31449022-1","note":"Don't delete this file! It's used internally to help with page regeneration."} |