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
Get-Command # Retrieves a list of all the commands available to PowerShell | |
# (native binaries in $env:PATH + cmdlets / functions from PowerShell modules) | |
Get-Command -Module Microsoft* # Retrieves a list of all the PowerShell commands exported from modules named Microsoft* | |
Get-Command -Name *item # Retrieves a list of all commands (native binaries + PowerShell commands) ending in "item" | |
Get-Help # Get all help topics | |
Get-Help -Name about_Variables # Get help for a specific about_* topic (aka. man page) | |
Get-Help -Name Get-Command # Get help for a specific PowerShell function | |
Get-Help -Name Get-Command -Parameter Module # Get help for a specific parameter on a specific command |
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
function testNewItemPost() { | |
var request = { | |
parameters: { | |
token: "[]", | |
user_name: "michelle", | |
text: "add: Rural America; Hillbilly Elegy; J.D. Vance; From a former marine and Yale Law School graduate, a powerful account of growing up in a poor Rust Belt town that offers a broader, probing look at the struggles of America’s white working class; https://www.amazon.com/gp/product/0062300547/ref=pd_bxgy_14_2?ie=UTF8&pd_rd_i=0062300547&pd_rd_r=MG2AV2PZZVEXNYZ1Y84V&pd_rd_w=xCKNl&pd_rd_wg=55Iya&psc=1&refRID=MG2AV2PZZVEXNYZ1Y84V;" | |
} | |
}; | |
doPost(request); | |
} |
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
#!bash -e | |
TOKEN= # slack token is generate from: https://api.slack.com/web | |
CHANNEL= # name of channels or group | |
MESSAGE= # message | |
NICK= # bot name | |
IS_PRIVATE= # 1 or 0 | |
if [ $IS_PRIVATE -eq 1 ]; then | |
API_TYPE=groups |
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
{ | |
"users": { | |
"root": { | |
"configs": { | |
"ajenti.plugins.notepad.notepad.Notepad": "{\"bookmarks\": []}", | |
"ajenti.plugins.fm.fm.FileManager": "{\"root\": \"/\"}", | |
"ajenti.plugins.terminal.main.Terminals": "{\"shell\": \"sh -c $SHELL || sh\"}", | |
"ajenti.plugins.dashboard.dash.Dash": "{\"widgets\": [{\"index\": 0, \"config\": null, \"container\": \"0\", \"class\": \"ajenti.plugins.dashboard.welcome.WelcomeWidget\"}]}" | |
}, | |
"password": "password", |
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
hashtag_list = ['travelblog', 'travelblogger', 'traveler'] | |
# prev_user_list = [] - if it's the first time you run it, use this line and comment the two below | |
prev_user_list = pd.read_csv('20181203-224633_users_followed_list.csv', delimiter=',').iloc[:,1:2] # useful to build a user log | |
prev_user_list = list(prev_user_list['0']) | |
new_followed = [] | |
tag = -1 | |
followed = 0 | |
likes = 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
from botocore.credentials import RefreshableCredentials | |
from botocore.session import get_session | |
from boto3 import Session | |
def assumed_session(role_arn, session_name, session=None): | |
"""STS Role assume a boto3.Session | |
With automatic credential renewal. |
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
/** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | |
* httpGetTemplate.gs | |
* | |
* A pair of template functions for external host communication with | |
* UrlFetchApp, including parameter encoding and error handling. | |
* | |
* From: gist.github.com/mogsdad/a76c32231a2b91ff8b59 | |
* | |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
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
# -*- coding: utf8 -*- | |
# !/usr/bin/env python3 | |
""" | |
ApplETS Script Stages Slack automatically sends a reminder on Slack about | |
internships available for ApplETS scientific club. Crontab it if you | |
want to make it every a definite period of time. | |
Copyright 2015 ApplETS applets@ens.etsmtl.ca |
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
# -*- coding: utf8 -*- | |
# !/usr/bin/env python3 | |
""" | |
ApplETS VM Backup script automatically creates a backup of all VirtualBox | |
virtual machines, stores the backups in Google drive and | |
deletes too old backups in Google drive. Crontab it if you | |
want to make it every a definite period of time. | |
Copyright 2015 ApplETS applets@ens.etsmtl.ca |
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
FILE SPACING: | |
# double space a file | |
sed G | |
# double space a file which already has blank lines in it. Output file | |
# should contain no more than one blank line between lines of text. | |
sed '/^$/d;G' |
NewerOlder