Skip to content

Instantly share code, notes, and snippets.

seank-com /
Last active Mar 20, 2019 — forked from marktayl1/
Install Steps for IoT Edge on NVIDIA Jetson Tx2

Install Steps for IoT Edge on NVIDIA Jetson Tx2

Multi-architecture method

Prerequisites: This assumes you already have docker up and running. You can also use Moby by following the instructions at just before the installation of IoT Edge in step: 10

  1. $ sudo dpkg --add-architecture armhf
  2. $ sudo apt-get update
  3. $ sudo apt-get install libc-bin libc-bin libc-dev-bin libc6 libc6:armhf libc6-dev libgcc1 libgcc1:armhf locales
  4. $ wget
  5. $ sudo dpkg -i ./hostname_3.16ubuntu2_armhf.deb
EddyRespondek / functions.php
Last active Mar 20, 2019
Wordpress - Simple AJAX Pagination
View functions.php
function get_posts_for_pagination() {
$html = '';
$paged = ( $_GET['page'] ) ? $_GET['page'] : 1;
$post_type = $_GET['posttype'];
if ( empty($post_type) ) {
return '';
if( filter_var( intval( $paged ), FILTER_VALIDATE_INT ) ) {
janily / Breakpoints
Created Jan 16, 2014
Mobile-first CSS Media Queries Breakpoints
View Breakpoints
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }
adriennetacke / countdown.js
Last active Mar 20, 2019
Countdown timer in pure JavaScript
View countdown.js
function countdown(endDate) {
let days, hours, minutes, seconds;
endDate = new Date(endDate).getTime();
if (isNaN(endDate)) {
setInterval(calculate, 1000);
dfontana /
Last active Mar 20, 2019
My setup guide for installing Cgywin, Mintty, Cmder, and ZSH.

What's this?

Instructions to obtain ZSH on a windows environment, without the input funny business presented by some other attempted solutions.

The final result is ZSH running on a mintty terminal, emulated by cygwin, and being handled by the popular cmder.

Why is this here?

For the benefit of myself and others. I've already followed these instructions twice. It took me hours to figure all this out, maybe someone else can save a few.

What exactly is covered?

  • Installing and setting up cmder
whatsmate / send-whatsapp.vbs
Last active Mar 20, 2019
Sending WhatsApp message in VBA / Visual Basic Script
View send-whatsapp.vbs
Sub Main_Routine()
''' The first parameter is the recipient's number, including the country code.
''' The second paramter is the content of the message.
WhatsAppMessage_Send "12025550108", "God Loves You" ''' TODO: Specify the recipient's number here. NOT the gateway number
End Sub
Sub WhatsAppMessage_Send(ByRef strNumber As String, ByRef strMessage As String)
Dim INSTANCE_ID As String, CLIENT_ID As String, CLIENT_SECRET As String, API_URL As String
Dim strJson As Variant
kmorcinek / .gitignore
Last active Mar 20, 2019
Example .gitignore file I use for C# projects
View .gitignore
# Download this file using PowerShell v3 under Windows with the following comand:
# Invoke-WebRequest -OutFile .gitignore
# or wget:
# wget --no-check-certificate
# User-specific files
HabaCo / 多型、覆寫、多載
Last active Mar 20, 2019
View 多型、覆寫、多載
// Superclass(父類別)
class Animal(){
void sound(){
// Subclass(子類別)
class Dog extends Animal{
alkrauss48 / Dockerfile
Last active Mar 20, 2019
Running a docker container as a non-root user
View Dockerfile
# By default, Docker containers run as the root user. This is bad because:
# 1) You're more likely to modify up settings that you shouldn't be
# 2) If an attacker gets access to your container - well, that's bad if they're root.
# Here's how you can run change a Docker container to run as a non-root user
# Create the home directory for the new app user.
RUN mkdir -p /home/app
perlguy99 / Alamofire.request.error.handling.swift
Created Feb 15, 2017
Alamofire Request Error Handling - From their documentation
View Alamofire.request.error.handling.swift
Alamofire.request(urlString).responseJSON { response in
guard case let .failure(error) = response.result else { return }
if let error = error as? AFError {
switch error {
case .invalidURL(let url):
print("Invalid URL: \(url) - \(error.localizedDescription)")
case .parameterEncodingFailed(let reason):
print("Parameter encoding failed: \(error.localizedDescription)")
print("Failure Reason: \(reason)")
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.