In case you want to automate batch accpeting Dependabot Pull Requests
Using the GitHub CLI
In case you want to automate batch accpeting Dependabot Pull Requests
Using the GitHub CLI
@ECHO OFF | |
REM Uses the file name as the profile name | |
SET MSTEAMS_PROFILE=%~n0 | |
ECHO - Using profile "%MSTEAMS_PROFILE%" | |
SET "OLD_USERPROFILE=%USERPROFILE%" | |
SET "USERPROFILE=%LOCALAPPDATA%\Microsoft\Teams\CustomProfiles\%MSTEAMS_PROFILE%" | |
REM Ensure there is a downloads folder to avoid error described at |
The purpose of this document is to get you familiar with the concepts and command line tools involved with connecting to the internet using modern 4G LTE modems on both Debian/Ubuntu and OpenWRT.
This writeup is based on my experiences with the Sierra Wireless AirPrime MC7455 modem and a Calyx (Sprint) SIM card, but it should apply to most modern 4G LTE modems.
These are the steps required:
#!/usr/bin/env bash | |
git ls-files db/migrate/*.rb | sort | tail -1 | \ | |
ruby -e "schema_version=STDIN.read[/\d+/]; init_schema=%(db/migrate/#{schema_version}_init_schema.rb); | |
%x(git rm -f db/migrate/*.rb; | |
mkdir db/migrate; | |
git mv db/schema.rb #{init_schema}; | |
rake db:migrate; | |
git add db/schema.rb; git commit -m 'Squashed migrations')" |
Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.
As the name says, its primary function is to be used in the deploy process in replace of username/password, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.
Split-Path -parent $dte.Solution.FileName | cd | |
New-Item -ItemType Directory -Force -Path ".\licenses" | |
@( Get-Project -All | ? { $_.ProjectName } | % { Get-Package -ProjectName $_.ProjectName } ) | Sort -Unique Id | % { $pkg = $_ ; Try { (New-Object System.Net.WebClient).DownloadFile($pkg.LicenseUrl, (Join-Path (pwd) 'licenses\') + $pkg.Id + ".html") } Catch [system.exception] { Write-Host "Could not download license for $($pkg.Id)" } } |
import redis.clients.jedis.Client; | |
import redis.clients.jedis.Jedis; | |
import redis.clients.jedis.Transaction; | |
import org.testng.annotations.*; | |
import static org.mockito.Mockito.*; | |
public class TransactionMockFuckTest { | |
/** | |
* Let's say we want to test the following method |
namespace :json do | |
desc "Export all data to JSON files" | |
task :export => :environment do | |
Rails.application.eager_load! | |
ActiveRecord::Base.descendants.each do |model| | |
file = File.open(File.join(Rails.root, "db", "export", "#{model.table_name}.json"), 'w') | |
file.write model.all.to_json | |
file.close | |
end |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
# |