$ networksetup -listallnetworkservices | grep STARTING-NETWORK-NAME | sed s/*// | while read -r service; do networksetup -deletepppoeservice $service; done
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
#include <fsl_port.h> | |
#include <fsl_gpio.h> | |
#include <fsl_debug_console.h> | |
#include <fsl_sai.h> | |
#define RX_SAI_IRQ I2S0_Rx_IRQn | |
#define SAI_RxIRQHandler I2S0_Rx_IRQHandler | |
bool isFinished = false; | |
uint32_t temp[2000]; |
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
var http = require('http'); | |
var path = require('path'); | |
var fs = require('fs'); | |
var AUDIOFILE = "./audio.ogg"; | |
function serveWithRanges(request, response, content) { | |
var range = request.headers.range; | |
var total = content.length; | |
var parts = range.replace(/bytes=/, "").split("-"); |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <stddef.h> | |
#include <string.h> | |
#include <time.h> | |
#define _MIN_ -10 | |
#define _MAX_ 50 | |
#define _RANGE_ _MAX_-_MIN_ |
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
<div | |
id="app" | |
class="ad-App"> | |
</div> |
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
// source: https://forums.xamarin.com/discussion/81842/prevent-change-font-size | |
// Add this code to MainActivity.cs class to force FontScaling to default (1.0) value: | |
protected override void AttachBaseContext(Context @base) | |
{ | |
var configuration = new Configuration(@base.Resources.Configuration); | |
//0.85 small, 1 standard, 1.15 big,1.3 more bigger ,1.45 super big | |
configuration.FontScale = 1f; | |
var config = Application.Context.CreateConfigurationContext(configuration); | |
base.AttachBaseContext(config); |
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
using Xamarin.Forms; | |
[assembly: ExportRenderer(typeof(Appname.Views.DeviceInfoPage), typeof(Appname.iOS.Renderers.NoSwipeBackPageRenderer))] | |
namespace Appname.iOS.Renderers | |
{ | |
// Custom Rendered to disable the swipe back of provided page type (in this case DeviceInfoPage...) | |
// source: https://forums.xamarin.com/discussion/26966/how-to-disable-swipe-gesture-on-pushed-page | |
public class NoSwipeBackPageRenderer : PageRenderer | |
{ | |
public override void ViewDidAppear(bool animated) |
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
# Requirements: | |
# Node Installed | |
# Safe User that is running as node | |
#1) Install pm2 | |
sudo npm install -g pm2 | |
#2) Set-up PM2 to autostart upon server rebooting | |
#sudo env PATH=$PATH:/usr/local/bin pm2 startup <platform> -u <safe_user_not_root> | |
sudo env PATH=$PATH:/usr/local/bin pm2 startup ubuntu -u ubuntu |
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
#!/bin/sh | |
# To run, download the script or copy the code to a '.sh' file (for example 'fluttercleanrecursive.sh') and run like any other script: | |
# sh ./fluttercleanrecursive.sh | |
# or | |
# sudo sh fluttercleanrecursive.sh | |
echo "Flutter Clean Recursive (by jeroen-meijer on GitHub Gist)" | |
echo "Looking for projects... (may take a while)" |