Skip to content

Instantly share code, notes, and snippets.

View anlexN's full-sized avatar
😃
online

anlex N anlexN

😃
online
View GitHub Profile

Copy the file "foobar.txt" from a remote host to the local host

$ scp your_username@remotehost.edu:foobar.txt /some/local/directory

Copy the file "foobar.txt" from the local host to a remote host

$ scp foobar.txt your_username@remotehost.edu:/some/remote/directory
module.exports = {
  'npm': {
    'home': 'https://www.npmjs.org',
    'registry': 'https://registry.npmjs.org/'
  },
  'skimdb': {
    'home': 'https://skimdb.npmjs.com/',
    'registry': 'https://skimdb.npmjs.com/registry/'
 },
@anlexN
anlexN / sqlite3.md
Last active February 26, 2020 06:32
$ curl https://www.sqlite.org/2020/sqlite-autoconf-3310100.tar.gz -o sqlite-autoconf-3310100.tar.gz
$ tar -xzf sqlite-autoconf-3310100.tar.gz
$ cd sqlite-autoconf-3310100
$ ./configure
$ make
$ make install
$ make clean
@anlexN
anlexN / sqlite-tables.md
Created February 6, 2020 11:28
sqlite database tables
CREATE TABLE IF NOT EXISTS users (
    user_id INTEGER PRIMARY KEY,
    mobile INTEGER,
    email TEXT,
    photo TEXT,
    password_hash TEXT,
    display_name TEXT,
    first_name TEXT,
 given_name TEXT,
  1. Configure the software The configure script is responsible for getting ready to build the software on your specific system. It makes sure all of the dependencies for the rest of the build and install process are available, and finds out whatever it needs to know to use those dependencies.Unix programs are often written in C, so we’ll usually need a C compiler to build them. In these cases the configure script will establish that your system does indeed have a C compiler, and find out what it’s called and where to find it.

  2. Build the software Once configure has done its job, we can invoke make to build the software. This runs a series of tasks defined in a Makefile to build the finished program from its source code.The tarball you download usually doesn’t include a finished Makefile. Instead it comes with a template called Makefile.in and the configure script produces a customised Makefile specific to your system.

  3. Install the software Now that the software is built and ready to run, the files can be

  1. if you must use a network filesystem to store SQLite database files, consider using a secondary locking mechanism to prevent simultaneous writes to the same database even if the native filesystem locking mechanism malfunctions.
@anlexN
anlexN / nestjs-tricks.md
Created January 8, 2020 05:06
notes about nestjs
  1. NestJS rightfully recommends using classes as they are preserved as real entities in the compiled JavaScript. Another advantage of using classes is that you can use decorators on its member variables to enhance them. This will prove helpful when you add data validation to your application later on.
@anlexN
anlexN / android-guide.md
Last active January 3, 2020 11:40
notes about Android Kotlin Fundamentals
  1. Activities do not use a constructor to initialize the object. Instead, a series of predefined methods (called "lifecycle methods") are called as part of the activity setup
  2. The lateinit keyword promises the Kotlin compiler that the variable will be initialized before the code calls any operations on it
  3. A factory method is a method that returns an instance of the same class.
  4. A backing property allows you to return something from a getter other than the exact object
  1. deployed functions' parent folder structure: bin,boot,cloudsql,dev,etc,home,lib,lib64,media,mnt,opt,proc,root,run,sbin,serve,srv,staging,start,sys,tmp,usr,var,worker