my resharper snippets
This file contains 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
# create sdk folder | |
export ANDROID_HOME=/opt/android-sdk-linux | |
sudo mkdir -p $ANDROID_HOME | |
# install openjdk | |
sudo apt-get install openjdk-8-jdk | |
# download android sdk | |
cd $ANDROID_HOME | |
sudo wget https://dl.google.com/android/repository/tools_r25.2.3-linux.zip |
This file contains 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
""" | |
$ pip install pygooglevoice==0.5.2 requests | |
$ python timed_passes.py | |
""" | |
from googlevoice import Voice | |
import requests | |
URL = 'https://nmaahc.si.edu/visit/passes' | |
TEXT = 'We will announce soon when Advanced Timed Passes for April through June 2017 will be available.' |
This file contains 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
""" | |
Scrape shows from http://www.thechapelsf.com/music/ | |
Usage: | |
$ python chapelsf.py | |
Sample output: | |
[ { 'artist': 'Emily King', | |
'show_date': 'Wed 8/03 Doors: 8:00 pm / Show: 9:00 pm', |
This file contains 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
[Input-SDL-Control1] | |
# Mupen64Plus SDL Input Plugin config parameter version number. Please don't change this version number. | |
version = 2 | |
# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic | |
mode = 0 | |
# Specifies which joystick is bound to this controller: -1=No joystick, 0 or more= SDL Joystick number | |
device = 0 | |
# SDL joystick name (or Keyboard) | |
name = "Xbox 360 Wired Controller" |
This file contains 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
# EditorConfig is awesome: http://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
# Unix-style newlines with a newline ending every file | |
[*] | |
end_of_line = lf | |
insert_final_newline = true | |
indent_style = space |
This file contains 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
class XmasTest(unittest.TestCase): | |
@mock.patch('xmas.date') | |
def test_days_til_xmas_when_xmas(self, mock_date): | |
mock_date.today.return_value = date(2020, 12, 25) | |
mock_date.side_effect = lambda *args, **kw: date(*args, **kw) | |
days = days_til_xmas() | |
self.assertEqual(days, 0) |
This file contains 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
namespace api_v1_csharp.Models.ldap | |
{ | |
using System; | |
using System.DirectoryServices; | |
using System.DirectoryServices.ActiveDirectory; | |
using System.DirectoryServices.AccountManagement; | |
using System.Collections.Generic; | |
public class UsersRepository : IUsersRepository | |
{ |
This file contains 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
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ /mysite/application.cgi/$1 [L] |
This file contains 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
""" | |
hhhhh aaaaa => h5 5a5 | |
""" | |
def compress_sentence(sentence): | |
prev_letter = sentence[0] | |
frequency = 1 | |
output = '' | |
for letter in sentence[1:]: |
NewerOlder