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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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
<%= f.input :author, | |
:as => :grouped_select, | |
:collection => [['Authors', ['Jose', 'Carlos']], ['General', ['Bob', 'John']]], | |
:group_method => :last %> | |
<%= f.input :author, | |
:as => :grouped_select, | |
:collection => Proc.new { [['Authors', ['Jose', 'Carlos']], ['General', ['Bob', 'John']]] }, | |
:group_method => :last %> |
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
pp App::V1::Resources::Positions.routes.map { |route| "#{route.request_method}-#{route.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
ps ax | grep spring | cut -f1 -d' ' | xargs kill |
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
adb shell setprop log.tag.FA VERBOSE | |
adb shell setprop log.tag.FA-SVC VERBOSE | |
adb shell setprop debug.firebase.analytics.app com.getmyboat_v1 | |
adb logcat -v time -s FA FA-SVC |
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
{ | |
"payment_intent_data": { | |
"capture_method": "manual", | |
"setup_future_usage": "off_session", | |
"metadata": {}, | |
"payment_method_types": ["card"], | |
"billing_address_collection": "required", | |
"customer": #.., | |
"line_items": [{ | |
"name": #..., |
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 django.core.management.base import BaseCommand | |
from search_seo.models import SeoTemplate | |
from itertools import product | |
from django.apps import apps | |
import os | |
import time | |
class Command(BaseCommand): | |
help = "Migrate location category content to the db" |
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 xml.etree.ElementTree as et | |
from collections import defaultdict | |
import json | |
data = [] | |
path = "cpe-dictionary_v2.3.xml" | |
context = et.iterparse(path, events=("start", "end")) | |
context = iter(context) |
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 json | |
import csv | |
from collections import defaultdict | |
from difflib import SequenceMatcher | |
from functools import lru_cache | |
nvd = None | |
with open('extract.json', 'r') as f_handler: | |
nvd = json.load(f_handler) |
OlderNewer