Skip to content

Instantly share code, notes, and snippets.

@deevus
deevus / gh-dl-release
Last active Feb 6, 2019 — forked from maxim/gh-dl-release
Download assets from private Github releases
View gh-dl-release
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#
View keybase.md

Keybase proof

I hereby claim:

  • I am deevus on github.
  • I am deevus (https://keybase.io/deevus) on keybase.
  • I have a public key ASBC0wH04xNlx0rCaRu_zK0Gch6QzYcxf0o6tGi2i3c-jgo

To claim this, I am signing this object:

View telegram.ps1
$path = split-path $(resolve-path $(scoop which telegram))
push-location $path
./Telegram.exe
pop-location
@deevus
deevus / build.ps1
Created Apr 21, 2015
Cross Compile GNU Hello using Docker
View build.ps1
$pkg = "hello-2.10"
$file = "$pkg.tar.gz"
# get dockerfile
invoke-webrequest "https://raw.githubusercontent.com/deevus/docker-mxe/develop/Dockerfile" -outfile "Dockerfile"
# get package
if(!(test-path $file)) {
invoke-webrequest "http://gnu.mirror.uber.com.au/hello/$file" -outfile $file
}
@deevus
deevus / scoop-plist.ps1
Created Apr 5, 2015
Posh version of scoop-list
View scoop-plist.ps1
# Usage: scoop plist <query>
# Summary: A posh version of scoop list
# Help: Lists the apps installed in scoop
param($query)
$(scoop shellinit)
. "$env:SCOOP_HOME/lib/core.ps1"
. "$env:SCOOP_HOME/lib/manifest.ps1"
. "$env:SCOOP_HOME/lib/versions.ps1"
View scoop-install.ps1
#requires -v 3
# remote install:
# iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
$erroractionpreference='stop' # quit if anything goes wrong
$branch = "scoop-update-git"
# get core functions
$core_url = "https://raw.githubusercontent.com/deevus/scoop/$branch/lib/core.ps1"
@deevus
deevus / README.md
Last active Aug 29, 2015
Powershell Script for Bootstrapping Scoop (Powershell 2 will be upgraded to 4.0)
View README.md

Scoop Bootstrap Script

Use this script to bootstrap an install of Scoop regardless of your version of Powershell

To use run this from Powershell:

iex (new-object net.webclient).downloadstring('http://bit.ly/1ECcuEn')
View pixel-dungeon.ps1
$cmd = "java -jar $(Resolve-Path $env:SCOOP)\apps\pixel-dungeon\1.7.2a-1\desktop-1.7.2a-1.jar"
start-job -scriptblock { iex $cmd }
View question2.c
int
load_data(FILE *fp, t_data *ptr_data) {
//read into array
fread(&ptr_data->n, BINARY_N_LENGTH, 1, fp);
//get n
int n = extract_little((char *)&ptr_data->n, 0, BINARY_N_LENGTH);
//allocate array
ptr_data->array = malloc(sizeof(t_double) * n);
View question2.c
#include "question2.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "question1.h"
int
load_data(FILE *fp, t_data *ptr_data) {
//read into array
fread(&ptr_data->n, BINARY_N_LENGTH, 1, fp);
You can’t perform that action at this time.