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
alias brewlist="brew leaves | xargs brew deps --include-build --tree" |
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
# Install EasyEngine on Linux | |
wget -qO ee rt.cx/ee4 && sudo bash ee |
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
Oksana Chumak (IntelliJ) | |
Sep 29, 2020, 11:42 GMT+2 | |
Hello, | |
The general steps are the following: | |
Start from package.json scripts start-renderer-dev, then start-main-debug. | |
Create a Attach to Node.js/Chrome run configuration with the port number 9223. Then start it with debugging. |
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
chmod g-w /usr/local/share/zsh | |
chmod g-w /usr/local/share/zsh/site-functions |
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
<?php | |
/* | |
Plugin Name: Always-302 Plugin | |
Plugin URI: https://gist.github.com/tinjaw/5da8ef61d91b73ca928256bb51200117 | |
Description: Send a 302 (temporary) redirect instead of 301 (permanent) for sites where shortlinks may change | |
Version: 1.0 | |
Author: Tinjaw | |
Author URI: https://github.com/tinjaw | |
*/ |
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
When you need to concatenate a list of strings, you can do this using a for loop by adding each element one by one. However, this would be very inefficient, especially if the list is long. In Python, strings are immutable, and thus the left and right strings would have to be copied into the new string for every pair of concatenation. | |
A better approach is to use the join() function as shown below: | |
```python | |
characters = ['p', 'y', 't', 'h', 'o', 'n'] | |
word = "".join(characters) | |
print(word) # python | |
``` |
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 | |
# this script moves ALL packages from volume-x to volume-y | |
# For Synology DSM - tested with DSM6.1 | |
if [ $# -lt 2 ]; then | |
echo "usage: $0 <from_vol> <to_vol>" | |
exit -1 | |
fi | |
from_vol="$1" |
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/python | |
# Naturebytes Wildlife Cam Kit | V1.07 (Pixel) | |
# Based on the excellent official Raspberry Pi tutorials and a little extra from Naturebytes | |
import RPi.GPIO as GPIO | |
import time | |
from subprocess import call | |
from datetime import datetime | |
import logging |
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
// *********************************************************************** | |
// Assembly : Testing Project | |
// Author : Chaim Krause | |
// Created : 05-26-2017 | |
// | |
// Last Modified By : Chaim Krause | |
// Last Modified On : 05-30-2017 | |
// *********************************************************************** | |
// <copyright file="GameManager.cs" company="Combat Coding"> | |
// CC BY 4.0 |