Skip to content

Instantly share code, notes, and snippets.

@petitviolet
petitviolet / nginx_deployment.yaml
Created March 11, 2018 11:04
sample Nginx configuration on Kubernetes using ConfigMap to configure nginx.
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
data:
nginx.conf: |
user nginx;
worker_processes 3;
error_log /var/log/nginx/error.log;
events {
@tsaarni
tsaarni / README.md
Last active June 8, 2021 09:40
Wansview NCM700GC web camera
@nmarley
nmarley / dec.py
Last active May 29, 2024 06:01
AWS KMS encryption/decryption using Python/Boto3
import boto3
import base64
if __name__ == '__main__':
session = boto3.session.Session()
kms = session.client('kms')
encrypted_password = 'AQECAHjgTiiE7TYRGp5Irf8jQ3HzlaQaHGYgsUJDaavnHcFm0gAAAGswaQYJKoZIhvcNAQcGoFwwWgIBADBVBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDDwxVQuG0oVwpkU7nQIBEIAoVGk1/wpserb+GVUOzE7PiL/Nr9fTDFKZfpKpF0ip2ct4B2q0Wn6ZZw=='
binary_data = base64.b64decode(encrypted_password)
@phuf
phuf / Install-VIM.ps1
Created January 7, 2017 02:18
Install VIM on Windows Server Core
Set-ExecutionPolicy Unrestricted;
Invoke-WebRequest https://chocolatey.org/install.ps1 -UseBasicParsing | Invoke-Expression;
choco install vim
choco update vim
$command = (Get-itemProperty -LiteralPath "HKLM:\SOFTWARE\Classes\`*\shell\Vim\Command").'(default)';
if ($command -match "`"([^`"]+)`".*") {
$expression = "Set-Alias -Name 'vim' -Value '$($Matches[1])';"
@parmentf
parmentf / GitCommitEmoji.md
Last active July 8, 2024 18:07
Git Commit message Emoji
@kidpixo
kidpixo / jupyter_shortcuts.md
Last active July 1, 2024 05:40
Keyboard shortcuts for ipython notebook 3.1.0 / jupyter

Warning This is SEVERELY outdated, the current jupyter version is > 6.X, please refer to your current jupyter notebook installation!

Disclaimer : I just copied those shortcuts from Jupyter Menú > Help > Keyboard Shortcuts, I didn't wrote them myself.

Check your current shortcuts in your Help, shortcuts coule have been modified by extensions or your past self.

Toc

Keyboard shortcuts

// Needed in AndroidManifest:
<!-- Permission for using NFC hardware -->
<uses-permission android:name="android.permission.NFC"/>
<!-- Forcing device to have NFC hardware -->
<uses-feature android:name="android.hardware.nfc" android:required="true"/>
<!-- Registering app for receiving NFC's TAG_DISCOVERED intent -->
<intent-filter>
<action android:name="android.nfc.action.TAG_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>