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 | |
| # -*- ENCODING: UTF-8 -*- | |
| dbname="db_name" | |
| username="db_user" | |
| host="localhost" | |
| port="6432" | |
| available_commands=("lists" "pools" "servers") | |
| if [[ $# -eq 0 ]] ; then | |
| echo 'realtime_monitoring [lists][pools][servers]' |
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
| Dim freeSpace | |
| Dim boundarySpace | |
| Set objWMIService = GetObject("winmgmts:") | |
| Set objLogicalDisk = objWMIService.Get("Win32_LogicalDisk.DeviceID='c:'") | |
| freeSpace = Round(objLogicalDisk.Freespace/1048576) | |
| boundarySpace = 5120 | |
| Wscript.Echo "Free space (in MB): " & freeSpace |
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 traceback | |
| try: | |
| raise Exception("This is the exception text") | |
| except Exception, e: | |
| exception_traceback = traceback.format_exc() | |
| print exception_traceback |
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
| manage.py runprofileserver --kcachegrind --prof-path="." |
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
| filename = "profiling_data.pyprof" | |
| import pstats | |
| p = pstats.Stats(filename) | |
| p.strip_dirs().sort_stats(-1).print_stats() |
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
| python -m cProfile -o your_profile_file.pyprof manage.py runserver |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Net.Http; | |
| using System.IO; | |
| using System.Net; | |
| using System.Net.Http.Headers; | |
| namespace Avenet.Utils |
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
| using System; | |
| namespace Avenet.Utils | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| Console.WriteLine(GetLocalOffsetHours()); | |
| } |
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
| <!DOCTYPE html> | |
| <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
| <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
| <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
| <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title>Google QR Generator</title> | |
| <meta name="description" content=""> |
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 datetime import datetime | |
| from itertools import islice | |
| from dateutil.rrule import rrule, DAILY, WEEKLY, MONTHLY, YEARLY, SU, MO, TU, WE, TH, FR, SA | |
| #Every two days from now on | |
| rule_day = rrule(DAILY, dtstart=datetime.today(), interval=2) | |
| #Every two weeks (Monday, Tuesday and Wednesday) starting from now | |
| rule_week = rrule(WEEKLY, dtstart=datetime.today(), interval=2, byweekday=(MO, TU, WE)) |
OlderNewer