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
const moment = require('moment-timezone') | |
const logger = require('tracer').colorConsole() | |
const { RRule, RRuleSet, rrulestr } = require('rrule') | |
function untilStringToDate(until) { | |
const re = /^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/ | |
const bits = re.exec(until) | |
if (!bits) throw new Error(`Invalid UNTIL value: ${until}`) |
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
# Installing prerequisites for BTCPayServer development on Ubuntu | |
# https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install?initial-os=linux | |
wget https://packages.microsoft.com/config/ubuntu/21.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb | |
sudo dpkg -i packages-microsoft-prod.deb | |
rm packages-microsoft-prod.deb | |
sudo add-apt-repository universe | |
sudo apt update |
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
const parser = require('cron-parser') | |
const { RRule } = require('rrule') | |
const logger = require('tracer').colorConsole() | |
const maps = { | |
dayofmonth: 'bymonthday', | |
dayofweek: 'byweekday', | |
} | |
module.exports = { |
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
'use strict' | |
const environment = process.env.NODE_ENV || 'development' | |
const isProd = environment.includes('production') | |
const config = require('config') | |
const path = require('path') | |
const AutoLoad = require('fastify-autoload') | |
const mercurius = require('mercurius') | |
const gqSchema = require('./graphql/schema') |
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
dig +short -t TXT _cloud-netblocks1.googleusercontent.com | grep -Po 'ip4:\K\S+' >> ips.txt | |
dig +short -t TXT _cloud-netblocks2.googleusercontent.com | grep -Po 'ip4:\K\S+' >> ips.txt | |
dig +short -t TXT _cloud-netblocks3.googleusercontent.com | grep -Po 'ip4:\K\S+' >> ips.txt | |
dig +short -t TXT _cloud-netblocks4.googleusercontent.com | grep -Po 'ip4:\K\S+' >> ips.txt | |
dig +short -t TXT _cloud-netblocks5.googleusercontent.com | grep -Po 'ip4:\K\S+' >> ips.txt |
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 android.text.TextUtils; | |
import com.fasterxml.jackson.core.JsonProcessingException; | |
import com.fasterxml.jackson.databind.JavaType; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.databind.ObjectReader; | |
import com.orhanobut.hawk.Parser; | |
import java.io.IOException; | |
import java.lang.reflect.Type; |
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
public class ExampleFragment extends Fragment implements GoogleApiClient.ConnectionCallbacks, | |
GoogleApiClient.OnConnectionFailedListener, | |
ResultCallback<LocationSettingsResult>, | |
SharedPreferences.OnSharedPreferenceChangeListener { | |
private Callbacks mCallbacks; | |
private Snackbar snackbar; | |
public interface Callbacks { | |
/** |
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
public class MainActivity extends AppCompatActivity { | |
private static final String TAG = "MainActivity"; | |
@Bind(R.id.commentsView) | |
WebView comments; | |
@Bind(R.id.webview_frame) | |
FrameLayout mContainer; | |
private String url = "http://www.example.news"; |
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
/** | |
* This class is an example of how to use FirebaseListAdapter. It uses the ExampleObject class to encapsulate the | |
* data for each individual chat message | |
*/ | |
public class ExampleAdapter extends FirebaseListAdapter<ExampleObject> { | |
@InjectView(R.id.example_list_item) | |
TextView exampleView; | |
public DealListAdapter(Query ref, Activity activity, int layout) { | |
super(ref, ExampleObject.class, layout, activity); |
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
[...] | |
def vFile = new File( 'version.properties' ) | |
Properties props = new Properties() | |
props.load( new FileInputStream( vFile ) ) | |
def versionMajor = props.get( 'versionMajor' ).toInteger() | |
def versionMinor = props.get( 'versionMinor' ).toInteger() | |
def versionPatch = props.get( 'versionPatch' ).toInteger() | |
[...] | |
defaultConfig { | |
... |
NewerOlder