Skip to content

Instantly share code, notes, and snippets.

View rwp0's full-sized avatar
📚
On one's own way, at one's own pace…

Elvin Aslanov rwp0

📚
On one's own way, at one's own pace…
View GitHub Profile
@defunkt
defunkt / clients.md
Created April 18, 2010 14:09
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

@krists
krists / Turn CAPSLOCK to Ctrl.reg
Last active February 3, 2024 21:23
Remap Caps-Lock key to Ctrl in Windows 7/8
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
@bennadel
bennadel / code-1.cfm
Created March 25, 2014 00:57
My First ColdFusion 8 CFFTP Experience - Rocky But Triumphant
<!--- Get the file name of this test file. --->
<cfset strFilePath = ExpandPath( "./test.txt" ) />
<!---
Create a really large file. We need to do this because a
small file will be uploaded no matter what the timeout it
on the CFFTP.
--->
<cfsavecontent variable="strText">
<cfloop index="intI" from="1" to="100000" step="1"
@e7d
e7d / README.md
Last active December 19, 2022 09:13
[Debian] Build a Squid anonymous proxy from source code

If you don't want to build Squid from scratch, you can simply Setup a Squid anonymous proxy

Build a Squid anonymous proxy from source code

Please note that this whole manual refers to the version 3.5.23 of Squid. You probably would have to adapt some commands to the version you will actually download.

Table of contents

@EdwardBetts
EdwardBetts / pprint_color.py
Last active June 13, 2024 05:36
Python pprint with color syntax highlighting for the console
from pprint import pformat
from typing import Any
from pygments import highlight
from pygments.formatters import Terminal256Formatter
from pygments.lexers import PythonLexer
def pprint_color(obj: Any) -> None:
"""Pretty-print in color."""
@bartmika
bartmika / FreeBSD+Memcached.md
Last active August 19, 2022 13:44
Instructions on setting up memcached on FreeBSD and OS X.

FreeBSD 10.2 + Memcached

The following instructions are used to setup Memcachd on your FreeBSD OS.

  1. Install from ports (1 of 3) if you plan on using PHP with caching:
cd /usr/ports/databases/pecl-memcache
make install clean
  1. Install from ports (2 of 3):
@subfuzion
subfuzion / curl.md
Last active June 14, 2024 20:32
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@hongkongkiwi
hongkongkiwi / generate-dropbear-key
Last active December 17, 2023 16:38
Generate SSH Key in Dropbear with some options (by default it uses default id_dropbear as the name and ed25519 as the type)
#!/bin/sh +ux
# We set the sh +ux flags so that we error on undefined variables and error on bad commands
help() {
echo >&2 "$0 [-f] [-p] [-q] [<priv_key_file>] [<key_type>] [<key_comment>]"
echo >&2
echo >&2 "-q / --quiet to silent all output (except -p if passed)"
echo >&2 "-p / --pubkey to output public key after generation"
echo >&2 "-f / --force to force replacing existing key"
echo >&2
@joshschmelzle
joshschmelzle / remap-capslock-to-control-win10.md
Last active May 13, 2024 01:55
Remap Caps Lock to Control on Windows 10

Ways to remap caps lock to control on Windows 10

These methods in this gist worked for me on my U.S.-based keyboard layouts. I am unsure about other layouts. If you have problems, revert your changes; delete the registry key you created (and reboot).

Update: you should probably scroll down to approach 4 where I suggest using Microsoft PowerToys Keyboard Manager.

Approach 1. Manually through regedit

Navigate to and create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout named Scancode Map.

@meets2tarun
meets2tarun / chrome.json
Created May 22, 2017 15:36
Copy the file in /etc/chromium-browser/policies/managed and make required changes in chromium-browser
// Policy template for Linux.
// Uncomment the policies you wish to activate and change their values to
// something useful for your case. The provided values are for reference only
// and do not provide meaningful defaults!
{
// Cross-origin HTTP Basic Auth prompts
//-------------------------------------------------------------------------
// Controls whether third-party sub-content on a page is allowed to pop-up an
// HTTP Basic Auth dialog box. Typically this is disabled as a phishing
// defense. If this policy is not set, this is disabled and third-party sub-