└❯ pacman -Qs mingw
local/mingw-w64-binutils 2.35.1-1 (mingw-w64-toolchain mingw-w64)
Cross binutils for the MinGW-w64 cross-compiler
local/mingw-w64-crt 8.0.0-1 (mingw-w64-toolchain mingw-w64)
MinGW-w64 CRT for Windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defadvice gist-region (around su/advice/gist/gist-region/around/dirty-hack | |
| a c pre) | |
| "Dirty hack to prevent gist-region from choking on buffers which contain | |
| `%' character" | |
| (save-window-excursion | |
| (let* ((delete-old-versions t) | |
| (dummy "foo") | |
| (beg (ad-get-arg 0)) | |
| (end (ad-get-arg 1)) | |
| (min-beg-end (min beg end)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mkdir heroku | |
| cd heroku/ | |
| virtualenv --no-site-packages env | |
| source env/bin/activate | |
| pip install bottle gevent | |
| pip freeze > requirements.txt | |
| cat >app.py <<EOF | |
| import bottle | |
| import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #Set colour prompt using the name, platform or instance id and avzone | |
| if [ ! -f "/opt/aws/AWS-INSTID" ]; then | |
| curl -s --fail http://169.254.169.254/latest/meta-data/instance-id > /opt/aws/AWS-INSTID | |
| fi | |
| export INSTID=`cat /opt/aws/AWS-INSTID` | |
| if [ ! -f "/opt/aws/AWS-AVZONE" ]; then | |
| curl -s --fail http://169.254.169.254/latest/meta-data/placement/availability-zone > /opt/aws/AWS-AVZONE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # | |
| # Copyright 2007 Google Inc. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Add copy to clipboard from IPython! | |
| To install, just copy it to your profile/startup directory, typically: | |
| ~/.ipython/profile_default/startup/ | |
| Example usage: | |
| %clip hello world | |
| # will store "hello world" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String.prototype.imgURL = function(size) { | |
| // remove any current image size then add the new image size | |
| return this | |
| .replace(/_(pico|icon|thumb|small|compact|medium|large|grande|original|1024x1024|2048x2048|master)+\./g, '.') | |
| .replace(/\.jpg|\.png|\.gif|\.jpeg/g, function(match) { | |
| return '_'+size+match; | |
| }) | |
| ; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| import logging.handlers | |
| log = logging.getLogger(__name__) | |
| log.setLevel(logging.DEBUG) | |
| handler = logging.handlers.SysLogHandler(address = '/dev/log') | |
| formatter = logging.Formatter('%(module)s.%(funcName)s: %(message)s') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Print the name and bounding box (x1, y1, x2, y2) for the active window in | |
| # a loop. | |
| import time | |
| from collections import namedtuple | |
| import Xlib | |
| import Xlib.display | |
|Question |ChatGPT Response
OlderNewer