Skip to content

Instantly share code, notes, and snippets.

View Tabrizian's full-sized avatar

Iman Tabrizian Tabrizian

  • NVIDIA
  • Toronto, Canada
View GitHub Profile
{
// Editor
"editor.fontFamily": "Menlo, Monaco, 'Courier New', monospace",
"diffEditor.renderSideBySide": true,
"editor.find.autoFindInSelection": true,
"editor.fontLigatures": true,
"editor.formatOnSave": false,
"editor.formatOnType": true,
"editor.formatOnPaste": true,
"editor.smoothScrolling": true,
@pi0
pi0 / CEIT_PRINTER.md
Last active November 2, 2017 13:32
CEIT Printer with CUPS
  1. Install hplip and cups : sudo apt install hplip cups
  2. Open this URL: http://localhost:631
  3. administration > add printer > [select hp]
  4. smb://ceit\[username]:[password]@ceit/192.168.128.10/HPLaserJ4015
@pi0
pi0 / hosts.sh
Created January 25, 2017 14:11
raw.githubusercontent.com
echo "151.101.84.133 raw.githubusercontent.com" | sudo tee -a /etc/hosts
@pi0
pi0 / run.sh
Created January 12, 2017 06:51
Node 7.4 Async/Await
node --harmony test
@nicolasparada
nicolasparada / gestures.md
Last active October 16, 2022 15:40
Switch desktop in Windows 10 with three fingers gesture. Working on HP Spectre x360 with Synaptics.

Gestures

Virtual key codes:

  • 3 keys: 0x33
  • Ctrl key: 0x11
  • Windows key: 0x5B
  • Left arrow key: 0x25
  • Right arrow key: 0x27
@btfak
btfak / useHexo.md
Created May 26, 2016 09:41
How to use Hexo and deploy to GitHub Pages
@tebeka
tebeka / orphan-branch.sh
Created September 24, 2015 12:40
Create Empty Orphan Branch for Code Review
# Create empty orphan branch for code review
git checkout --orphan code-review
git rm -rf .
git ci --allow-empty -m 'Code review - nuke all'
git push --set-upstream origin code-review
@domenic
domenic / 0-github-actions.md
Last active May 26, 2024 07:43
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
@sheharyarn
sheharyarn / mongo_backup.sh
Last active January 23, 2024 16:54
Mongodump Shell Script for Cronjob
#!/bin/bash
MONGO_DATABASE="your_db_name"
APP_NAME="your_app_name"
MONGO_HOST="127.0.0.1"
MONGO_PORT="27017"
TIMESTAMP=`date +%F-%H%M`
MONGODUMP_PATH="/usr/bin/mongodump"
BACKUPS_DIR="/home/username/backups/$APP_NAME"
@slightfoot
slightfoot / SearchActivity.java
Last active October 26, 2023 12:28
SearchView example
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Locale;
import android.content.Context;
import android.content.Intent;
import android.database.AbstractCursor;
import android.database.Cursor;
import android.support.v4.app.FragmentActivity;
import android.text.TextUtils;