Skip to content

Instantly share code, notes, and snippets.

View dudeitssm's full-sized avatar
🐧
Dood!

dudeitssm

🐧
Dood!
  • NY, USA
View GitHub Profile
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@sumardi
sumardi / nginx.default.conf
Last active November 2, 2024 14:29
Install PHP-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and PHP-FPM
sudo yum install -y nginx php-fpm
# Install PHP extensions
sudo yum install -y php-devel php-mysql php-pdo \
php-pear php-mbstring php-cli php-odbc \
@stuart-warren
stuart-warren / CreateJob.sh
Last active March 8, 2024 16:20
Create a job in Jenkins (or folder) using the HTTP API
# check if job exists
curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user user.name:YourAPIToken
# with folder plugin
curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken
# without folder plugin
curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken
# create folder
@schlomo
schlomo / autoexec.py
Created May 15, 2014 06:23
XBMC automatically play all videos in a permanent loop. Ideal for video presentations, digital signage or party mode.
# See also http://wiki.xbmc.org/index.php?title=Autoexec.py
# Put this into the userdata folder, see http://wiki.xbmc.org/index.php?title=Userdata for details where this is for each platform
import xbmc
xbmc.executebuiltin('xbmc.PlayMedia("/storage/videos/","isdir")')
xbmc.executebuiltin('xbmc.PlayerControl(repeatall)')
xbmc.executebuiltin("Action(Fullscreen)")
@tuxfight3r
tuxfight3r / tcp_flags.txt
Last active October 31, 2024 00:32
tcpdump - reading tcp flags
##TCP FLAGS##
Unskilled Attackers Pester Real Security Folks
==============================================
TCPDUMP FLAGS
Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere)
Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere)
Pester = PSH = [P] (Push Data)
Real = RST = [R] (Reset Connection)
Security = SYN = [S] (Start Connection)
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active November 18, 2024 19:17
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@w4ilun
w4ilun / ProMicroTXRXLEDRemap
Last active August 19, 2020 17:50
Using the TX/RX LEDs as extra pins on the Pro Micro
The TX/RX LEDs on the Pro Micro uses the pins PD5 and PB0.
You can remove the resistors and use these pins, but you will need to first redefine the TXLED/RXLED pins.
In OS X:
/Users/USERNAME/Library/Arduino15/packages/SparkFun/hardware/avr/1.1.3/variants/promicro/pins_arduino.h
Change these values:
#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0)
#define TXLED0 PORTD |= (1<<5)
#define TXLED1 PORTD &= ~(1<<5)
@Sulter
Sulter / readme
Last active January 14, 2023 17:00
screen+zmodem sending data
lrzsz package needed (debian) which include sz and rz
Sending from remote -> local
* screen into remote
* ctrl-a : zmodem catch
* 'sz filename' on the remote (in terminal)
Sending from local -> remote
* screen into remote
* ctrl-a : zmodem catch
<#
.SYNOPSIS
MSI-mode utility
.DESCRIPTION
Main purpose of this script is turning on MSI-mode for all PCI devices in bulk. Script offers four modes which can be selected through following command line arguments:
'on' - turning MSI-mode on;
'off' - turning MSI-mode off;
'reg' - printing reg-file for backup purposes (to save text to reg-file use standard redirection or piplining to comandlet Out-File);
- started without command line argument script prints devices capable for MSI-mode.
@jarpy
jarpy / requirements.txt
Last active June 30, 2022 06:28
Serverless Elasticsearch Curator for AWS Lambda
certifi==2016.8.8
elasticsearch-curator==4.0.6
PyYAML==3.11