Skip to content

Instantly share code, notes, and snippets.

View abigoroth's full-sized avatar
🎯
Focusing

Ahmad Ya'kob Ubaidullah abigoroth

🎯
Focusing
View GitHub Profile
[system@dnsvimicm ~/hybrid]$ sudo nstall chromium
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100% 916 B 0.9kB/s 00:01
Fetching packagesite.txz: 100% 6 MiB 2.2MB/s 00:03
Processing entries: 0%
Newer FreeBSD version for package kpkpass:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1202000
- running kernel: 1201000
Ignore the mismatch and continue? [y/N]: y
[system@dnsvcmdev ~/hybrid/tmp]$ cat Gemfile.lock.diff
diff --git a/Gemfile.lock b/Gemfile.lock
index f5f6a165..eece4166 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,6 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
+ CFPropertyList (2.3.6)
@abigoroth
abigoroth / mongo tender document
Created November 27, 2019 03:08
satu contoh tender document
{
"_id": {
"$oid": "57e904bc935dc4cb068b456c"
},
"admin_id": 11491,
"agency_name": "KEMENTERIAN PENDIDIKAN MALAYSIA",
"agency_type": {
"id": 842,
"term": "Government"
},
#modal-vue
modal v-if="showModal" @close="showModal = false"
script type="text/x-template" id="modal-template" ref="modal"
transition name="modal"
.modal-mask
.modal-wrapper
div class="w-2/3 modal-container"
.modal-header
slot name="header"
[system@dnsv2node1 ~]$ puppet agent -tv
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for dnsv2node1.local
Info: Applying configuration version '1549859973'
Error: /Stage[main]/Dnsvault::Settings::Networks::Interfaces/File[/home/system/settings/networks/interfaces.json]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///configs/dnsv2node1.local/settings/networks/interfaces.json
Notice: /Stage[main]/Dnsvault::Settings::Networks::Interfaces/Exec[reload_networking]: Dependency File[/home/system/settings/networks/interfaces.json] has failures: true
Warning: /Stage[main]/Dnsvault::Settings::Networks::Interfaces/Exec[reload_networking]: Skipping because of failed dependencies
@abigoroth
abigoroth / slave_sync.sh
Created June 28, 2018 05:19
hook rsync completion.
SYNC_FILE () {
#check for rsync binary
if [[ -z $(whereis -qb rsync) ]]; then
echo "fatal error: rsync not found."
exit 1
fi
echo "Begin rsync.."
#run rsync to sync with remote server.
rsync -azP --prune-empty-dirs --include="*/" --include="*.slave" --exclude="*" $LOCAL_PATH system@$SERVER:$REMOTE_PATH
products = [];
$.each( $(".directory-list > div") , function(i,v){
product = {
company: $(v).find("div.fldcomp_add2").text().split(":")[1],
product: $(v).find("div.comp_name").text(),
expirary: $(v).find("div.fldcomp_date").text().split(":")[1]
};
console.log( product );
products.push(product);
})
@abigoroth
abigoroth / 0_reuse_code.js
Last active August 29, 2015 14:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
/Users/akob/.rvm/gems/ruby-1.9.2-p290@global/gems/activerecord-3.2.3/lib/active_record/associations/join_dependency/join_base.rb:4: [BUG] Segmentation fault
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.4.0]
-- control frame ----------
c:0075 p:0011 s:0301 b:0300 l:000299 d:000299 CLASS /Users/akob/.rvm/gems/ruby-1.9.2-p290@global/gems/activerecord-3.2.3/lib/active_record/associations/join_dependency/join_base.r
c:0074 p:0011 s:0298 b:0298 l:000297 d:000297 CLASS /Users/akob/.rvm/gems/ruby-1.9.2-p290@global/gems/activerecord-3.2.3/lib/active_record/associations/join_dependency/join_base.r
c:0073 p:0011 s:0296 b:0296 l:000295 d:000295 CLASS /Users/akob/.rvm/gems/ruby-1.9.2-p290@global/gems/activerecord-3.2.3/lib/active_record/associations/join_dependency/join_base.r
c:0072 p:0009 s:0294 b:0294 l:000293 d:000293 TOP /Users/akob/.rvm/gems/ruby-1.9.2-p290@global/gems/activerecord-3.2.3/lib/active_record/associations/join_dependency/join_base.r
c:0071 p:---- s:0292 b:0292 l:000291 d:000291 FIN
@abigoroth
abigoroth / god
Created July 17, 2012 02:28
rubygem god ubuntu service attemp /etc/init.d/
#!/bin/sh
#PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
set -e
PATH=$PATH:$HOME/.rvm/bin
# Feel free to change any of the following variables for your app:
TIMEOUT=${TIMEOUT-60}
APP_ROOT=/home/system/deploy
PID=$APP_ROOT/daemonize.god.pid
CMD="cd $APP_ROOT; god -c daemonize.god -P daemonize.god.pid"
AS_USER=system