Skip to content

Instantly share code, notes, and snippets.

View samueltbrown's full-sized avatar

Samuel Brown samueltbrown

View GitHub Profile
@ezodude
ezodude / 001_adjust_ios_deploy_target.js
Last active August 29, 2015 14:01
This is a Cordova CLI hook that resets an iOS deployment target in platform generated project file.
#!/usr/bin/env node
var IOS_DEPLOYMENT_TARGET = '7.0';
var fs = require("fs"),
path = require("path"),
shell = require("shelljs"),
xcode = require('xcode'),
projectRoot = process.argv[2];
/* require XLSX */
var XLSX = require('XLSX')
function datenum(v, date1904) {
if(date1904) v+=1462;
var epoch = Date.parse(v);
return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);
}
function sheet_from_array_of_arrays(data, opts) {
@hgomez
hgomez / jenkins-plugins-batch-install.md
Last active January 26, 2025 14:45
Mass install/update of Jenkins Plugins

Scripted Jenkins Plugins install

Jenkins has a very rich catalog of plugins and it's quite easy to install and update them via UI. BTW, when you want to add tons of plugin via UI, it's a fairly long and boring procedure.

Hopefully, mass installation (or update) could be easy using a simple bash script (curl/python required) :

Create a file containing plugins to be installed (or updated), ie iplugins :

@micw
micw / install_jenkins_plugin.sh
Last active August 11, 2023 06:14
Script to install one or more jenkins plugins including dependencies while jenkins is offline
#!/bin/bash
set -e
if [ $# -eq 0 ]; then
echo "USAGE: $0 plugin1 plugin2 ..."
exit 1
fi
plugin_dir=/var/lib/jenkins/plugins
@dansilivestru
dansilivestru / .bithoundrc
Last active March 25, 2019 12:23
default .bithoundrc file for ignoring project files (modify as needed and commit to the root of your project)
{
"ignore": [
"**/deps/**",
"**/node_modules/**",
"**/thirdparty/**",
"**/third_party/**",
"**/vendor/**",
"**/**-min-**",
"**/**-min.**",
"**/**.min.**",
@rajatrocks
rajatrocks / Ionic Cordova Toast
Created October 31, 2014 04:10
Angular factory to show either Cordova Toast plugin or a self-closing Ionic popup, so that you can develop with Toast on web and on device
// Requires the Toast plugin: https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin
// And Ionic Framework: http://ionicframework.com
// ngCordova is used here, but easily removed: http://ngcordova.com/
// When running in Cordova, show the native toast. Outside of Cordova, show an Ionic Popup for the same period of time.
// Uses the API for the Toast plugin - message, duration, position.
// Differences are that: Ionic Popup ignores position, and doesn't allow doing anything while it shows.
.factory('Toast', function($rootScope, $timeout, $ionicPopup, $cordovaToast) {
return {
show: function (message, duration, position) {
/**
* ================== angular-ios9-uiwebview.patch.js v1.1.1 ==================
*
* This patch works around iOS9 UIWebView regression that causes infinite digest
* errors in Angular.
*
* The patch can be applied to Angular 1.2.0 1.4.5. Newer versions of Angular
* have the workaround baked in.
*
* To apply this patch load/bundle this file with your application and add a
@tmornini
tmornini / userdata.bash
Last active November 11, 2019 21:17
Docker -> Host Syslog -> Loggly for Amazon AWS ECS
#!/bin/bash -x
exec > /tmp/user-data.log 2>&1
mkdir -p /var/spool/rsyslog
(
mkdir -p /etc/rsyslog.d/keys/ca.d
cd /etc/rsyslog.d/keys/ca.d
curl -O https://logdog.loggly.com/media/logs-01.loggly.com_sha12.crt
@alexejsailer
alexejsailer / Dockerfile
Last active July 19, 2017 15:16
docker-jenkins Dockerfile and yml file for docker jenkins
FROM jenkins:1.596
USER root
RUN apt-get update \
&& apt-get install -y sudo \
&& rm -rf /var/lib/apt/lists/*
RUN echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoers
USER jenkins
COPY plugins /usr/share/jenkins/plugins
@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active March 14, 2025 16:47
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS